You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

101 lines
3.2 KiB

curl -v -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer 168deb3d-fd0c-4912-b9f1-aaee5c6743e6' -H 'Accept: text/event-stream' -d '{
"model": "doubao-1-5-pro-32k-250115",
"messages": [
[],
{
"role": "user",
"content": "你好,你能听到我在说话吗?"
}
],
"temperature": 0.7,
"max_tokens": 2000,
"stream": true,
"tools": [
{
"type": "function",
"function": {
"name": "exit_interaction",
"description": "退出当前语音交互",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "enter_translation_mode",
"description": "用户请求进入实时翻译模式时,启动实时翻译功能",
"parameters": {
"type": "object",
"properties": {},
"required": []
}
}
},
{
"type": "function",
"function": {
"name": "send_text_message",
"description": "发送短信",
"parameters": {
"type": "object",
"properties": {
"contact": {
"type": "string",
"description": "联系人姓名或电话号码"
},
"message": {
"type": "string",
"description": "短信内容"
}
},
"required": [
"contact",
"message"
]
}
}
},
{
"type": "function",
"function": {
"name": "make_phone_call",
"description": "拨打电话",
"parameters": {
"type": "object",
"properties": {
"contact": {
"type": "string",
"description": "联系人姓名或电话号码"
}
},
"required": [
"contact"
]
}
}
},
{
"type": "function",
"function": {
"name": "open_app",
"description": "当用户请求打开特定应用时,启动相应应用",
"parameters": {
"type": "object",
"properties": {
"app_name": {
"type": "string",
"description": "应用名称"
}
},
"required": [
"app_name"
]
}
}
}
]
}' 'https: //ark.cn-beijing.volces.com/api/v3/chat/completions'