Skip to content

Commit 483f3aa

Browse files
authored
Update API reference to use 'title' instead of 'name' for listing agents (#9907)
### What problem does this PR solve? HTTP API documentation incorrectly refers `agent_name` as `name` instead of `title`. This PR updates that documentation with the correct terms. As per the codebase, the GET request for listing agents is accepting `title` as a parameter: https://github.com/infiniflow/ragflow/blob/9b026fc5b6f234a3abdf954f359bc2f9e99d9ba8/api/apps/sdk/agent.py#L32 This is referred to as `name` parameter in the HTTP API documentation ([link](https://ragflow.io/docs/dev/http_api_reference#list-documents)) ``` GET /api/v1/datasets/{dataset_id}/documents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&keywords={keywords}&id={document_id}&name={document_name}&create_time_from={timestamp}&create_time_to={timestamp} ``` Meanwhile, it is correctly mentioned in the Python API docs ([link](https://ragflow.io/docs/dev/python_api_reference#list-agents)): ``` RAGFlow.list_agents( page: int = 1, page_size: int = 30, orderby: str = "create_time", desc: bool = True, id: str = None, title: str = None ) -> List[Agent] ``` ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [ ] New Feature (non-breaking change which adds functionality) - [x] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
1 parent 72bb79e commit 483f3aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/references/http_api_reference.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3811,15 +3811,15 @@ Lists agents.
38113811
#### Request
38123812

38133813
- Method: GET
3814-
- URL: `/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={agent_name}&id={agent_id}`
3814+
- URL: `/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&title={agent_name}&id={agent_id}`
38153815
- Headers:
38163816
- `'Authorization: Bearer <YOUR_API_KEY>'`
38173817

38183818
##### Request example
38193819

38203820
```bash
38213821
curl --request GET \
3822-
--url http://{address}/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={agent_name}&id={agent_id} \
3822+
--url http://{address}/api/v1/agents?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&title={agent_name}&id={agent_id} \
38233823
--header 'Authorization: Bearer <YOUR_API_KEY>'
38243824
```
38253825

@@ -3837,7 +3837,7 @@ curl --request GET \
38373837
Indicates whether the retrieved agents should be sorted in descending order. Defaults to `true`.
38383838
- `id`: (*Filter parameter*), `string`
38393839
The ID of the agent to retrieve.
3840-
- `name`: (*Filter parameter*), `string`
3840+
- `title`: (*Filter parameter*), `string`
38413841
The name of the agent to retrieve.
38423842

38433843
#### Response

0 commit comments

Comments
 (0)