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

完善Azure部署困难 #1349

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

完善Azure部署困难 #1349

wants to merge 2 commits into from

Conversation

huhu415
Copy link

@huhu415 huhu415 commented Apr 22, 2024

close #133
这个问题, 虽然现在关闭了, 但解释的并不清楚, 而且没有解决两个问题:

  1. 那个回答只是巧合, 不管你请求什么模型都是gpt-35-turbo发出去的, 然后再判断实际模型中有没有‘gpt-35-turbo’这个字符串, 再处理, 不合适. 我下面贴代码了.

var modelName string
modelList := adaptor.GetModelList()
if len(modelList) != 0 {
modelName = modelList[0]
}
if modelName == "" || !strings.Contains(channel.Models, modelName) {
modelNames := strings.Split(channel.Models, ",")
if len(modelNames) > 0 {
modelName = modelNames[0]
}
}
request := buildTestRequest()
request.Model = modelName
meta.OriginModelName, meta.ActualModelName = modelName, strings.Split(channel.Models, ",")[0]

  1. 这次我改了前端, 使得以后使用Azure模型, 会更清晰的知道应该怎么填写.

  2. 同时还有一个缺点就是在使用Azure渠道时, 因为Azure自身特性, 和gpt不同, 只能部署一个模型的限制, 应该在前端限制一下, 让用户只能选择一个模型, 但我不会, 不太会前端.

  3. 希望有人改动一下, 不改动也可以, 我觉得应该知道自己一个模型对应一个名称, 不会选所有的.

我已确认该 PR 已自测通过,相关截图如下:
(此处放上测试通过的截图,如果不涉及前端改动或从 UI 上无法看出,请放终端启动成功的截图)
这两个都是一模一样的配置, 而且修改了一些字, 使得更容易设置‘渠道’:
截屏2024-04-22 18 09 38

1
2

@songquanpeng
Copy link
Owner

好的本周末处理一下

@huhu415
Copy link
Author

huhu415 commented Apr 27, 2024

我又提了一个pr, 我在使用过程中出现cors了, 仔细说明在我博客里面. 没有病毒, 您过目.

@HunterWangwei
Copy link

求更新推送,搞了AZ没办法完全用起来。

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