-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature/azure #4
Conversation
"Cache-Control": "no-store", | ||
[authHeaderName]: authValue, | ||
...(serverConfig.openaiOrgId && { | ||
"Azure-Organization": serverConfig.openaiOrgId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
微软的API应该不支持Organization头
const res = await fetch(fetchUrl, fetchOptions); | ||
|
||
// Extract the OpenAI-Organization header from the response | ||
const openaiOrganizationHeader = res.headers.get("OpenAI-Organization"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
应该不需要这部分的逻辑
// Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined or empty (not setup in ENV) | ||
// Also, this is to prevent the header from being sent to the client | ||
if (!serverConfig.openaiOrgId || serverConfig.openaiOrgId.trim() === "") { | ||
newHeaders.delete("OpenAI-Organization"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
@@ -169,6 +185,8 @@ const anthropicModels = [ | |||
"claude-3-5-sonnet-20240620", | |||
]; | |||
|
|||
const baiduModels = ["completions_pro"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
百度的,是不是给人家多列几个模型?
No description provided.