发送请求给文本生成型应用。
API-Key 鉴权。所有 API 请求都应在 Authorization
HTTP Header 中包含您的 API-Key,格式为 Bearer {API_KEY}
。强烈建议开发者把 API-Key 放在后端存储,而非分享或者放在客户端存储,以免 API-Key 泄露,导致财产损失。
创建完成消息的请求体。
The body is of type object
.
成功响应。内容类型和结构取决于请求中的 response_mode
参数。
response_mode
为 blocking
,返回 application/json
及 ChatCompletionResponse
对象。response_mode
为 streaming
,返回 text/event-stream
及 ChunkChatCompletionResponse
流式序列。阻塞模式下的完整 App 结果。