端点模式片段

以 Markdown 格式查看

<EndpointSchemaSnippet> 组件显示来自 API Reference 的端点模式。默认情况下,它渲染完整的模式,或者您可以使用 selector 属性来显示特定部分,如请求体、响应、路径参数或查询参数。

要按名称显示任何类型定义(不限于端点模式),请使用 <Schema> 组件。

尚不支持富 Markdown 字段描述,将显示为纯文本。请参见下面的请求路径示例。

用法

Path parameters

domainstring必需

Request

messageslist of objects必需
The messages to use for the chat completion
modelenum or null可选
The model to use for the chat completion
允许的值:
max_tokensinteger or null可选100-3500默认为 3000
The maximum number of tokens to generate. Note: setting a token count lower than 2000 may result in incomplete responses. You can add a custom system prompt to control the verbosity of the response.
system_promptstring or null可选
The system prompt to use for the chat completion
rewrite_queryboolean or null可选默认为 false
Whether to rewrite the query using query decomposition

Response

turnslist of objects必需
The conversation turns in the chat completion
citationslist of strings必需
List of citation strings
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" />

变体

完整请求

request 作为选择器传递将仅渲染请求模式。

Path parameters

domainstring必需

Request

messageslist of objects必需
The messages to use for the chat completion
modelenum or null可选
The model to use for the chat completion
允许的值:
max_tokensinteger or null可选100-3500默认为 3000
The maximum number of tokens to generate. Note: setting a token count lower than 2000 may result in incomplete responses. You can add a custom system prompt to control the verbosity of the response.
system_promptstring or null可选
The system prompt to use for the chat completion
rewrite_queryboolean or null可选默认为 false
Whether to rewrite the query using query decomposition
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request" />

请求路径

Path parameters

domainstring必需
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.path" />

请求查询

Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.query" />

请求体

Request

messageslist of objects必需
The messages to use for the chat completion
modelenum or null可选
The model to use for the chat completion
允许的值:
max_tokensinteger or null可选100-3500默认为 3000
The maximum number of tokens to generate. Note: setting a token count lower than 2000 may result in incomplete responses. You can add a custom system prompt to control the verbosity of the response.
system_promptstring or null可选
The system prompt to use for the chat completion
rewrite_queryboolean or null可选默认为 false
Whether to rewrite the query using query decomposition
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="request.body" />

完整响应

response 作为选择器传递将仅渲染响应模式。

Response

turnslist of objects必需
The conversation turns in the chat completion
citationslist of strings必需
List of citation strings
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response" />

响应体

Response

turnslist of objects必需
The conversation turns in the chat completion
citationslist of strings必需
List of citation strings
Markdown
1<EndpointSchemaSnippet endpoint="POST /chat/{domain}" selector="response.body" />

属性

endpoint
stringRequired

要显示的端点,格式为 METHOD /path(例如,POST /chat/{domain})。如果您的 API 使用命名空间,请在前面加上命名空间和 ::(例如,payments::POST /chat/{domain})。

selector
string

选择要显示的端点模式的特定部分。支持的值:requestrequest.pathrequest.queryrequest.bodyresponseresponse.body