oldweipro / claude-to-chatgpt

Claude 聊天接口适配到 OpenAI API 标准接口。
MIT License
101 stars 18 forks source link

支持上下文,和请求头认证 #21

Open liwc0329 opened 10 months ago

liwc0329 commented 10 months ago

微笑😊 可以支持上上下文,现在都是单聊。 可以支持上调用传递Authorization header curl --location 'http://api.claude.xxx.com/v1/chat/completions' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer xxx' \ --data '{"temperature":0.5,"messages":[{"role":"user","content":"1+1=几"},{"role":"assistant","content":"你确定吗"}],"model":"gpt-3.5-turbo","max_tokens":3000}'

fan1jun commented 10 months ago

大佬可否提供支持上下文和请求头认证的代码?