hiding api keys in the prompt log
This commit is contained in:
parent
de7ba70993
commit
12ba436f4d
1 changed files with 7 additions and 1 deletions
|
|
@ -430,7 +430,13 @@ export class mzta_Menus {
|
||||||
}
|
}
|
||||||
}else{ // Classic prompts for the API webchat
|
}else{ // Classic prompts for the API webchat
|
||||||
this.logger.log("fullPrompt: " + fullPrompt);
|
this.logger.log("fullPrompt: " + fullPrompt);
|
||||||
this.logger.log("curr_prompt: " + JSON.stringify(curr_prompt));
|
this.logger.log("curr_prompt: " + JSON.stringify(curr_prompt, (key, value) => {
|
||||||
|
if (typeof key === 'string' && key.endsWith('_api_key')) {
|
||||||
|
return '****************';
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
})
|
||||||
|
);
|
||||||
this.openChatGPT(fullPrompt, curr_prompt.action, tabs[0].id, curr_prompt.name, curr_prompt.need_custom_text, curr_prompt);
|
this.openChatGPT(fullPrompt, curr_prompt.action, tabs[0].id, curr_prompt.name, curr_prompt.need_custom_text, curr_prompt);
|
||||||
taWorkingStatus.stopWorking();
|
taWorkingStatus.stopWorking();
|
||||||
return {ok:'1'};
|
return {ok:'1'};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue