-
Notifications
You must be signed in to change notification settings - Fork 242
Open
Description
把 "Accept": "text/event-stream"去掉,也无法禁用流式输出,我应该怎么操作呢?我的代码如下“”
import requests
import json
url = "{baseurl}/api/v1/chat/completions"
api_key = "xxxxxxxxx"
headers = {
"Authorization": api_key,
"content-type": "application/json",
# "Accept": "text/event-stream"
}
data = {
"prompt": [
{
"type": "text",
"content": "周杰伦的主要作品有哪些?"
}
],
"session_id": 19,
"thinking_enabled": True,
"user_no": "123456",
}
response = requests.post(url, headers=headers, json=data)
print(response.text)
“”
Metadata
Metadata
Assignees
Labels
No labels