Skip to content

Commit

Permalink
Merge branch 'danny-avila:main' into feat/Apple-Auth
Browse files Browse the repository at this point in the history
  • Loading branch information
rubentalstra authored Jan 27, 2025
2 parents e082708 + 528ee62 commit f8a93a1
Show file tree
Hide file tree
Showing 13 changed files with 283 additions and 333 deletions.
9 changes: 0 additions & 9 deletions api/app/clients/ChatGPTClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const {
const { extractBaseURL, constructAzureURL, genAzureChatCompletion } = require('~/utils');
const { createContextHandlers } = require('./prompts');
const { createCoherePayload } = require('./llm');
const { Agent, ProxyAgent } = require('undici');
const BaseClient = require('./BaseClient');
const { logger } = require('~/config');

Expand Down Expand Up @@ -186,10 +185,6 @@ class ChatGPTClient extends BaseClient {
headers: {
'Content-Type': 'application/json',
},
dispatcher: new Agent({
bodyTimeout: 0,
headersTimeout: 0,
}),
};

if (this.isVisionModel) {
Expand Down Expand Up @@ -275,10 +270,6 @@ class ChatGPTClient extends BaseClient {
opts.headers['X-Title'] = 'LibreChat';
}

if (this.options.proxy) {
opts.dispatcher = new ProxyAgent(this.options.proxy);
}

/* hacky fixes for Mistral AI API:
- Re-orders system message to the top of the messages payload, as not allowed anywhere else
- If there is only one message and it's a system message, change the role to user
Expand Down
Loading

0 comments on commit f8a93a1

Please sign in to comment.