Fixed a docusaurus display issue (#3120)

### What problem does this PR solve?


### Type of change


- [x] Documentation Update
This commit is contained in:
writinwaters 2024-10-31 10:37:13 +08:00 committed by GitHub
parent 6c6b658ffe
commit 578f70817e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 52 additions and 58 deletions

View File

@ -27,7 +27,7 @@ Creates a dataset.
- URL: `/api/v1/datasets` - URL: `/api/v1/datasets`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name"`: `string` - `"name"`: `string`
- `"avatar"`: `string` - `"avatar"`: `string`
@ -44,7 +44,7 @@ Creates a dataset.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/datasets \ --url http://{address}/api/v1/datasets \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data '{ --data '{
"name": "test_1" "name": "test_1"
}' }'
@ -175,7 +175,7 @@ Deletes datasets by ID.
- URL: `/api/v1/datasets` - URL: `/api/v1/datasets`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"ids"`: `list[string]` - `"ids"`: `list[string]`
@ -185,7 +185,7 @@ Deletes datasets by ID.
curl --request DELETE \ curl --request DELETE \
--url http://{address}/api/v1/datasets \ --url http://{address}/api/v1/datasets \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data '{"ids": ["test_1", "test_2"]}' --data '{"ids": ["test_1", "test_2"]}'
``` ```
@ -227,7 +227,7 @@ Updates configurations for a specified dataset.
- URL: `/api/v1/datasets/{dataset_id}` - URL: `/api/v1/datasets/{dataset_id}`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name"`: `string` - `"name"`: `string`
- `"embedding_model"`: `string` - `"embedding_model"`: `string`
@ -239,7 +239,7 @@ Updates configurations for a specified dataset.
curl --request PUT \ curl --request PUT \
--url http://{address}/api/v1/datasets/{dataset_id} \ --url http://{address}/api/v1/datasets/{dataset_id} \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"name": "updated_dataset", "name": "updated_dataset",
@ -301,14 +301,14 @@ Lists datasets.
- Method: GET - Method: GET
- URL: `/api/v1/datasets?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id}` - URL: `/api/v1/datasets?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id}`
- Headers: - Headers:
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
#### Request example #### Request example
```bash ```bash
curl --request GET \ curl --request GET \
--url http://{address}/api/v1/datasets?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id} \ --url http://{address}/api/v1/datasets?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' --header 'Authorization: Bearer <YOUR_API_KE>'
``` ```
#### Request parameters #### Request parameters
@ -402,7 +402,7 @@ Uploads documents to a specified dataset.
- URL: `/api/v1/datasets/{dataset_id}/documents` - URL: `/api/v1/datasets/{dataset_id}/documents`
- Headers: - Headers:
- `'Content-Type: multipart/form-data'` - `'Content-Type: multipart/form-data'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Form: - Form:
- `'file=@{FILE_PATH}'` - `'file=@{FILE_PATH}'`
@ -412,7 +412,7 @@ Uploads documents to a specified dataset.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/datasets/{dataset_id}/documents \ --url http://{address}/api/v1/datasets/{dataset_id}/documents \
--header 'Content-Type: multipart/form-data' \ --header 'Content-Type: multipart/form-data' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--form 'file=@./test1.txt' \ --form 'file=@./test1.txt' \
--form 'file=@./test2.pdf' --form 'file=@./test2.pdf'
``` ```
@ -480,7 +480,7 @@ Updates configurations for a specified document.
- URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}` - URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name"`:`string` - `"name"`:`string`
- `"chunk_method"`:`string` - `"chunk_method"`:`string`
@ -491,7 +491,7 @@ Updates configurations for a specified document.
```bash ```bash
curl --request PUT \ curl --request PUT \
--url http://{address}/api/v1/datasets/{dataset_id}/info/{document_id} \ --url http://{address}/api/v1/datasets/{dataset_id}/info/{document_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--data ' --data '
{ {
@ -572,7 +572,7 @@ Downloads a document from a specified dataset.
- Method: GET - Method: GET
- URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}` - URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}`
- Headers: - Headers:
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Output: - Output:
- `'{PATH_TO_THE_FILE}'` - `'{PATH_TO_THE_FILE}'`
@ -581,7 +581,7 @@ Downloads a document from a specified dataset.
```bash ```bash
curl --request GET \ curl --request GET \
--url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id} \ --url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--output ./ragflow.txt --output ./ragflow.txt
``` ```
@ -623,14 +623,14 @@ Lists documents in a specified dataset.
- URL: `/api/v1/datasets/{dataset_id}/documents?keywords={keyword}&page={page}&page_size={limit}&orderby={orderby}&desc={desc}&name={name}` - URL: `/api/v1/datasets/{dataset_id}/documents?keywords={keyword}&page={page}&page_size={limit}&orderby={orderby}&desc={desc}&name={name}`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
#### Request example #### Request example
```bash ```bash
curl --request GET \ curl --request GET \
--url http://{address}/api/v1/datasets/{dataset_id}/documents?keywords={keywords}&offset={offset}&limit={limit}&orderby={orderby}&desc={desc}&id={document_id} \ --url http://{address}/api/v1/datasets/{dataset_id}/documents?keywords={keywords}&offset={offset}&limit={limit}&orderby={orderby}&desc={desc}&id={document_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' --header 'Authorization: Bearer <YOUR_API_KE>'
``` ```
#### Request parameters #### Request parameters
@ -720,7 +720,7 @@ Deletes documents by ID.
- URL: `/api/v1/datasets/{dataset_id}/documents` - URL: `/api/v1/datasets/{dataset_id}/documents`
- Headers: - Headers:
- `'Content-Type: application/json'` - `'Content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"ids"`: `list[string]` - `"ids"`: `list[string]`
@ -730,7 +730,7 @@ Deletes documents by ID.
curl --request DELETE \ curl --request DELETE \
--url http://{address}/api/v1/datasets/{dataset_id}/documents \ --url http://{address}/api/v1/datasets/{dataset_id}/documents \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: {YOUR_API_KEY}' \ --header 'Authorization: <YOUR_API_KE>' \
--data ' --data '
{ {
"ids": ["id_1","id_2"] "ids": ["id_1","id_2"]
@ -777,7 +777,7 @@ Parses documents in a specified dataset.
- URL: `/api/v1/datasets/{dataset_id}/chunks` - URL: `/api/v1/datasets/{dataset_id}/chunks`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- 'Authorization: Bearer {YOUR_API_KEY}' - 'Authorization: Bearer <YOUR_API_KE>'
- Body: - Body:
- `"document_ids"`: `list[string]` - `"document_ids"`: `list[string]`
@ -787,7 +787,7 @@ Parses documents in a specified dataset.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/datasets/{dataset_id}/chunks \ --url http://{address}/api/v1/datasets/{dataset_id}/chunks \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"document_ids": ["97a5f1c2759811efaa500242ac120004","97ad64b6759811ef9fc30242ac120004"] "document_ids": ["97a5f1c2759811efaa500242ac120004","97ad64b6759811ef9fc30242ac120004"]
@ -834,7 +834,7 @@ Stops parsing specified documents.
- URL: `/api/v1/datasets/{dataset_id}/chunks` - URL: `/api/v1/datasets/{dataset_id}/chunks`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"document_ids"`: `list[string]` - `"document_ids"`: `list[string]`
@ -844,7 +844,7 @@ Stops parsing specified documents.
curl --request DELETE \ curl --request DELETE \
--url http://{address}/api/v1/datasets/{dataset_id}/chunks \ --url http://{address}/api/v1/datasets/{dataset_id}/chunks \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"document_ids": ["97a5f1c2759811efaa500242ac120004","97ad64b6759811ef9fc30242ac120004"] "document_ids": ["97a5f1c2759811efaa500242ac120004","97ad64b6759811ef9fc30242ac120004"]
@ -891,7 +891,7 @@ Adds a chunk to a specified document in a specified dataset.
- URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks` - URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"content"`: `string` - `"content"`: `string`
- `"important_keywords"`: `list[string]` - `"important_keywords"`: `list[string]`
@ -902,7 +902,7 @@ Adds a chunk to a specified document in a specified dataset.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks \ --url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"content": "<SOME_CHUNK_CONTENT_HERE>" "content": "<SOME_CHUNK_CONTENT_HERE>"
@ -965,14 +965,14 @@ Lists chunks in a specified document.
- Method: GET - Method: GET
- URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks?keywords={keywords}&offset={offset}&limit={limit}&id={chunk_id}` - URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks?keywords={keywords}&offset={offset}&limit={limit}&id={chunk_id}`
- Headers: - Headers:
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
#### Request example #### Request example
```bash ```bash
curl --request GET \ curl --request GET \
--url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks?keywords={keywords}&offset={offset}&limit={limit}&id={chunk_id} \ --url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks?keywords={keywords}&offset={offset}&limit={limit}&id={chunk_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' --header 'Authorization: Bearer <YOUR_API_KE>'
``` ```
#### Request parameters #### Request parameters
@ -1073,7 +1073,7 @@ Deletes chunks by ID.
- URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks` - URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"chunk_ids"`: `list[string]` - `"chunk_ids"`: `list[string]`
@ -1083,7 +1083,7 @@ Deletes chunks by ID.
curl --request DELETE \ curl --request DELETE \
--url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks \ --url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"chunk_ids": ["test_1", "test_2"] "chunk_ids": ["test_1", "test_2"]
@ -1132,7 +1132,7 @@ Updates content or configurations for a specified chunk.
- URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks/{chunk_id}` - URL: `/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks/{chunk_id}`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"content"`: `string` - `"content"`: `string`
- `"important_keywords"`: `string` - `"important_keywords"`: `string`
@ -1144,7 +1144,7 @@ Updates content or configurations for a specified chunk.
curl --request PUT \ curl --request PUT \
--url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks/{chunk_id} \ --url http://{address}/api/v1/datasets/{dataset_id}/documents/{document_id}/chunks/{chunk_id} \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: {YOUR_API_KEY}' \ --header 'Authorization: <YOUR_API_KE>' \
--data ' --data '
{ {
"content": "ragflow123", "content": "ragflow123",
@ -1202,7 +1202,7 @@ Retrieves chunks from specified datasets.
- URL: `/api/v1/retrieval` - URL: `/api/v1/retrieval`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"question"`: `string` - `"question"`: `string`
- `"dataset_ids"`: `list[string]` - `"dataset_ids"`: `list[string]`
@ -1222,7 +1222,7 @@ Retrieves chunks from specified datasets.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/retrieval \ --url http://{address}/api/v1/retrieval \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: {YOUR_API_KEY}' \ --header 'Authorization: <YOUR_API_KE>' \
--data ' --data '
{ {
"question": "What is advantage of ragflow?", "question": "What is advantage of ragflow?",
@ -1330,7 +1330,7 @@ Creates a chat assistant.
- URL: `/api/v1/chats` - URL: `/api/v1/chats`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name"`: `string` - `"name"`: `string`
- `"avatar"`: `string` - `"avatar"`: `string`
@ -1344,7 +1344,7 @@ Creates a chat assistant.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/chats \ --url http://{address}/api/v1/chats \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' --header 'Authorization: Bearer <YOUR_API_KE>'
--data '{ --data '{
"dataset_ids": ["0b2cbc8c877f11ef89070242ac120005"], "dataset_ids": ["0b2cbc8c877f11ef89070242ac120005"],
"name":"new_chat_1" "name":"new_chat_1"
@ -1466,7 +1466,7 @@ Updates configurations for a specified chat assistant.
- URL: `/api/v1/chats/{chat_id}` - URL: `/api/v1/chats/{chat_id}`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name"`: `string` - `"name"`: `string`
- `"avatar"`: `string` - `"avatar"`: `string`
@ -1480,7 +1480,7 @@ Updates configurations for a specified chat assistant.
curl --request PUT \ curl --request PUT \
--url http://{address}/api/v1/chats/{chat_id} \ --url http://{address}/api/v1/chats/{chat_id} \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"name":"Test" "name":"Test"
@ -1562,7 +1562,7 @@ Deletes chat assistants by ID.
- URL: `/api/v1/chats` - URL: `/api/v1/chats`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"ids"`: `list[string]` - `"ids"`: `list[string]`
@ -1572,7 +1572,7 @@ Deletes chat assistants by ID.
curl --request DELETE \ curl --request DELETE \
--url http://{address}/api/v1/chats \ --url http://{address}/api/v1/chats \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"ids": ["test_1", "test_2"] "ids": ["test_1", "test_2"]
@ -1616,14 +1616,14 @@ Lists chat assistants.
- Method: GET - Method: GET
- URL: `/api/v1/chats?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id}` - URL: `/api/v1/chats?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id}`
- Headers: - Headers:
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
#### Request example #### Request example
```bash ```bash
curl --request GET \ curl --request GET \
--url http://{address}/api/v1/chats?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id} \ --url http://{address}/api/v1/chats?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={dataset_name}&id={dataset_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' --header 'Authorization: Bearer <YOUR_API_KE>'
``` ```
#### Request parameters #### Request parameters
@ -1716,7 +1716,7 @@ Creates a chat session.
- URL: `/api/v1/chats/{chat_id}/sessions` - URL: `/api/v1/chats/{chat_id}/sessions`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name"`: `string` - `"name"`: `string`
@ -1726,7 +1726,7 @@ Creates a chat session.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/chats/{chat_id}/sessions \ --url http://{address}/api/v1/chats/{chat_id}/sessions \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"name": "new session" "name": "new session"
@ -1788,7 +1788,7 @@ Updates a chat session.
- URL: `/api/v1/chats/{chat_id}/sessions/{session_id}` - URL: `/api/v1/chats/{chat_id}/sessions/{session_id}`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"name`: string - `"name`: string
@ -1797,7 +1797,7 @@ Updates a chat session.
curl --request PUT \ curl --request PUT \
--url http://{address}/api/v1/chats/{chat_id}/sessions/{session_id} \ --url http://{address}/api/v1/chats/{chat_id}/sessions/{session_id} \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data ' --data '
{ {
"name": "<REVISED_SESSION_NAME_HERE>" "name": "<REVISED_SESSION_NAME_HERE>"
@ -1845,14 +1845,14 @@ Lists sessions associated with a specified chat assistant.
- Method: GET - Method: GET
- URL: `/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id}` - URL: `/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id}`
- Headers: - Headers:
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
#### Request example #### Request example
```bash ```bash
curl --request GET \ curl --request GET \
--url http://{address}/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id} \ --url http://{address}/api/v1/chats/{chat_id}/sessions?page={page}&page_size={page_size}&orderby={orderby}&desc={desc}&name={session_name}&id={session_id} \
--header 'Authorization: Bearer {YOUR_API_KEY}' --header 'Authorization: Bearer <YOUR_API_KE>'
``` ```
#### Request Parameters #### Request Parameters
@ -1924,7 +1924,7 @@ Deletes sessions by ID.
- URL: `/api/v1/chats/{chat_id}/sessions` - URL: `/api/v1/chats/{chat_id}/sessions`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"ids"`: `list[string]` - `"ids"`: `list[string]`
@ -1935,7 +1935,7 @@ Deletes sessions by ID.
curl --request DELETE \ curl --request DELETE \
--url http://{address}/api/v1/chats/{chat_id}/sessions \ --url http://{address}/api/v1/chats/{chat_id}/sessions \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bear {YOUR_API_KEY}' \ --header 'Authorization: Bear <YOUR_API_KE>' \
--data ' --data '
{ {
"ids": ["test_1", "test_2"] "ids": ["test_1", "test_2"]
@ -1982,7 +1982,7 @@ Asks a question to start an AI-powered conversation.
- URL: `/api/v1/chats/{chat_id}/completions` - URL: `/api/v1/chats/{chat_id}/completions`
- Headers: - Headers:
- `'content-Type: application/json'` - `'content-Type: application/json'`
- `'Authorization: Bearer {YOUR_API_KEY}'` - `'Authorization: Bearer <YOUR_API_KE>'`
- Body: - Body:
- `"question"`: `string` - `"question"`: `string`
- `"stream"`: `boolean` - `"stream"`: `boolean`
@ -1994,7 +1994,7 @@ Asks a question to start an AI-powered conversation.
curl --request POST \ curl --request POST \
--url http://{address}/api/v1/chats/{chat_id}/completions \ --url http://{address}/api/v1/chats/{chat_id}/completions \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'Authorization: Bearer {YOUR_API_KEY}' \ --header 'Authorization: Bearer <YOUR_API_KE>' \
--data-binary ' --data-binary '
{ {
"question": "What is RAGFlow?", "question": "What is RAGFlow?",

View File

@ -961,10 +961,7 @@ Instructions for the LLM to follow. A `Prompt` object contains the following at
- `empty_response`: `str` If nothing is retrieved in the dataset for the user's question, this will be used as the response. To allow the LLM to improvise when nothing is found, leave this blank. Defaults to `None`. - `empty_response`: `str` If nothing is retrieved in the dataset for the user's question, this will be used as the response. To allow the LLM to improvise when nothing is found, leave this blank. Defaults to `None`.
- `opener`: `str` The opening greeting for the user. Defaults to `"Hi! I am your assistant, can I help you?"`. - `opener`: `str` The opening greeting for the user. Defaults to `"Hi! I am your assistant, can I help you?"`.
- `show_quote`: `bool` Indicates whether the source of text should be displayed. Defaults to `True`. - `show_quote`: `bool` Indicates whether the source of text should be displayed. Defaults to `True`.
- `prompt`: `str` The prompt content. Defaults to `You are an intelligent assistant. Please summarize the content of the dataset to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence "The answer you are looking for is not found in the knowledge base!" Answers need to consider chat history. - `prompt`: `str` The prompt content.
Here is the knowledge base:
{knowledge}
The above is the knowledge base.`
### Returns ### Returns
@ -1022,10 +1019,7 @@ A dictionary representing the attributes to update, with the following keys:
- `"empty_response"`: `str` If nothing is retrieved in the dataset for the user's question, this will be used as the response. To allow the LLM to improvise when nothing is retrieved, leave this blank. Defaults to `None`. - `"empty_response"`: `str` If nothing is retrieved in the dataset for the user's question, this will be used as the response. To allow the LLM to improvise when nothing is retrieved, leave this blank. Defaults to `None`.
- `"opener"`: `str` The opening greeting for the user. Defaults to `"Hi! I am your assistant, can I help you?"`. - `"opener"`: `str` The opening greeting for the user. Defaults to `"Hi! I am your assistant, can I help you?"`.
- `"show_quote`: `bool` Indicates whether the source of text should be displayed Defaults to `True`. - `"show_quote`: `bool` Indicates whether the source of text should be displayed Defaults to `True`.
- `"prompt"`: `str` The prompt content. Defaults to `You are an intelligent assistant. Please summarize the content of the knowledge base to answer the question. Please list the data in the knowledge base and answer in detail. When all knowledge base content is irrelevant to the question, your answer must include the sentence "The answer you are looking for is not found in the knowledge base!" Answers need to consider chat history. - `"prompt"`: `str` The prompt content.
Here is the knowledge base:
{knowledge}
The above is the knowledge base.`.
### Returns ### Returns