mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
fix: Resolve Token Credit Balance Issues for Instruct Models 🛠️ (#1232)
* Fix: balance update error and add environment variable check * fix(ChatGPTClient): return promptTokens for instruct/davinci models * chore: remove unnecessary comments
This commit is contained in:
parent
d7ef4590ea
commit
f5f5b2bbdb
2 changed files with 9 additions and 2 deletions
|
|
@ -548,7 +548,7 @@ ${botMessage.message}
|
|||
if (isChatGptModel) {
|
||||
return { prompt: [instructionsPayload, messagePayload], context };
|
||||
}
|
||||
return { prompt, context };
|
||||
return { prompt, context, promptTokens: currentTokenCount };
|
||||
}
|
||||
|
||||
getTokenCount(text) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue