Separated list_agents() from session management (#4111)

### What problem does this PR solve?


### Type of change

- [x] Documentation Update
This commit is contained in:
writinwaters 2024-12-19 14:36:51 +08:00 committed by GitHub
parent 57c99dd811
commit 8939206531
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 21 deletions

View File

@ -600,7 +600,7 @@ curl --request GET \
Success: Success:
```text ```json
This is a test to verify the file download feature. This is a test to verify the file download feature.
``` ```
@ -1702,7 +1702,7 @@ Failure:
--- ---
## CHAT SESSIONS ## SESSION MANAGEMENT
--- ---
@ -1772,13 +1772,13 @@ Failure:
```json ```json
{ {
"code": 102, "code": 102,
"message": "Name can not be empty." "message": "Name cannot be empty."
} }
``` ```
--- ---
### Update session ### Update chat assistant's session
**PUT** `/api/v1/chats/{chat_id}/sessions/{session_id}` **PUT** `/api/v1/chats/{chat_id}/sessions/{session_id}`
@ -1813,7 +1813,7 @@ curl --request PUT \
The ID of the associated chat assistant. The ID of the associated chat assistant.
- `session_id`: (*Path parameter*) - `session_id`: (*Path parameter*)
The ID of the session to update. The ID of the session to update.
- `"name"`: (*Body Parameter), `string` - `"name"`: (*Body Parameter*), `string`
The revised name of the session. The revised name of the session.
#### Response #### Response
@ -1837,7 +1837,7 @@ Failure:
--- ---
### List sessions ### List chat assistant's sessions
**GET** `/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id}` **GET** `/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id}`
@ -1915,7 +1915,7 @@ Failure:
--- ---
### Delete sessions ### Delete chat assistant's sessions
**DELETE** `/api/v1/chats/{chat_id}/sessions` **DELETE** `/api/v1/chats/{chat_id}/sessions`
@ -1979,18 +1979,15 @@ Failure:
Asks a specified chat assistant a question to start an AI-powered conversation. Asks a specified chat assistant a question to start an AI-powered conversation.
:::tip NOTE :::tip NOTE
- In streaming mode, not all responses include a reference, as this depends on the system's judgement. - In streaming mode, not all responses include a reference, as this depends on the system's judgement.
- In streaming mode, the last message is an empty message: - In streaming mode, the last message is an empty message:
```json
```text
data: data:
{ {
"code": 0, "code": 0,
"data": true "data": true
} }
``` ```
::: :::
#### Request #### Request
@ -2045,7 +2042,7 @@ curl --request POST \
#### Response #### Response
Success without `session_id`: Success without `session_id`:
```text ```json
data:{ data:{
"code": 0, "code": 0,
"message": "", "message": "",
@ -2066,7 +2063,7 @@ data:{
Success with `session_id`: Success with `session_id`:
```text ```json
data:{ data:{
"code": 0, "code": 0,
"data": { "data": {
@ -2305,18 +2302,15 @@ Failure:
Asks a specified agent a question to start an AI-powered conversation. Asks a specified agent a question to start an AI-powered conversation.
:::tip NOTE :::tip NOTE
- In streaming mode, not all responses include a reference, as this depends on the system's judgement. - In streaming mode, not all responses include a reference, as this depends on the system's judgement.
- In streaming mode, the last message is an empty message: - In streaming mode, the last message is an empty message:
```json
```text
data: data:
{ {
"code": 0, "code": 0,
"data": true "data": true
} }
``` ```
::: :::
#### Request #### Request
@ -2383,7 +2377,7 @@ curl --request POST \
The parameters in the begin component. The parameters in the begin component.
#### Response #### Response
success without `session_id` provided and with no parameters in the `begin` component: success without `session_id` provided and with no parameters in the `begin` component:
```text ```json
data:{ data:{
"code": 0, "code": 0,
"message": "", "message": "",
@ -2402,7 +2396,7 @@ data:{
``` ```
Success with `session_id` provided and with no parameters in the `begin` component: Success with `session_id` provided and with no parameters in the `begin` component:
```text ```json
data:{ data:{
"code": 0, "code": 0,
"message": "", "message": "",
@ -2509,7 +2503,7 @@ data:{
} }
``` ```
Success with parameters in the `begin` component: Success with parameters in the `begin` component:
```text ```json
data:{ data:{
"code": 0, "code": 0,
"message": "", "message": "",
@ -2791,6 +2785,10 @@ Failure:
--- ---
## AGENT MANAGEMENT
---
### List agents ### List agents
**GET** `/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={agent_name}&id={agent_id}` **GET** `/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={agent_name}&id={agent_id}`

View File

@ -1139,7 +1139,7 @@ for assistant in rag_object.list_chats():
--- ---
## CHAT SESSIONS ## SESSION MANAGEMENT
--- ---
@ -1576,6 +1576,10 @@ for session in sessions:
--- ---
## AGENT MANAGEMENT
---
### List agents ### List agents
```python ```python