haibbo / cf-openai-azure-proxy

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

最好增加一个model mapper的功能,方便映射到不同的模型 #8

Closed doherty88 closed 1 year ago

doherty88 commented 1 year ago

如题,现在是在代码里写死的部署名,如果用户在azure中也有了gpt4的权限的话,要切换模型还要改worker代码,有点麻烦。

haibbo commented 1 year ago

用环境变量的方式吗?

yinm0591 commented 1 year ago

可以参考 https://github.com/diemus/azure-openai-proxy 做一个对应关系(openai model name=azure deploy name):gpt-3.5-turbo=gpt35, gpt-4=gpt4

hbsgithub commented 1 year ago

我提交了一个PR,增加了mapper的功能 https://github.com/haibbo/cf-openai-azure-proxy/pull/11#issue-1663853639

haibbo commented 1 year ago

已经支持