Skip to content

无法使用非流式输出 #610

Description

@Lockjava

把 "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)
“”

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions