-
Notifications
You must be signed in to change notification settings - Fork 1
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
AI服务API对比 #474
Comments
OpenAIcurl https://api.openai.com/v1/engines/davinci-codex/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_OPENAI_API_KEY" \
-d '{
"prompt": "Translate the following English text to French: '{}'",
"max_tokens": 60
}'
|
ChatGLMhttps://github.com/THUDM/ChatGLM-6B/tree/main#api%E9%83%A8%E7%BD%B2 curl -X POST "http://127.0.0.1:8000" \
-H 'Content-Type: application/json' \
-d '{"prompt": "你好", "history": []}' |
通义千问import fetch from 'node-fetch';
fetch('https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation', {
method: 'POST',
headers: {
'Authorization': 'Bearer xxxxx',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'qwen-turbo',
input: {
messages: [
{
"role": "system",
"content": "你是WebShell AI助手."
},
{
"role": "user",
"content": "如何安装szrz?"
}
]
},
parameters: {
result_format: 'message'
}
})
})
.then(res=>res.json()).then(res => {
return res.output.choices[0].message;
}).then(console.log)
.catch(console.error);
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
百度文心一言
虽然垃圾,但也有一定市场
https://cloud.baidu.com/doc/WENXINWORKSHOP/s/flfmc9do2
https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant
The text was updated successfully, but these errors were encountered: