{"id":50412359,"url":"https://github.com/cskwork/chat-with-ragflow","last_synced_at":"2026-05-31T04:04:58.158Z","repository":{"id":283243708,"uuid":"951132241","full_name":"cskwork/chat-with-ragflow","owner":"cskwork","description":"basic frontend api to chat with ragflow","archived":false,"fork":false,"pushed_at":"2025-03-19T07:59:50.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T08:35:10.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cskwork.png","metadata":{"files":{"readme":"README-ragflow-doc.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-19T07:59:15.000Z","updated_at":"2025-03-19T07:59:53.000Z","dependencies_parsed_at":"2025-03-19T08:46:51.947Z","dependency_job_id":null,"html_url":"https://github.com/cskwork/chat-with-ragflow","commit_stats":null,"previous_names":["cskwork/chat-with-ragflow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cskwork/chat-with-ragflow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fchat-with-ragflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fchat-with-ragflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fchat-with-ragflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fchat-with-ragflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cskwork","download_url":"https://codeload.github.com/cskwork/chat-with-ragflow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cskwork%2Fchat-with-ragflow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33718498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T04:04:57.638Z","updated_at":"2026-05-31T04:04:58.152Z","avatar_url":"https://github.com/cskwork.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"SESSION MANAGEMENT\nCreate session with chat assistant\nPOST /api/v1/chats/{chat_id}/sessions\n\nCreates a session with a chat assistant.\n\nRequest\nMethod: POST\nURL: /api/v1/chats/{chat_id}/sessions\nHeaders:\n'content-Type: application/json'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\n\"name\": string\n\"user_id\": string (optional)\nRequest example\ncurl --request POST \\\n     --url http://{address}/api/v1/chats/{chat_id}/sessions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data '\n     {\n          \"name\": \"new session\"\n     }'\nRequest parameters\nchat_id: (Path parameter)\nThe ID of the associated chat assistant.\n\"name\": (Body parameter), string\nThe name of the chat session to create.\n\"user_id\": (Body parameter), string\nOptional user-defined ID.\nResponse\nSuccess:\n\n{\n    \"code\": 0,\n    \"data\": {\n        \"chat_id\": \"2ca4b22e878011ef88fe0242ac120005\",\n        \"create_date\": \"Fri, 11 Oct 2024 08:46:14 GMT\",\n        \"create_time\": 1728636374571,\n        \"id\": \"4606b4ec87ad11efbc4f0242ac120006\",\n        \"messages\": [\n            {\n                \"content\": \"Hi! I am your assistant，can I help you?\",\n                \"role\": \"assistant\"\n            }\n        ],\n        \"name\": \"new session\",\n        \"update_date\": \"Fri, 11 Oct 2024 08:46:14 GMT\",\n        \"update_time\": 1728636374571\n    }\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"Name cannot be empty.\"\n}\nUpdate chat assistant's session\nPUT /api/v1/chats/{chat_id}/sessions/{session_id}\n\nUpdates a session of a specified chat assistant.\n\nRequest\nMethod: PUT\nURL: /api/v1/chats/{chat_id}/sessions/{session_id}\nHeaders:\n'content-Type: application/json'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\n\"name: string\n\"user_id: string (optional)\nRequest example\ncurl --request PUT \\\n     --url http://{address}/api/v1/chats/{chat_id}/sessions/{session_id} \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data '\n     {\n          \"name\": \"\u003cREVISED_SESSION_NAME_HERE\u003e\"\n     }'\nRequest Parameter\nchat_id: (Path parameter)\nThe ID of the associated chat assistant.\nsession_id: (Path parameter)\nThe ID of the session to update.\n\"name\": (Body Parameter), string\nThe revised name of the session.\n\"user_id\": (Body parameter), string\nOptional user-defined ID.\nResponse\nSuccess:\n\n{\n    \"code\": 0\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"Name cannot be empty.\"\n}\nList chat assistant's sessions\nGET /api/v1/chats/{chat_id}/sessions?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026name={session_name}\u0026id={session_id}\n\nLists sessions associated with a specified chat assistant.\n\nRequest\nMethod: GET\nURL: /api/v1/chats/{chat_id}/sessions?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026name={session_name}\u0026id={session_id}\u0026user_id={user_id}\nHeaders:\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nRequest example\ncurl --request GET \\\n     --url http://{address}/api/v1/chats/{chat_id}/sessions?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026name={session_name}\u0026id={session_id} \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nRequest Parameters\nchat_id: (Path parameter)\nThe ID of the associated chat assistant.\npage: (Filter parameter), integer\nSpecifies the page on which the sessions will be displayed. Defaults to 1.\npage_size: (Filter parameter), integer\nThe number of sessions on each page. Defaults to 30.\norderby: (Filter parameter), string\nThe field by which sessions should be sorted. Available options:\ncreate_time (default)\nupdate_time\ndesc: (Filter parameter), boolean\nIndicates whether the retrieved sessions should be sorted in descending order. Defaults to true.\nname: (Filter parameter) string\nThe name of the chat session to retrieve.\nid: (Filter parameter), string\nThe ID of the chat session to retrieve.\nuser_id: (Filter parameter), string\nThe optional user-defined ID passed in when creating session.\nResponse\nSuccess:\n\n{\n    \"code\": 0,\n    \"data\": [\n        {\n            \"chat\": \"2ca4b22e878011ef88fe0242ac120005\",\n            \"create_date\": \"Fri, 11 Oct 2024 08:46:43 GMT\",\n            \"create_time\": 1728636403974,\n            \"id\": \"578d541e87ad11ef96b90242ac120006\",\n            \"messages\": [\n                {\n                    \"content\": \"Hi! I am your assistant，can I help you?\",\n                    \"role\": \"assistant\"\n                }\n            ],\n            \"name\": \"new session\",\n            \"update_date\": \"Fri, 11 Oct 2024 08:46:43 GMT\",\n            \"update_time\": 1728636403974\n        }\n    ]\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"The session doesn't exist\"\n}\nDelete chat assistant's sessions\nDELETE /api/v1/chats/{chat_id}/sessions\n\nDeletes sessions of a chat assistant by ID.\n\nRequest\nMethod: DELETE\nURL: /api/v1/chats/{chat_id}/sessions\nHeaders:\n'content-Type: application/json'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\n\"ids\": list[string]\nRequest example\ncurl --request DELETE \\\n     --url http://{address}/api/v1/chats/{chat_id}/sessions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data '\n     {\n          \"ids\": [\"test_1\", \"test_2\"]\n     }'\nRequest Parameters\nchat_id: (Path parameter)\nThe ID of the associated chat assistant.\n\"ids\": (Body Parameter), list[string]\nThe IDs of the sessions to delete. If it is not specified, all sessions associated with the specified chat assistant will be deleted.\nResponse\nSuccess:\n\n{\n    \"code\": 0\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"The chat doesn't own the session\"\n}\nConverse with chat assistant\nPOST /api/v1/chats/{chat_id}/completions\n\nAsks a specified chat assistant a question to start an AI-powered conversation.\n\n:::tip NOTE\n\nIn streaming mode, not all responses include a reference, as this depends on the system's judgement.\nIn streaming mode, the last message is an empty message:\ndata:\n{\n  \"code\": 0,\n  \"data\": true\n}\n:::\n\nRequest\nMethod: POST\nURL: /api/v1/chats/{chat_id}/completions\nHeaders:\n'content-Type: application/json'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\n\"question\": string\n\"stream\": boolean\n\"session_id\": string (optional)\n\"user_id: string (optional)\nRequest example\ncurl --request POST \\\n     --url http://{address}/api/v1/chats/{chat_id}/completions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data-binary '\n     {\n     }'\ncurl --request POST \\\n     --url http://{address}/api/v1/chats/{chat_id}/completions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data-binary '\n     {\n          \"question\": \"Who are you\",\n          \"stream\": true,\n          \"session_id\":\"9fa7691cb85c11ef9c5f0242ac120005\"\n     }'\nRequest Parameters\nchat_id: (Path parameter)\nThe ID of the associated chat assistant.\n\"question\": (Body Parameter), string, Required\nThe question to start an AI-powered conversation.\n\"stream\": (Body Parameter), boolean\nIndicates whether to output responses in a streaming way:\ntrue: Enable streaming (default).\nfalse: Disable streaming.\n\"session_id\": (Body Parameter)\nThe ID of session. If it is not provided, a new session will be generated.\n\"user_id\": (Body parameter), string\nThe optional user-defined ID. Valid only when no session_id is provided.\nResponse\nSuccess without session_id:\n\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"Hi! I'm your assistant, what can I do for you?\",\n        \"reference\": {},\n        \"audio_binary\": null,\n        \"id\": null,\n        \"session_id\": \"b01eed84b85611efa0e90242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": true\n}\nSuccess with session_id:\n\ndata:{\n    \"code\": 0,\n    \"data\": {\n        \"answer\": \"I am an intelligent assistant designed to help answer questions by summarizing content from a\",\n        \"reference\": {},\n        \"audio_binary\": null,\n        \"id\": \"a84c5dd4-97b4-4624-8c3b-974012c8000d\",\n        \"session_id\": \"82b0ab2a9c1911ef9d870242ac120006\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"data\": {\n        \"answer\": \"I am an intelligent assistant designed to help answer questions by summarizing content from a knowledge base. My responses are based on the information available in the knowledge base and\",\n        \"reference\": {},\n        \"audio_binary\": null,\n        \"id\": \"a84c5dd4-97b4-4624-8c3b-974012c8000d\",\n        \"session_id\": \"82b0ab2a9c1911ef9d870242ac120006\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"data\": {\n        \"answer\": \"I am an intelligent assistant designed to help answer questions by summarizing content from a knowledge base. My responses are based on the information available in the knowledge base and any relevant chat history.\",\n        \"reference\": {},\n        \"audio_binary\": null,\n        \"id\": \"a84c5dd4-97b4-4624-8c3b-974012c8000d\",\n        \"session_id\": \"82b0ab2a9c1911ef9d870242ac120006\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"data\": {\n        \"answer\": \"I am an intelligent assistant designed to help answer questions by summarizing content from a knowledge base ##0$$. My responses are based on the information available in the knowledge base and any relevant chat history.\",\n        \"reference\": {\n            \"total\": 1,\n            \"chunks\": [\n                {\n                    \"id\": \"faf26c791128f2d5e821f822671063bd\",\n                    \"content\": \"xxxxxxxx\",\n                    \"document_id\": \"dd58f58e888511ef89c90242ac120006\",\n                    \"document_name\": \"1.txt\",\n                    \"dataset_id\": \"8e83e57a884611ef9d760242ac120006\",\n                    \"image_id\": \"\",\n                    \"similarity\": 0.7,\n                    \"vector_similarity\": 0.0,\n                    \"term_similarity\": 1.0,\n                    \"positions\": [\n                        \"\"\n                    ]\n                }\n            ],\n            \"doc_aggs\": [\n                {\n                    \"doc_name\": \"1.txt\",\n                    \"doc_id\": \"dd58f58e888511ef89c90242ac120006\",\n                    \"count\": 1\n                }\n            ]\n        },\n        \"prompt\": \"xxxxxxxxxxx\",\n        \"id\": \"a84c5dd4-97b4-4624-8c3b-974012c8000d\",\n        \"session_id\": \"82b0ab2a9c1911ef9d870242ac120006\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"data\": true\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"Please input your question.\"\n}\nCreate session with agent\nPOST /api/v1/agents/{agent_id}/sessions\n\nCreates a session with an agent.\n\nRequest\nMethod: POST\nURL: /api/v1/agents/{agent_id}/sessions?user_id={user_id}\nHeaders:\n'content-Type: application/json' or 'multipart/form-data'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\nthe required parameters:str\nother parameters: The parameters specified in the Begin component.\nRequest example\nIf the Begin component in your agent does not take required parameters:\n\ncurl --request POST \\\n     --url http://{address}/api/v1/agents/{agent_id}/sessions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data '{\n     }'\nIf the Begin component in your agent takes required parameters:\n\ncurl --request POST \\\n     --url http://{address}/api/v1/agents/{agent_id}/sessions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data '{\n            \"lang\":\"Japanese\",\n            \"file\":\"Who are you\"\n     }'\nIf the Begin component in your agent takes required file parameters:\n\ncurl --request POST \\\n     --url http://{address}/api/v1/agents/{agent_id}/sessions?user_id={user_id} \\\n     --header 'Content-Type: multipart/form-data' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --form '\u003cFILE_KEY\u003e=@./test1.png'    \nRequest parameters\nagent_id: (Path parameter)\nThe ID of the associated agent.\nuser_id: (Filter parameter) The optional user-defined ID for parsing docs (especially images) when creating a session while uploading files.\nResponse\nSuccess:\n\n{\n    \"code\": 0,\n    \"data\": {\n        \"agent_id\": \"b4a39922b76611efaa1a0242ac120006\",\n        \"dsl\": {\n            \"answer\": [],\n            \"components\": {\n                \"Answer:GreenReadersDrum\": {\n                    \"downstream\": [],\n                    \"obj\": {\n                        \"component_name\": \"Answer\",\n                        \"inputs\": [],\n                        \"output\": null,\n                        \"params\": {}\n                    },\n                    \"upstream\": []\n                },\n                \"begin\": {\n                    \"downstream\": [],\n                    \"obj\": {\n                        \"component_name\": \"Begin\",\n                        \"inputs\": [],\n                        \"output\": {},\n                        \"params\": {}\n                    },\n                    \"upstream\": []\n                }\n            },\n            \"embed_id\": \"\",\n            \"graph\": {\n                \"edges\": [],\n                \"nodes\": [\n                    {\n                        \"data\": {\n                            \"label\": \"Begin\",\n                            \"name\": \"begin\"\n                        },\n                        \"dragging\": false,\n                        \"height\": 44,\n                        \"id\": \"begin\",\n                        \"position\": {\n                            \"x\": 53.25688640427177,\n                            \"y\": 198.37155679786412\n                        },\n                        \"positionAbsolute\": {\n                            \"x\": 53.25688640427177,\n                            \"y\": 198.37155679786412\n                        },\n                        \"selected\": false,\n                        \"sourcePosition\": \"left\",\n                        \"targetPosition\": \"right\",\n                        \"type\": \"beginNode\",\n                        \"width\": 200\n                    },\n                    {\n                        \"data\": {\n                            \"form\": {},\n                            \"label\": \"Answer\",\n                            \"name\": \"dialog_0\"\n                        },\n                        \"dragging\": false,\n                        \"height\": 44,\n                        \"id\": \"Answer:GreenReadersDrum\",\n                        \"position\": {\n                            \"x\": 360.43473114516974,\n                            \"y\": 207.29298425089348\n                        },\n                        \"positionAbsolute\": {\n                            \"x\": 360.43473114516974,\n                            \"y\": 207.29298425089348\n                        },\n                        \"selected\": false,\n                        \"sourcePosition\": \"right\",\n                        \"targetPosition\": \"left\",\n                        \"type\": \"logicNode\",\n                        \"width\": 200\n                    }\n                ]\n            },\n            \"history\": [],\n            \"messages\": [],\n            \"path\": [\n                [\n                    \"begin\"\n                ],\n                []\n            ],\n            \"reference\": []\n        },\n        \"id\": \"2581031eb7a311efb5200242ac120005\",\n        \"message\": [\n            {\n                \"content\": \"Hi! I'm your smart assistant. What can I do for you?\",\n                \"role\": \"assistant\"\n            }\n        ],\n        \"source\": \"agent\",\n        \"user_id\": \"69736c5e723611efb51b0242ac120007\"\n    }\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"Agent not found.\"\n}\nConverse with agent\nPOST /api/v1/agents/{agent_id}/completions\n\nAsks a specified agent a question to start an AI-powered conversation.\n\n:::tip NOTE\n\nIn streaming mode, not all responses include a reference, as this depends on the system's judgement.\nIn streaming mode, the last message is an empty message:\ndata:\n{\n  \"code\": 0,\n  \"data\": true\n}\n:::\n\nRequest\nMethod: POST\nURL: /api/v1/agents/{agent_id}/completions\nHeaders:\n'content-Type: application/json'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\n\"question\": string\n\"stream\": boolean\n\"session_id\": string\n\"user_id\": string(optional)\n\"sync_dsl\": boolean (optional)\nother parameters: string\nRequest example\nIf the Begin component does not take parameters, the following code will create a session.\n\ncurl --request POST \\\n     --url http://{address}/api/v1/agents/{agent_id}/completions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data-binary '\n     {\n     }'\nIf the Begin component takes parameters, the following code will create a session.\n\ncurl --request POST \\\n     --url http://{address}/api/v1/agents/{agent_id}/completions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data-binary '\n     {\n          \"lang\":\"English\",\n          \"file\":\"How is the weather tomorrow?\"\n     }'\nThe following code will execute the completion process\n\ncurl --request POST \\\n     --url http://{address}/api/v1/agents/{agent_id}/completions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data-binary '\n     {\n          \"question\": \"Hello\",\n          \"stream\": true,\n          \"session_id\": \"cb2f385cb86211efa36e0242ac120005\"\n     }'\nRequest Parameters\nagent_id: (Path parameter), string\nThe ID of the associated agent.\n\"question\": (Body Parameter), string, Required\nThe question to start an AI-powered conversation.\n\"stream\": (Body Parameter), boolean\nIndicates whether to output responses in a streaming way:\ntrue: Enable streaming (default).\nfalse: Disable streaming.\n\"session_id\": (Body Parameter)\nThe ID of the session. If it is not provided, a new session will be generated.\n\"user_id\": (Body parameter), string\nThe optional user-defined ID. Valid only when no session_id is provided.\n\"sync_dsl\": (Body parameter), boolean Whether to synchronize the changes to existing sessions when an agent is modified, defaults to false.\nOther parameters: (Body Parameter)\nParameters specified in the Begin component.\nResponse\nsuccess without session_id provided and with no parameters specified in the Begin component:\n\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"Hi! I'm your smart assistant. What can I do for you?\",\n        \"reference\": {},\n        \"id\": \"31e6091d-88d4-441b-ac65-eae1c055be7b\",\n        \"session_id\": \"2987ad3eb85f11efb2a70242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": true\n}\nSuccess without session_id provided and with parameters specified in the Begin component:\n\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"session_id\": \"eacb36a0bdff11ef97120242ac120006\",\n        \"answer\": \"\",\n        \"reference\": [],\n        \"param\": [\n            {\n                \"key\": \"lang\",\n                \"name\": \"Target Language\",\n                \"optional\": false,\n                \"type\": \"line\",\n                \"value\": \"English\"\n            },\n            {\n                \"key\": \"file\",\n                \"name\": \"Files\",\n                \"optional\": false,\n                \"type\": \"file\",\n                \"value\": \"How is the weather tomorrow?\"\n            },\n            {\n                \"key\": \"hhyt\",\n                \"name\": \"hhty\",\n                \"optional\": true,\n                \"type\": \"line\"\n            }\n        ]\n    }\n}\ndata:\nSuccess with parameters specified in the Begin component:\n\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How is\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How is the\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How is the weather\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How is the weather tomorrow\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How is the weather tomorrow?\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": {\n        \"answer\": \"How is the weather tomorrow?\",\n        \"reference\": {},\n        \"id\": \"0379ac4c-b26b-4a44-8b77-99cebf313fdf\",\n        \"session_id\": \"4399c7d0b86311efac5b0242ac120005\"\n    }\n}\ndata:{\n    \"code\": 0,\n    \"message\": \"\",\n    \"data\": true\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"`question` is required.\"\n}\nList agent sessions\nGET /api/v1/agents/{agent_id}/sessions?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026id={session_id}\u0026user_id={user_id}\u0026dsl={dsl}\n\nLists sessions associated with a specified agent.\n\nRequest\nMethod: GET\nURL: /api/v1/agents/{agent_id}/sessions?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026id={session_id}\nHeaders:\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nRequest example\ncurl --request GET \\\n     --url http://{address}/api/v1/agents/{agent_id}/sessions?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026id={session_id}\u0026user_id={user_id} \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nRequest Parameters\nagent_id: (Path parameter)\nThe ID of the associated agent.\npage: (Filter parameter), integer\nSpecifies the page on which the sessions will be displayed. Defaults to 1.\npage_size: (Filter parameter), integer\nThe number of sessions on each page. Defaults to 30.\norderby: (Filter parameter), string\nThe field by which sessions should be sorted. Available options:\ncreate_time (default)\nupdate_time\ndesc: (Filter parameter), boolean\nIndicates whether the retrieved sessions should be sorted in descending order. Defaults to true.\nid: (Filter parameter), string\nThe ID of the agent session to retrieve.\nuser_id: (Filter parameter), string\nThe optional user-defined ID passed in when creating session.\ndsl: (Filter parameter), boolean\nIndicates whether to include the dsl field of the sessions in the response. Defaults to true.\nResponse\nSuccess:\n\n{\n    \"code\": 0,\n    \"data\": [{\n        \"agent_id\": \"e9e2b9c2b2f911ef801d0242ac120006\",\n        \"dsl\": {\n            \"answer\": [],\n            \"components\": {\n                \"Answer:OrangeTermsBurn\": {\n                    \"downstream\": [],\n                    \"obj\": {\n                        \"component_name\": \"Answer\",\n                        \"params\": {}\n                    },\n                    \"upstream\": []\n                },\n                \"Generate:SocialYearsRemain\": {\n                    \"downstream\": [],\n                    \"obj\": {\n                        \"component_name\": \"Generate\",\n                        \"params\": {\n                            \"cite\": true,\n                            \"frequency_penalty\": 0.7,\n                            \"llm_id\": \"gpt-4o___OpenAI-API@OpenAI-API-Compatible\",\n                            \"max_tokens\": 256,\n                            \"message_history_window_size\": 12,\n                            \"parameters\": [],\n                            \"presence_penalty\": 0.4,\n                            \"prompt\": \"Please summarize the following paragraph. Pay attention to the numbers and do not make things up. The paragraph is as follows:\\n{input}\\nThis is what you need to summarize.\",\n                            \"temperature\": 0.1,\n                            \"top_p\": 0.3\n                        }\n                    },\n                    \"upstream\": []\n                },\n                \"begin\": {\n                    \"downstream\": [],\n                    \"obj\": {\n                        \"component_name\": \"Begin\",\n                        \"params\": {}\n                    },\n                    \"upstream\": []\n                }\n            },\n            \"graph\": {\n                \"edges\": [],\n                \"nodes\": [\n                    {\n                        \"data\": {\n                            \"label\": \"Begin\",\n                            \"name\": \"begin\"\n                        },\n                        \"height\": 44,\n                        \"id\": \"begin\",\n                        \"position\": {\n                            \"x\": 50,\n                            \"y\": 200\n                        },\n                        \"sourcePosition\": \"left\",\n                        \"targetPosition\": \"right\",\n                        \"type\": \"beginNode\",\n                        \"width\": 200\n                    },\n                    {\n                        \"data\": {\n                            \"form\": {\n                                \"cite\": true,\n                                \"frequencyPenaltyEnabled\": true,\n                                \"frequency_penalty\": 0.7,\n                                \"llm_id\": \"gpt-4o___OpenAI-API@OpenAI-API-Compatible\",\n                                \"maxTokensEnabled\": true,\n                                \"max_tokens\": 256,\n                                \"message_history_window_size\": 12,\n                                \"parameters\": [],\n                                \"presencePenaltyEnabled\": true,\n                                \"presence_penalty\": 0.4,\n                                \"prompt\": \"Please summarize the following paragraph. Pay attention to the numbers and do not make things up. The paragraph is as follows:\\n{input}\\nThis is what you need to summarize.\",\n                                \"temperature\": 0.1,\n                                \"temperatureEnabled\": true,\n                                \"topPEnabled\": true,\n                                \"top_p\": 0.3\n                            },\n                            \"label\": \"Generate\",\n                            \"name\": \"Generate Answer_0\"\n                        },\n                        \"dragging\": false,\n                        \"height\": 105,\n                        \"id\": \"Generate:SocialYearsRemain\",\n                        \"position\": {\n                            \"x\": 561.3457829707513,\n                            \"y\": 178.7211182312641\n                        },\n                        \"positionAbsolute\": {\n                            \"x\": 561.3457829707513,\n                            \"y\": 178.7211182312641\n                        },\n                        \"selected\": true,\n                        \"sourcePosition\": \"right\",\n                        \"targetPosition\": \"left\",\n                        \"type\": \"generateNode\",\n                        \"width\": 200\n                    },\n                    {\n                        \"data\": {\n                            \"form\": {},\n                            \"label\": \"Answer\",\n                            \"name\": \"Dialogue_0\"\n                        },\n                        \"height\": 44,\n                        \"id\": \"Answer:OrangeTermsBurn\",\n                        \"position\": {\n                            \"x\": 317.2368194777658,\n                            \"y\": 218.30635555445093\n                        },\n                        \"sourcePosition\": \"right\",\n                        \"targetPosition\": \"left\",\n                        \"type\": \"logicNode\",\n                        \"width\": 200\n                    }\n                ]\n            },\n            \"history\": [],\n            \"messages\": [],\n            \"path\": [],\n            \"reference\": []\n        },\n        \"id\": \"792dde22b2fa11ef97550242ac120006\",\n        \"message\": [\n            {\n                \"content\": \"Hi! I'm your smart assistant. What can I do for you?\",\n                \"role\": \"assistant\"\n            }\n        ],\n        \"source\": \"agent\",\n        \"user_id\": \"\"\n    }]\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"You don't own the agent ccd2f856b12311ef94ca0242ac1200052.\"\n}\nDelete agent's sessions\nDELETE /api/v1/agents/{agent_id}/sessions\n\nDeletes sessions of a agent by ID.\n\nRequest\nMethod: DELETE\nURL: /api/v1/agents/{agent_id}/sessions\nHeaders:\n'content-Type: application/json'\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nBody:\n\"ids\": list[string]\nRequest example\ncurl --request DELETE \\\n     --url http://{address}/api/v1/agents/{agent_id}/sessions \\\n     --header 'Content-Type: application/json' \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e' \\\n     --data '\n     {\n          \"ids\": [\"test_1\", \"test_2\"]\n     }'\nRequest Parameters\nagent_id: (Path parameter)\nThe ID of the associated agent.\n\"ids\": (Body Parameter), list[string]\nThe IDs of the sessions to delete. If it is not specified, all sessions associated with the specified agent will be deleted.\nResponse\nSuccess:\n\n{\n    \"code\": 0\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"The agent doesn't own the session cbd31e52f73911ef93b232903b842af6\"\n}\nAGENT MANAGEMENT\nList agents\nGET /api/v1/agents?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026name={agent_name}\u0026id={agent_id}\n\nLists agents.\n\nRequest\nMethod: GET\nURL: /api/v1/agents?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026name={agent_name}\u0026id={agent_id}\nHeaders:\n'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nRequest example\ncurl --request GET \\\n     --url http://{address}/api/v1/agents?page={page}\u0026page_size={page_size}\u0026orderby={orderby}\u0026desc={desc}\u0026name={agent_name}\u0026id={agent_id} \\\n     --header 'Authorization: Bearer \u003cYOUR_API_KEY\u003e'\nRequest parameters\npage: (Filter parameter), integer\nSpecifies the page on which the agents will be displayed. Defaults to 1.\npage_size: (Filter parameter), integer\nThe number of agents on each page. Defaults to 30.\norderby: (Filter parameter), string\nThe attribute by which the results are sorted. Available options:\ncreate_time (default)\nupdate_time\ndesc: (Filter parameter), boolean\nIndicates whether the retrieved agents should be sorted in descending order. Defaults to true.\nid: (Filter parameter), string\nThe ID of the agent to retrieve.\nname: (Filter parameter), string\nThe name of the agent to retrieve.\nResponse\nSuccess:\n\n{\n    \"code\": 0,\n    \"data\": [\n        {\n            \"avatar\": null,\n            \"canvas_type\": null,\n            \"create_date\": \"Thu, 05 Dec 2024 19:10:36 GMT\",\n            \"create_time\": 1733397036424,\n            \"description\": null,\n            \"dsl\": {\n                \"answer\": [],\n                \"components\": {\n                    \"begin\": {\n                        \"downstream\": [],\n                        \"obj\": {\n                            \"component_name\": \"Begin\",\n                            \"params\": {}\n                        },\n                        \"upstream\": []\n                    }\n                },\n                \"graph\": {\n                    \"edges\": [],\n                    \"nodes\": [\n                        {\n                            \"data\": {\n                                \"label\": \"Begin\",\n                                \"name\": \"begin\"\n                            },\n                            \"height\": 44,\n                            \"id\": \"begin\",\n                            \"position\": {\n                                \"x\": 50,\n                                \"y\": 200\n                            },\n                            \"sourcePosition\": \"left\",\n                            \"targetPosition\": \"right\",\n                            \"type\": \"beginNode\",\n                            \"width\": 200\n                        }\n                    ]\n                },\n                \"history\": [],\n                \"messages\": [],\n                \"path\": [],\n                \"reference\": []\n            },\n            \"id\": \"8d9ca0e2b2f911ef9ca20242ac120006\",\n            \"title\": \"123465\",\n            \"update_date\": \"Thu, 05 Dec 2024 19:10:56 GMT\",\n            \"update_time\": 1733397056801,\n            \"user_id\": \"69736c5e723611efb51b0242ac120007\"\n        }\n    ]\n}\nFailure:\n\n{\n    \"code\": 102,\n    \"message\": \"The agent doesn't exist.\"\n}","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcskwork%2Fchat-with-ragflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcskwork%2Fchat-with-ragflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcskwork%2Fchat-with-ragflow/lists"}