Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Feature/azure #4

wants to merge 6 commits into from

Conversation

Dogtiti
Copy link
Member

@Dogtiti Dogtiti commented Jul 3, 2024

No description provided.

@Dogtiti Dogtiti marked this pull request as draft July 3, 2024 09:41
@Dogtiti Dogtiti marked this pull request as ready for review July 3, 2024 14:39
"Cache-Control": "no-store",
[authHeaderName]: authValue,
...(serverConfig.openaiOrgId && {
"Azure-Organization": serverConfig.openaiOrgId,

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");

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");

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"];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

百度的,是不是给人家多列几个模型?

@Dogtiti Dogtiti closed this Jul 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants