writinwaters
commited on
Commit
·
3327e72
1
Parent(s):
5e03e67
Separated list_agents() from session management (#4111)
Browse files### What problem does this PR solve?
### Type of change
- [x] Documentation Update
docs/references/http_api_reference.md
CHANGED
|
@@ -600,7 +600,7 @@ curl --request GET \
|
|
| 600 |
|
| 601 |
Success:
|
| 602 |
|
| 603 |
-
```
|
| 604 |
This is a test to verify the file download feature.
|
| 605 |
```
|
| 606 |
|
|
@@ -1702,7 +1702,7 @@ Failure:
|
|
| 1702 |
|
| 1703 |
---
|
| 1704 |
|
| 1705 |
-
##
|
| 1706 |
|
| 1707 |
---
|
| 1708 |
|
|
@@ -1772,13 +1772,13 @@ Failure:
|
|
| 1772 |
```json
|
| 1773 |
{
|
| 1774 |
"code": 102,
|
| 1775 |
-
"message": "Name
|
| 1776 |
}
|
| 1777 |
```
|
| 1778 |
|
| 1779 |
---
|
| 1780 |
|
| 1781 |
-
### Update session
|
| 1782 |
|
| 1783 |
**PUT** `/api/v1/chats/{chat_id}/sessions/{session_id}`
|
| 1784 |
|
|
@@ -1813,7 +1813,7 @@ curl --request PUT \
|
|
| 1813 |
The ID of the associated chat assistant.
|
| 1814 |
- `session_id`: (*Path parameter*)
|
| 1815 |
The ID of the session to update.
|
| 1816 |
-
- `"name"`: (*Body Parameter), `string`
|
| 1817 |
The revised name of the session.
|
| 1818 |
|
| 1819 |
#### Response
|
|
@@ -1837,7 +1837,7 @@ Failure:
|
|
| 1837 |
|
| 1838 |
---
|
| 1839 |
|
| 1840 |
-
### List sessions
|
| 1841 |
|
| 1842 |
**GET** `/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id}`
|
| 1843 |
|
|
@@ -1915,7 +1915,7 @@ Failure:
|
|
| 1915 |
|
| 1916 |
---
|
| 1917 |
|
| 1918 |
-
### Delete sessions
|
| 1919 |
|
| 1920 |
**DELETE** `/api/v1/chats/{chat_id}/sessions`
|
| 1921 |
|
|
@@ -1979,18 +1979,15 @@ Failure:
|
|
| 1979 |
Asks a specified chat assistant a question to start an AI-powered conversation.
|
| 1980 |
|
| 1981 |
:::tip NOTE
|
| 1982 |
-
|
| 1983 |
- In streaming mode, not all responses include a reference, as this depends on the system's judgement.
|
| 1984 |
- In streaming mode, the last message is an empty message:
|
| 1985 |
-
|
| 1986 |
-
```text
|
| 1987 |
data:
|
| 1988 |
{
|
| 1989 |
"code": 0,
|
| 1990 |
"data": true
|
| 1991 |
}
|
| 1992 |
```
|
| 1993 |
-
|
| 1994 |
:::
|
| 1995 |
|
| 1996 |
#### Request
|
|
@@ -2045,7 +2042,7 @@ curl --request POST \
|
|
| 2045 |
#### Response
|
| 2046 |
|
| 2047 |
Success without `session_id`:
|
| 2048 |
-
```
|
| 2049 |
data:{
|
| 2050 |
"code": 0,
|
| 2051 |
"message": "",
|
|
@@ -2066,7 +2063,7 @@ data:{
|
|
| 2066 |
|
| 2067 |
Success with `session_id`:
|
| 2068 |
|
| 2069 |
-
```
|
| 2070 |
data:{
|
| 2071 |
"code": 0,
|
| 2072 |
"data": {
|
|
@@ -2305,18 +2302,15 @@ Failure:
|
|
| 2305 |
Asks a specified agent a question to start an AI-powered conversation.
|
| 2306 |
|
| 2307 |
:::tip NOTE
|
| 2308 |
-
|
| 2309 |
- In streaming mode, not all responses include a reference, as this depends on the system's judgement.
|
| 2310 |
- In streaming mode, the last message is an empty message:
|
| 2311 |
-
|
| 2312 |
-
```text
|
| 2313 |
data:
|
| 2314 |
{
|
| 2315 |
"code": 0,
|
| 2316 |
"data": true
|
| 2317 |
}
|
| 2318 |
```
|
| 2319 |
-
|
| 2320 |
:::
|
| 2321 |
|
| 2322 |
#### Request
|
|
@@ -2383,7 +2377,7 @@ curl --request POST \
|
|
| 2383 |
The parameters in the begin component.
|
| 2384 |
#### Response
|
| 2385 |
success without `session_id` provided and with no parameters in the `begin` component:
|
| 2386 |
-
```
|
| 2387 |
data:{
|
| 2388 |
"code": 0,
|
| 2389 |
"message": "",
|
|
@@ -2402,7 +2396,7 @@ data:{
|
|
| 2402 |
```
|
| 2403 |
Success with `session_id` provided and with no parameters in the `begin` component:
|
| 2404 |
|
| 2405 |
-
```
|
| 2406 |
data:{
|
| 2407 |
"code": 0,
|
| 2408 |
"message": "",
|
|
@@ -2509,7 +2503,7 @@ data:{
|
|
| 2509 |
}
|
| 2510 |
```
|
| 2511 |
Success with parameters in the `begin` component:
|
| 2512 |
-
```
|
| 2513 |
data:{
|
| 2514 |
"code": 0,
|
| 2515 |
"message": "",
|
|
@@ -2791,6 +2785,10 @@ Failure:
|
|
| 2791 |
|
| 2792 |
---
|
| 2793 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2794 |
### List agents
|
| 2795 |
|
| 2796 |
**GET** `/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={agent_name}&id={agent_id}`
|
|
|
|
| 600 |
|
| 601 |
Success:
|
| 602 |
|
| 603 |
+
```json
|
| 604 |
This is a test to verify the file download feature.
|
| 605 |
```
|
| 606 |
|
|
|
|
| 1702 |
|
| 1703 |
---
|
| 1704 |
|
| 1705 |
+
## SESSION MANAGEMENT
|
| 1706 |
|
| 1707 |
---
|
| 1708 |
|
|
|
|
| 1772 |
```json
|
| 1773 |
{
|
| 1774 |
"code": 102,
|
| 1775 |
+
"message": "Name cannot be empty."
|
| 1776 |
}
|
| 1777 |
```
|
| 1778 |
|
| 1779 |
---
|
| 1780 |
|
| 1781 |
+
### Update chat assistant's session
|
| 1782 |
|
| 1783 |
**PUT** `/api/v1/chats/{chat_id}/sessions/{session_id}`
|
| 1784 |
|
|
|
|
| 1813 |
The ID of the associated chat assistant.
|
| 1814 |
- `session_id`: (*Path parameter*)
|
| 1815 |
The ID of the session to update.
|
| 1816 |
+
- `"name"`: (*Body Parameter*), `string`
|
| 1817 |
The revised name of the session.
|
| 1818 |
|
| 1819 |
#### Response
|
|
|
|
| 1837 |
|
| 1838 |
---
|
| 1839 |
|
| 1840 |
+
### List chat assistant's sessions
|
| 1841 |
|
| 1842 |
**GET** `/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id}`
|
| 1843 |
|
|
|
|
| 1915 |
|
| 1916 |
---
|
| 1917 |
|
| 1918 |
+
### Delete chat assistant's sessions
|
| 1919 |
|
| 1920 |
**DELETE** `/api/v1/chats/{chat_id}/sessions`
|
| 1921 |
|
|
|
|
| 1979 |
Asks a specified chat assistant a question to start an AI-powered conversation.
|
| 1980 |
|
| 1981 |
:::tip NOTE
|
|
|
|
| 1982 |
- In streaming mode, not all responses include a reference, as this depends on the system's judgement.
|
| 1983 |
- In streaming mode, the last message is an empty message:
|
| 1984 |
+
```json
|
|
|
|
| 1985 |
data:
|
| 1986 |
{
|
| 1987 |
"code": 0,
|
| 1988 |
"data": true
|
| 1989 |
}
|
| 1990 |
```
|
|
|
|
| 1991 |
:::
|
| 1992 |
|
| 1993 |
#### Request
|
|
|
|
| 2042 |
#### Response
|
| 2043 |
|
| 2044 |
Success without `session_id`:
|
| 2045 |
+
```json
|
| 2046 |
data:{
|
| 2047 |
"code": 0,
|
| 2048 |
"message": "",
|
|
|
|
| 2063 |
|
| 2064 |
Success with `session_id`:
|
| 2065 |
|
| 2066 |
+
```json
|
| 2067 |
data:{
|
| 2068 |
"code": 0,
|
| 2069 |
"data": {
|
|
|
|
| 2302 |
Asks a specified agent a question to start an AI-powered conversation.
|
| 2303 |
|
| 2304 |
:::tip NOTE
|
|
|
|
| 2305 |
- In streaming mode, not all responses include a reference, as this depends on the system's judgement.
|
| 2306 |
- In streaming mode, the last message is an empty message:
|
| 2307 |
+
```json
|
|
|
|
| 2308 |
data:
|
| 2309 |
{
|
| 2310 |
"code": 0,
|
| 2311 |
"data": true
|
| 2312 |
}
|
| 2313 |
```
|
|
|
|
| 2314 |
:::
|
| 2315 |
|
| 2316 |
#### Request
|
|
|
|
| 2377 |
The parameters in the begin component.
|
| 2378 |
#### Response
|
| 2379 |
success without `session_id` provided and with no parameters in the `begin` component:
|
| 2380 |
+
```json
|
| 2381 |
data:{
|
| 2382 |
"code": 0,
|
| 2383 |
"message": "",
|
|
|
|
| 2396 |
```
|
| 2397 |
Success with `session_id` provided and with no parameters in the `begin` component:
|
| 2398 |
|
| 2399 |
+
```json
|
| 2400 |
data:{
|
| 2401 |
"code": 0,
|
| 2402 |
"message": "",
|
|
|
|
| 2503 |
}
|
| 2504 |
```
|
| 2505 |
Success with parameters in the `begin` component:
|
| 2506 |
+
```json
|
| 2507 |
data:{
|
| 2508 |
"code": 0,
|
| 2509 |
"message": "",
|
|
|
|
| 2785 |
|
| 2786 |
---
|
| 2787 |
|
| 2788 |
+
## AGENT MANAGEMENT
|
| 2789 |
+
|
| 2790 |
+
---
|
| 2791 |
+
|
| 2792 |
### List agents
|
| 2793 |
|
| 2794 |
**GET** `/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={agent_name}&id={agent_id}`
|
docs/references/python_api_reference.md
CHANGED
|
@@ -1139,7 +1139,7 @@ for assistant in rag_object.list_chats():
|
|
| 1139 |
|
| 1140 |
---
|
| 1141 |
|
| 1142 |
-
##
|
| 1143 |
|
| 1144 |
---
|
| 1145 |
|
|
@@ -1576,6 +1576,10 @@ for session in sessions:
|
|
| 1576 |
|
| 1577 |
---
|
| 1578 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1579 |
### List agents
|
| 1580 |
|
| 1581 |
```python
|
|
|
|
| 1139 |
|
| 1140 |
---
|
| 1141 |
|
| 1142 |
+
## SESSION MANAGEMENT
|
| 1143 |
|
| 1144 |
---
|
| 1145 |
|
|
|
|
| 1576 |
|
| 1577 |
---
|
| 1578 |
|
| 1579 |
+
## AGENT MANAGEMENT
|
| 1580 |
+
|
| 1581 |
+
---
|
| 1582 |
+
|
| 1583 |
### List agents
|
| 1584 |
|
| 1585 |
```python
|