mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 19:59:50 +08:00
feat: add doc (#728)
This commit is contained in:
parent
17c3a63e50
commit
c4c47ae8c6
|
@ -3,7 +3,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
|
||||||
|
|
||||||
# Chat App API
|
# Chat App API
|
||||||
|
|
||||||
For versatile conversational apps using a Q&A format, call the chat-messages API to initiate dialogue. Maintain ongoing conversations by passing the returned conversation_id. Response parameters and templates depend on LangGenius Prompt Eng. settings.
|
For versatile conversational apps using a Q&A format, call the chat-messages API to initiate dialogue. Maintain ongoing conversations by passing the returned conversation_id. Response parameters and templates depend on LangGenius Prompt Eng. settings. **[Before you start, READ This !! What is a Bearer Token](https://swagger.io/docs/specification/authentication/bearer-authentication/)**
|
||||||
|
|
||||||
<Heading
|
<Heading
|
||||||
url='/chat-messages'
|
url='/chat-messages'
|
||||||
|
@ -38,7 +38,7 @@ For versatile conversational apps using a Q&A format, call the chat-messages API
|
||||||
- streaming returns. Implementation of streaming return based on SSE (**[Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)**).
|
- streaming returns. Implementation of streaming return based on SSE (**[Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)**).
|
||||||
</Property>
|
</Property>
|
||||||
<Property name='conversation_id' type='string' key='conversation_id'>
|
<Property name='conversation_id' type='string' key='conversation_id'>
|
||||||
(Optional) Conversation ID: leave empty for first-time conversation; pass conversation_id from context to continue dialogue.
|
(Optional) Conversation ID: <strong>‼️ leave empty for first-time conversation ‼️</strong>; pass conversation_id from context to continue dialogue.
|
||||||
</Property>
|
</Property>
|
||||||
<Property name='user' type='string' key='user'>
|
<Property name='user' type='string' key='user'>
|
||||||
The user identifier, defined by the developer, must ensure uniqueness within the app.
|
The user identifier, defined by the developer, must ensure uniqueness within the app.
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||||
|
|
||||||
# 对话型应用 API
|
# 对话型应用 API
|
||||||
|
|
||||||
可用于大部分场景的对话型应用,采用一问一答模式与用户持续对话。要开始一个对话请调用 chat-messages 接口,通过继续传入返回的 conversation_id 可持续保持该会话。
|
可用于大部分场景的对话型应用,采用一问一答模式与用户持续对话。要开始一个对话请调用 chat-messages 接口,通过继续传入返回的 conversation_id 可持续保持该会话。**[开始前请阅读 !! 什么是 Bearer Token ?](https://swagger.io/docs/specification/authentication/bearer-authentication/)**
|
||||||
|
|
||||||
<Heading
|
<Heading
|
||||||
url='/chat-messages'
|
url='/chat-messages'
|
||||||
|
@ -38,7 +38,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
|
||||||
- streaming 流式返回。基于 SSE(**[Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)**)实现流式返回。
|
- streaming 流式返回。基于 SSE(**[Server-Sent Events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events)**)实现流式返回。
|
||||||
</Property>
|
</Property>
|
||||||
<Property name='conversation_id' type='string' key='conversation_id'>
|
<Property name='conversation_id' type='string' key='conversation_id'>
|
||||||
(选填)会话标识符,首次对话可为空,如果要继续对话请传入上下文返回的 conversation_id
|
(选填)<strong>‼️ 会话标识符,首次对话为空 ‼️</strong>,如果要继续对话请传入上下文返回的 conversation_id
|
||||||
</Property>
|
</Property>
|
||||||
<Property name='user' type='string' key='user'>
|
<Property name='user' type='string' key='user'>
|
||||||
用户标识,由开发者定义规则,需保证用户标识在应用内唯一。
|
用户标识,由开发者定义规则,需保证用户标识在应用内唯一。
|
||||||
|
|
Loading…
Reference in New Issue
Block a user