mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-24 04:10:15 +01:00
feat: user_provided token for plugins, temp remove user_provided azure creds for Plugins until solution is made
This commit is contained in:
parent
5b30ab5d43
commit
5ad0ef331f
7 changed files with 29 additions and 18 deletions
|
|
@ -244,7 +244,8 @@ class OpenAIClient extends BaseClient {
|
|||
|
||||
// TODO: need to handle interleaving instructions better
|
||||
if (this.contextStrategy) {
|
||||
({ payload, tokenCountMap, promptTokens, messages } = await this.handleContextStrategy({instructions, orderedMessages, formattedMessages}));
|
||||
({ payload, tokenCountMap, promptTokens, messages } =
|
||||
await this.handleContextStrategy({instructions, orderedMessages, formattedMessages}));
|
||||
}
|
||||
|
||||
const result = {
|
||||
|
|
@ -271,7 +272,8 @@ class OpenAIClient extends BaseClient {
|
|||
if (progressMessage === '[DONE]') {
|
||||
return;
|
||||
}
|
||||
const token = this.isChatCompletion ? progressMessage.choices?.[0]?.delta?.content : progressMessage.choices?.[0]?.text;
|
||||
const token =
|
||||
this.isChatCompletion ? progressMessage.choices?.[0]?.delta?.content : progressMessage.choices?.[0]?.text;
|
||||
// first event's delta content is always undefined
|
||||
if (!token) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue