Skip to content

无法使用非流式输出 #610

@Lockjava

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions