TBXark / ChatGPT-Telegram-Workers

Deploy your own Telegram ChatGPT bot on Cloudflare Workers with ease.
https://t.me/ChatGPT_Telegram_Workers
MIT License
3.49k stars 834 forks source link

适配一下Azure OpenAI #199

Closed C018 closed 1 year ago

C018 commented 1 year ago

rt

diciky commented 1 year ago

希望大佬能适配Azure OpenAI.目前网页访问openai各大机场已经团灭了

TBXark commented 1 year ago

DEV添加了Azure OpenAI 支持。目前只支持聊天,账单和图片生成不支持。需要添加两个字段

key value
AZURE_API_KEY 两个密钥随便选一个就可以
AZURE_COMPLETIONS_AP https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2023-05-15
diciky commented 1 year ago

谢谢巨佬

diciky commented 1 year ago

报错Error: Cannot read properties of undefined (reading '0')

TBXark commented 1 year ago

报错Error: Cannot read properties of undefined (reading '0')

API 格式错了,你按我写的格式写。结尾是 /chat/completions

diciky commented 1 year ago

发现问题了.格式没错,按你写的.key少了个字母,应该是AZURE_COMPLETIONS_API

TBXark commented 1 year ago

发现问题了.格式没错,按你写的.key少了个字母,应该是AZURE_COMPLETIONS_API 😂😂😂

diciky commented 1 year ago

谢谢巨佬及时支持