Repository navigation
Conversation
Add Python SDK examples: - chat_example.py: chat assistant CRUD, sessions, and completions - document_example.py: document upload, parsing, and chunk management - retrieval_example.py: cross-dataset semantic search Add HTTP API (cURL) examples: - chat_example.sh: chat CRUD, sessions, and completions - document_example.sh: document upload, parsing, and chunk operations - retrieval_example.sh: retrieval endpoint usage Closes infiniflow#4310
1 task done
Merged
2 tasks done
JinHai-CN
pushed a commit
that referenced
this pull request
May 22, 2026
… and retrieval (#4310) (#14208) Closes #4310 ### What problem does this PR solve? Issue #4310 requests practical examples for the RAGFlow SDK and HTTP API to help developers get started faster. The existing `example/sdk/` folder only contains `dataset_example.py`. This PR fills the remaining gaps by adding examples for three key API areas not yet covered in `main` or by other open PRs (#13904, #13284): - **Chunk management** — add, list, update, delete, and retrieve chunks within a dataset - **Chat assistant** — create a chat assistant, open a session, send messages (streaming and non-streaming), and clean up - **Retrieval** — perform semantic retrieval across one or multiple datasets ### Type of change - [x] Documentation Update - [x] New Feature (non-breaking change which adds functionality)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
This PR addresses #4310 by adding API usage examples for the RAGFlow SDK and HTTP API.
Although RAGFlow already has API documentation, concrete examples make it much easier for developers to get started. Currently, only dataset examples exist (
example/sdk/dataset_example.pyandexample/http/dataset_example.sh). This PR adds examples covering the other core API resources:Python SDK examples (
example/sdk/):chat_example.py— Chat assistant CRUD, session management, and chat completions (streaming and non-streaming)document_example.py— Document upload, listing, parsing, and chunk managementretrieval_example.py— Cross-dataset semantic searchHTTP API (cURL) examples (
example/http/):chat_example.sh— Chat CRUD, sessions, and completions via cURLdocument_example.sh— Document upload, parsing, and chunk operations via cURLretrieval_example.sh— Retrieval endpoint usage via cURLType of change