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 渠道测试报错:The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. #133

Closed
assez opened this issue May 31, 2023 · 24 comments · May be fixed by #1349
Labels
question Further information is requested

Comments

@assez
Copy link

assez commented May 31, 2023

错误:type , code DeploymentNotFound, message The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

添加后测试老是不成功提示这个

@songquanpeng
Copy link
Owner

image

@songquanpeng songquanpeng added the question Further information is requested label May 31, 2023
@songquanpeng songquanpeng changed the title 使用azure的api渠道出错 Azure 渠道测试报错:The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. May 31, 2023
@ccyuvin
Copy link

ccyuvin commented Jun 1, 2023

image
加一张图片更清楚

@songquanpeng
Copy link
Owner

已添加图片提示。

@assez
Copy link
Author

assez commented Jun 2, 2023

感谢,已成功

@hehan-wang
Copy link

有些情况没有办法一致怎么办呢?

@Plandres
Copy link

Azure已更新gpt-35-turbo-16k,添加后出现同样报错,已确认部署名和模型名称相同

@caixiaomao
Copy link

Azure已更新gpt-35-turbo-16k,添加后出现同样报错,已确认部署名和模型名称相同

同样报错,确定模型名称和部署名称一致

@yanxiaochuan
Copy link

16k依旧报错

@songquanpeng
Copy link
Owner

测试报错有可能是因为你没有部署 gpt-3.5

@sadlay
Copy link

sadlay commented Sep 12, 2023

我不太理解为什么需要完全一致,调用Azure服务只需要部署名称吧

@ivanberry
Copy link

ivanberry commented Oct 9, 2023

image

渠道测试通不过,chat功能提示用不了,提示401之类的,看清求,模型使用的是pt-3.5-turbo

@borlandapple
Copy link

azure的部署里与模型名称保持一致
image
在oneapi里配置渠道
image
秘钥去azure的开发里找
image
然后在fastGPT的config.json里配置azure的openai通道,注意配置文件里model字段与openai是一致的,所以azure的openai与openai你只能保留一个,要不默认用的前面配置的那个model
image
另外azure的openai好像不支持functionCall,在CQModel里配置为true会报错

@dimsky
Copy link

dimsky commented Feb 29, 2024

这个部署名必须跟模型名一致的要求很不灵活,如果该模型有多个版本时,却只能添加一个版本(因为部署名是唯一的),比如如我需要在该区域下同时添加 1106 和 vision 版本,该怎么定义部署名,azure 的 api 本来就是根据部署名调用的,为什么要与模型名一致?
gpt-4

@borlandapple
Copy link

borlandapple commented Mar 2, 2024 via email

@songquanpeng
Copy link
Owner

这里之后优化,我先记下了

@jackfong66
Copy link

这里之后优化,我先记下了

大佬,这个兼容了没。

@warjiang
Copy link
Contributor

warjiang commented Mar 7, 2024

这里之后优化,我先记下了

大佬,这个兼容了没。

https://github.com/warjiang/one-api/tree/feature/azure-openai 我改了一个版本,可以试试。

使用方式,docker镜像修改为warjiang/one-api:v1.0.2
直接在数据库里面修改channel表的config字段,找到azure对应的config字段配置,设置为

{
    "deployment_configs": [
        {
            "model_name": "gpt-3.5-turbo",
            "deployment_name": "deployment-xxx",
            "api_version": "2023-07-01-preview"
        }
    ]
}

model_name是前端用户传入的接口调用里面的字段,deployment_name是在azure上面创建模型部署对应的名字。

前端的配置我还没搞,有空加下。

要可以的话,可以帮我合一下代码 🤣

@warjiang
Copy link
Contributor

warjiang commented Mar 7, 2024

这里之后优化,我先记下了

感觉改的有点多,我把loadConfig那边的干掉了,担心不一定符合你们官方团队的想法。要是可以的话,可以帮我review下

@borlandapple
Copy link

borlandapple commented Mar 11, 2024 via email

@yuanzhiwei
Copy link

请问一下16k报错是否修复了呀?

@qingfengfenga
Copy link
Contributor

实测相同模型部署名称会被覆盖

想问一下,模型部署名称和模型名称必须保持一致的话,同一个模型多个版本怎么办?

@huhu415
Copy link

huhu415 commented Apr 22, 2024

首先我在Azure上部署了一个名称为gpt-4-1106-Preview的gpt4的1106-Preview版本的模型. 所以官网给出的代码是
curl "https://pay.openai.azure.com/openai/deployments/gpt-4-1106-Preview/chat/completions?api-version=2024-02-15-preview"
其中gpt-4-1106-Preview就是我自己命名的那个名称. 如下图:
截屏2024-04-22 14 43 06

问题是one-api应该怎么去使用这个模型?
截屏2024-04-22 14 46 45
如图, 只要你的one-api中的‘模型’, 和你自定的名称对上了, 那么就好使了.

@huhu415
Copy link

huhu415 commented Apr 22, 2024

外加一点, 希望你自定义的名称, 是从标准名称里面找的, 要不然后期找不到了, 还要再折腾

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

Successfully merging a pull request may close this issue.

17 participants