Closed IncredibleAaron closed 9 months ago
根据别的Issue, 修改了 Post 地址, 加了 /v1/chat/completions, POST 是ok的, 但是又得到了 Missing model mapper 。。
mapper 加了 0301 也不对。。
'gpt-3.5-turbo': "aBot", // DEPLOY_NAME_GPT35,
'gpt-3.5-turbo-0301': 'aBot',
Authorization
Header一个简单的例子:
POST /v1/chat/completions HTTP/1.1
Content-Type: application/json
Authorization: <Your Azure OpenAI Key>
Host: openai-proxy.exmaple.com
Connection: close
Content-Length: 97
{"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"\u4f60\u597d"}],"temperature":0.7}
Authorization 和 OpenAI 不一样,是没有 Bearer
的,另外建议用第三方 API 工具测,比如 Postman 什么的。
谢谢 大佬讲解。
我还是不是特别理解这个地方应该怎么使用。 我以为会自动出现一个网页, 运行生成api key的东西。
那现在来讲的话, 意思是我们只是需要这个post功能? 这个应该正常运作的话会output什么有啊。。
那么这个页面主要有3个部分:
根据前面的, 我试用如下, 感觉还是不太对, 麻烦指点一下, 谢谢
` POST: https://mygpt.incredible_li.workers.dev/v1/chat/completions
Header:
Content-Type: application/json
Authorization:
Body: {"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Please work as an translator"}],"temperature":0.7} `
谢谢 大佬讲解。
我还是不是特别理解这个地方应该怎么使用。 我以为会自动出现一个网页, 运行生成api key的东西。
那现在来讲的话, 意思是我们只是需要这个post功能? 这个应该正常运作的话会output什么有啊。。
那么这个页面主要有3个部分:
- Post 网址
- Header -- add key-val pairs
- Body 麻烦问一下这3个部分分别应该怎么放呢.
根据前面的, 我试用如下, 感觉还是不太对, 麻烦指点一下, 谢谢
` POST: https://mygpt.incredible_li.workers.dev/v1/chat/completions
Header: Content-Type: application/json Authorization: Host: openai-proxy.exmaple.com // 这个不是很确定放啥。。 Connection: close Content-Length: 97
Body: {"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Please work as an translator"}],"temperature":0.7} `
这个项目只是一个实现 Azure OpenAI 代理的,目的是让 Azure 的 OpenAI 服务响应和 OpenAI API 一致,这样一些只支持 OpenAI API 的第三方客户端也可以使用,要配合其他的 ChatGPT 客户端用的呀,iOS 有 OpenCat,桌面平台有 Chatbox 什么的,可以自己搜一下。
你其实不需要管具体实现,你只要按照 README 步骤在 Cloudflare 上部署好了 proxy,然后找一个第三方客户端填上你的 proxy 地址,在 API key 里面填 Azure OpenAI Key 就可以了。
如果第三方客户端本来就支持 Azure OpenAI,那你就直接在 Azure OpenAI 相关的地方填你的 Azure OpenAI url 和密钥就好了。
如题。 非程序员, 不是特别懂前端, 麻烦帮助。
问题:error 404
我的步骤:
const mapper = { 'gpt-3.5-turbo': "aBot" // DEPLOY_NAME_GPT35, // 'gpt-4': DEPLOY_NAME_GPT4 };