haibbo / cf-openai-azure-proxy

A Cloudflare worker script to proxy OpenAI‘s request to Azure OpenAI Service
MIT License
1.66k stars 207 forks source link

按照示例改的代码,报错Missing model mapper?想问下如何解决 #51

Closed itcodes closed 10 months ago

itcodes commented 1 year ago

1581690892755_ pic 大家有遇到这个问题吗?

Cuauhtemoc9 commented 1 year ago

+1

ShinChven commented 1 year ago

https://atlassc.net/2023/05/30/convert-azure-openai-service-api-to-openai-service-api

const deployName = mapper[modelName] || 'Your model deployment name'; // set a default model deployment name here to avoid possible errors.

改这一句

Cuauhtemoc9 commented 1 year ago

感谢大佬,但不清楚为什么现在变成404了 image

Cuauhtemoc9 commented 1 year ago

不知道是不是和版本有关系,之前一直用的3.5都没问题,现在加了turbo和0613版本就不行了 image image

ShinChven commented 1 year ago

这个情况好像没见过,检查一下模型部署名称

ShinChven commented 1 year ago

不知道是不是和版本有关系,之前一直用的3.5都没问题,现在加了turbo和0613版本就不行了 image image

你们怎么都申请到GPT-4了,我申请4个月了,就是不给。

ShinChven commented 1 year ago
const apiVersion="2023-05-15";

测了一下,改版本号吧。 这个版本号是API的版本号,不是模型的版本号。

Cuauhtemoc9 commented 1 year ago

可以了感谢大佬!方便的话可以看下telegram,发了信息给您~

lil-i321 commented 1 year ago
const apiVersion="2023-05-15";

测了一下,改版本号吧。 这个版本号是API的版本号,不是模型的版本号。

是不是应该改成这里的版本号? image

ShinChven commented 1 year ago

应该是的,别忘记了删掉preview

think2011 commented 1 year ago
image

有遇到 vscode 的插件 genie Ai 似乎有 bug,传的 model 不对导致出错

ShinChven commented 1 year ago

我试了一下 GPT-4 和 GPT-3.5-turbo 是没有问题的。