mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat(api): Add dsl parameters to control whether dsl fields are included (#5769)
1. **Issue**: When calling `list_agent_session` via the HTTP API, users may only need to display conversation messages, and do not want to see the associated dsl, which can be very large. Therefore, consider adding a control option to determine whether the DSL should be returned, with the default being to return it. 2. **Documentation Discrepancy**: In the HTTP API documentation, under "List agent sessions," the "Response" section states that the "data" field is a dictionary when "success" is returned. However, the actual returned data is a list. This discrepancy has been corrected.
This commit is contained in:
@ -2716,7 +2716,7 @@ Failure:
|
||||
|
||||
### List agent sessions
|
||||
|
||||
**GET** `/api/v1/agents/{agent_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&id={session_id}&user_id={user_id}`
|
||||
**GET** `/api/v1/agents/{agent_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&id={session_id}&user_id={user_id}&dsl={dsl}`
|
||||
|
||||
Lists sessions associated with a specified agent.
|
||||
|
||||
@ -2753,7 +2753,9 @@ curl --request GET \
|
||||
The ID of the agent session to retrieve.
|
||||
- `user_id`: (*Filter parameter*), `string`
|
||||
The optional user-defined ID passed in when creating session.
|
||||
|
||||
- `dsl`: (*Filter parameter*), `boolean`
|
||||
Indicates whether to include the dsl field of the sessions in the response. Defaults to `true`.
|
||||
|
||||
#### Response
|
||||
|
||||
Success:
|
||||
@ -2761,7 +2763,7 @@ Success:
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"data": {
|
||||
"data": [{
|
||||
"agent_id": "e9e2b9c2b2f911ef801d0242ac120006",
|
||||
"dsl": {
|
||||
"answer": [],
|
||||
@ -2893,7 +2895,7 @@ Success:
|
||||
],
|
||||
"source": "agent",
|
||||
"user_id": ""
|
||||
}
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user