Browse Source

Separated list_agents() from session management (#4111)

### What problem does this PR solve?


### Type of change

- [x] Documentation Update
tags/v0.15.1
writinwaters 10 months ago
parent
commit
8939206531
No account linked to committer's email address
2 changed files with 23 additions and 21 deletions
  1. 18
    20
      docs/references/http_api_reference.md
  2. 5
    1
      docs/references/python_api_reference.md

+ 18
- 20
docs/references/http_api_reference.md View File



Success: Success:


```text
```json
This is a test to verify the file download feature. This is a test to verify the file download feature.
``` ```




--- ---


## CHAT SESSIONS
## SESSION MANAGEMENT


--- ---


```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}`


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


--- ---


### 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}`




--- ---


### Delete sessions
### Delete chat assistant's sessions


**DELETE** `/api/v1/chats/{chat_id}/sessions` **DELETE** `/api/v1/chats/{chat_id}/sessions`


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:

```text
```json
data: data:
{ {
"code": 0, "code": 0,
"data": true "data": true
} }
``` ```

::: :::


#### Request #### Request
#### Response #### Response


Success without `session_id`: Success without `session_id`:
```text
```json
data:{ data:{
"code": 0, "code": 0,
"message": "", "message": "",


Success with `session_id`: Success with `session_id`:


```text
```json
data:{ data:{
"code": 0, "code": 0,
"data": { "data": {
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:

```text
```json
data: data:
{ {
"code": 0, "code": 0,
"data": true "data": true
} }
``` ```

::: :::


#### Request #### Request
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": "",
``` ```
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": "",
} }
``` ```
Success with parameters in the `begin` component: Success with parameters in the `begin` component:
```text
```json
data:{ data:{
"code": 0, "code": 0,
"message": "", "message": "",


--- ---


## 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}`

+ 5
- 1
docs/references/python_api_reference.md View File



--- ---


## CHAT SESSIONS
## SESSION MANAGEMENT


--- ---




--- ---


## AGENT MANAGEMENT

---

### List agents ### List agents


```python ```python

Loading…
Cancel
Save