Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加支持OpenAI的接口地址代理 #19

Open
hnsongbiao opened this issue Apr 30, 2023 · 1 comment
Open

增加支持OpenAI的接口地址代理 #19

hnsongbiao opened this issue Apr 30, 2023 · 1 comment

Comments

@hnsongbiao
Copy link

`{
  "Logging": {
    "IncludeScopes": false,
    "LogLevel": {
      "Default": "Warning"
    }
  },
  //CO2NET 设置
  "SenparcSetting": {
    "IsDebug": true,
    "DefaultCacheNamespace": "DefaultCacheTest"
  },
  //Senparc.AI 设置
  "SenparcAiSetting": {
    "IsDebug": true,
    "AiPlatform": "AzureOpenAI",
    "AzureOpenAIKeys": {
      "ApiKey": "YourAzureApiKey", //TODO:加密
      "AzureEndpoint": `"https://xxxx.openai.azure.com/",`
      "AzureOpenAIApiVersion": "2022-12-01" //调用限制请参考:https://learn.microsoft.com/en-us/azure/cognitive-services/openai/quotas-limits
    },
    "OpenAIKeys": {
      "ApiKey": "YourOpenAIKey", //TODO:加密
      "OrgaizationId": "YourOpenAIOrgId"
    }
  }
}



OpenAIKeys里建议增加OpenAI接口地址的代理设置,可以使用云函数做一个代理地址,解决网络访问问题

@JeffreySu
Copy link
Contributor

@hnsongbiao 尝试添加了,但是似乎在 SematicKernel 中提供的 OpenAI 的注册方法并不能改写这个参数?我的理解是其实如果要自定义,只要使用 AzureOpenAIKeys 进行设置就行了?

新的代码已经在一个独立分支中:https://github.com/Senparc/Senparc.AI/tree/feature/19-AddOpenAIEndpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants