Use chatcompletion log function for token budget

This commit is contained in:
maver 2023-08-10 20:28:48 +02:00
parent 19e5502555
commit f2c4645207
1 changed files with 3 additions and 3 deletions

View File

@ -1504,12 +1504,12 @@ class ChatCompletion {
* @param {number} response - Number of tokens in the response.
*/
setTokenBudget(context, response) {
console.log(`Prompt tokens: ${context}`);
console.log(`Completion tokens: ${response}`);
this.log(`Prompt tokens: ${context}`);
this.log(`Completion tokens: ${response}`);
this.tokenBudget = context - response;
console.log(`Token budget: ${this.tokenBudget}`);
this.log(`Token budget: ${this.tokenBudget}`);
}
/**