端点模式片段
端点模式片段
<EndpointSchemaSnippet> 组件显示来自 API Reference 的端点模式。默认情况下,它渲染完整的模式,或者您可以使用 selector 属性来显示特定部分,如请求体、响应、路径参数或查询参数。
要按名称显示任何类型定义(不限于端点模式),请使用 <Schema> 组件。
尚不支持富 Markdown 字段描述,将显示为纯文本。请参见下面的请求路径示例。
用法
Path parameters
domain
Request
messages
The messages to use for the chat completion
model
The model to use for the chat completion
允许的值:
max_tokens
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_prompt
The system prompt to use for the chat completion
rewrite_query
Whether to rewrite the query using query decomposition
Response
turns
The conversation turns in the chat completion
citations
List of citation strings
Markdown
变体
完整请求
将 request 作为选择器传递将仅渲染请求模式。
Path parameters
domain
Request
messages
The messages to use for the chat completion
model
The model to use for the chat completion
允许的值:
max_tokens
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_prompt
The system prompt to use for the chat completion
rewrite_query
Whether to rewrite the query using query decomposition
Markdown
请求路径
Path parameters
domain
Markdown
请求查询
Markdown
请求体
Request
messages
The messages to use for the chat completion
model
The model to use for the chat completion
允许的值:
max_tokens
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_prompt
The system prompt to use for the chat completion
rewrite_query
Whether to rewrite the query using query decomposition
Markdown
完整响应
将 response 作为选择器传递将仅渲染响应模式。
Response
turns
The conversation turns in the chat completion
citations
List of citation strings
Markdown
响应体
Response
turns
The conversation turns in the chat completion
citations
List of citation strings
Markdown
属性
endpoint
要显示的端点,格式为 METHOD /path(例如,POST /chat/{domain})。如果您的 API 使用命名空间,请在前面加上命名空间和 ::(例如,payments::POST /chat/{domain})。
selector
选择要显示的端点模式的特定部分。支持的值:request、request.path、request.query、request.body、response、response.body。