mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-26 13:18:34 +07:00
doc
This commit is contained in:
@@ -76,6 +76,8 @@ print(response.text)
|
||||
|
||||
Conversational applications facilitate ongoing dialogue with users through a question-and-answer format. To initiate a conversation, you will call the `chat-messages` API. A `conversation_id` is generated for each session and must be included in subsequent API calls to maintain the conversation flow.
|
||||
|
||||
> **Important Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface.
|
||||
|
||||
#### Key Considerations for `conversation_id`:
|
||||
|
||||
- **Generating the `conversation_id`:** When starting a new conversation, leave the `conversation_id` field empty. The system will generate and return a new `conversation_id`, which you will use in future interactions to continue the dialogue.
|
||||
|
||||
@@ -48,6 +48,7 @@ Send a request to the chat application.
|
||||
- **user** (string) Required
|
||||
- User identifier for retrieval and statistics
|
||||
- Should be uniquely defined within the application
|
||||
- **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface.
|
||||
|
||||
- **conversation_id** (string) Optional
|
||||
- Conversation ID to continue based on previous chat records
|
||||
@@ -172,6 +173,8 @@ Submit user feedback on messages.
|
||||
|
||||
Returns historical chat records in reverse chronological order.
|
||||
|
||||
> **Note**: The Service API does not share conversations created by the WebApp. This endpoint only returns conversations created through the API.
|
||||
|
||||
#### Query Parameters
|
||||
- `conversation_id` (string) Required
|
||||
- `user` (string) Required
|
||||
@@ -220,6 +223,8 @@ interface ConversationHistory {
|
||||
|
||||
Retrieve conversation list for current user.
|
||||
|
||||
> **Note**: The Service API does not share conversations created by the WebApp. Only conversations created through the API are accessible via this endpoint.
|
||||
|
||||
#### Query Parameters
|
||||
- `user` (string) Required
|
||||
- `last_id` (string) Optional
|
||||
|
||||
@@ -60,7 +60,7 @@ Chatflow type application provides the following system variables:
|
||||
<tr>
|
||||
<td><code>sys.user_id</code></td>
|
||||
<td>String</td>
|
||||
<td>A unique ID is assigned for each application user to distinguish different conversation users.</td>
|
||||
<td>A unique ID is assigned for each application user to distinguish different conversation users. <br /><br /><strong>Note</strong>: The Service API does not share conversations created by the WebApp. This means users with the same ID will have separate conversation histories between API and WebApp interfaces.</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
},
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User identifier, defined by the developer's rules, must be unique within the application."
|
||||
"description": "User identifier, defined by the developer's rules, must be unique within the application. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User identifier, must be consistent with the user passed in the send message interface."
|
||||
"description": "User identifier, must be consistent with the user passed in the send message interface. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface."
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -344,7 +344,7 @@
|
||||
"name": "user",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "User identifier.",
|
||||
"description": "User identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -382,7 +382,7 @@
|
||||
"name": "user",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "User identifier.",
|
||||
"description": "User identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface.",
|
||||
"schema": { "type": "string" }
|
||||
},
|
||||
{
|
||||
@@ -425,7 +425,7 @@
|
||||
"name": "user",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"description": "User identifier.",
|
||||
"description": "User identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface.",
|
||||
"schema": { "type": "string" }
|
||||
},
|
||||
{
|
||||
@@ -493,7 +493,7 @@
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "The user identifier."
|
||||
"description": "The user identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1003,7 +1003,7 @@
|
||||
},
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User identifier, unique within the application."
|
||||
"description": "User identifier, unique within the application. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface."
|
||||
},
|
||||
"conversation_id": {
|
||||
"type": "string",
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
},
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User identifier, unique within the application."
|
||||
"description": "User identifier, unique within the application. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -162,7 +162,7 @@
|
||||
"properties": {
|
||||
"user": {
|
||||
"type": "string",
|
||||
"description": "User identifier, consistent with the send message call."
|
||||
"description": "User identifier, consistent with the send message call. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,7 +322,7 @@
|
||||
"type": "object",
|
||||
"required": ["user"],
|
||||
"properties": {
|
||||
"user": { "type": "string", "description": "The user identifier." }
|
||||
"user": { "type": "string", "description": "The user identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface." }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -619,7 +619,7 @@
|
||||
"LimitQueryParam": { "name": "limit", "in": "query", "description": "Number of items per page.", "schema": { "type": "integer" } },
|
||||
"LimitQueryParamDefault20": { "name": "limit", "in": "query", "description": "Number of items per page.", "schema": { "type": "integer", "default": 20 } },
|
||||
"LimitQueryParamDefault20Max100": { "name": "limit", "in": "query", "description": "Number of items per page (Default 20, Max 100).", "schema": { "type": "integer", "default": 20, "minimum": 1, "maximum": 100 } },
|
||||
"UserQueryParam": { "name": "user", "in": "query", "required": true, "description": "User identifier.", "schema": { "type": "string" } },
|
||||
"UserQueryParam": { "name": "user", "in": "query", "required": true, "description": "User identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface.", "schema": { "type": "string" } },
|
||||
"ConversationIdQueryParam": { "name": "conversation_id", "in": "query", "required": true, "description": "Conversation ID.", "schema": { "type": "string" } },
|
||||
"LastIdQueryParam": { "name": "last_id", "in": "query", "description": "ID of the last record for pagination.", "schema": { "type": "string" } },
|
||||
"SortByQueryParam": { "name": "sort_by", "in": "query", "description": "Sorting field (e.g., -updated_at).", "schema": { "type": "string", "enum": ["created_at", "-created_at", "updated_at", "-updated_at"], "default": "-updated_at" } },
|
||||
@@ -659,7 +659,7 @@
|
||||
"default": {}
|
||||
},
|
||||
"response_mode": { "type": "string", "enum": ["streaming", "blocking"], "default": "streaming", "description": "Response mode. Cloudflare timeout is 100s for blocking." },
|
||||
"user": { "type": "string", "description": "User identifier." },
|
||||
"user": { "type": "string", "description": "User identifier. **Note**: The Service API does not share conversations created by the WebApp. Conversations created through the API are isolated from those created in the WebApp interface." },
|
||||
"conversation_id": { "type": "string", "description": "Conversation ID to continue." },
|
||||
"files": {
|
||||
"type": "array",
|
||||
|
||||
Reference in New Issue
Block a user