Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模拟API接口地址 后面具体的请求体应该是怎么样的 ,求给个curl 示范 #4

Open
tomridder opened this issue May 16, 2024 · 1 comment

Comments

@tomridder
Copy link

模拟API接口地址 后面具体的请求体应该是怎么样的 ,求给个curl 示范

curl --location --request POST 'http://服务器IP:8100/v1/chat/completions/v1/chat/completions'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer sk-chenai-xxx'
--header 'userToken: c6b0d865-34e5-414d-b4-xxx'
--data '{
"userToken": "c6b0d865-34e5-414d-b4-xxx",
"model": "gpt-4",
"messages": [{"role": "user", "content": "12+12” }],
"prompt" : "12+12",
"stream”:true
}'

目前我是这样的 ,提示 {"detail":"userToken not found"}% 错误

@tanpengsccd
Copy link

curl --location --request POST 'https://xygptapi.baidu.com/v1/chat/completions' --header 'Content-Type: application/json' --header 'Authorization: Bearer 2a5648c5-6bfc-4b33-8b51-851b0c0b30d5' --header 'userToken: 2a5648c5-6bfc-4b33-8b51-851b0c0b30d5' --data '{"userToken": "2a5648c5-6bfc-4b33-8b51-851b0c0b30d5", "model": "gpt-4", "messages": [{"role": "user", "content": "12+12"}], "prompt" : "12+12", "stream":true}'   

2a5648c5-6bfc-4b33-8b51-851b0c0b30d5 换成 你的 , 地址换成你的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants