Skip to content

Docs: Updated Converse with chat assistant - #16117

Merged
yingfeng merged 4 commits into
infiniflow:mainfrom
writinwaters:0.26.1
Jun 17, 2026
Merged

yingfeng merged 4 commits into
infiniflow:mainfrom
writinwaters:0.26.1

Conversation

@writinwaters

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Miscellaneous editorial updates to the API reference.

Type of change

  • Documentation Update

@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jun 17, 2026
@writinwaters
writinwaters requested a review from buua436 June 17, 2026 02:47
@dosubot dosubot Bot added the 📖 documentation Improvements or additions to documentation label Jun 17, 2026
@coderabbitai

coderabbitai Bot commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Standardizes deprecated endpoint callout phrasing across docs/references/http_api_reference.md for chat, session, chunk, agent, file, system, and attachment endpoints. Expands legacy parameter documentation with v0.23.0-compatible streaming behavior details and adjusts stream parameter wording. Removes the release parameter from agent Standard mode request body docs. Adds a cross-reference link in release notes to the updated chat assistant documentation.

Changes

HTTP API Reference Documentation Updates

Layer / File(s) Summary
Chat, chunk, and session deprecated endpoint notices + stream/legacy parameters
docs/references/http_api_reference.md, docs/release_notes.md
Rewrites deprecation callouts for POST /api/v1/chats_openai/{chat_id}/chat/completions, PUT .../chunks/{chunk_id}, PUT .../sessions/{session_id}, and POST /api/v1/chats/{chat_id}/completions to the consistent "deprecated; use this endpoint instead" format. Adjusts the stream parameter description and expands legacy docs to specify cumulative answer delivery and start_to_think/end_to_think tag stripping behavior in v0.23.0-compatible streaming. Updates the v0.26.1 release notes entry with a cross-reference link to the chat assistant documentation section.
Agent completions deprecation notice and release parameter removal
docs/references/http_api_reference.md
Updates the deprecated endpoint callout for POST /api/v1/agents/{agent_id}/completions to point to POST /api/v1/agents/chat/completions. Removes the release parameter entry from the Standard mode request body parameter list.
File, attachment, system, and related-questions deprecated endpoint notices
docs/references/http_api_reference.md
Standardizes deprecation callout wording for POST /api/v1/sessions/related_questions, GET /v1/system/healthz, and all legacy /api/v1/file/\* endpoints (upload, create, list, parent_folder, all_parent_folder, rm, get, mv, rename, convert) and attachment download to point to their replacement endpoints.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • infiniflow/ragflow#16100: Modifies docs/references/http_api_reference.md around the same chat completions legacy/streaming behavior and v0.23.0-compatible format that this PR also updates.

Poem

🐇 Hop, hop, the old paths are gone,
New endpoints to guide you along!
legacy streams without a <think>,
release is removed in a blink.
The docs now speak clear and true —
Your API reference, fresh and new! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description identifies the PR as a Documentation Update and provides a brief summary, but lacks specific details about what editorial updates were made or which sections were affected. Expand the description to specify the key changes: normalization of deprecated admonitions, parameter documentation refinements, and release notes updates for clarity.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'Docs: Updated Converse with chat assistant' is partially related to the changeset but is overly broad and incomplete. The PR includes significant updates beyond just the 'Converse with chat assistant' section, including normalization of deprecated endpoint admonitions across multiple endpoints, refinement of stream and legacy parameter descriptions, and updates to the release notes. The title captures only one aspect of the main documentation changes.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/references/http_api_reference.md (1)

4719-4736: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Rename question to query in the Standard mode table.

This table conflicts with the rest of the section: the body schema and both examples use query, not question. As written, readers will send the wrong field name.

♻️ Suggested fix
-- `"question"`: (*Body Parameter*), `string`, *Required*
-  The question to start an AI-powered conversation.
+- `"query"`: (*Body Parameter*), `string`, *Required*
+  The question to start an AI-powered conversation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/references/http_api_reference.md` around lines 4719 - 4736, In the
Request parameters section of the HTTP API reference documentation, the first
body parameter is currently named "question" with the description "The question
to start an AI-powered conversation." This conflicts with the body schema and
example sections which use "query" instead. Rename the "question" parameter to
"query" to maintain consistency throughout the documentation and ensure readers
use the correct field name when making API requests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/references/http_api_reference.md`:
- Around line 4150-4153: The prose description of the `legacy` parameter states
that start_to_think and end_to_think signals are stripped from the stream, but
the example payload that follows still shows <think>...</think> markers in the
answer field. Align the documentation by either updating the prose description
to clarify that the thinking markers are preserved in legacy mode, or update the
example to remove the <think>...</think> tags from the answer field so that both
the text explanation and the example show the same payload structure.

---

Outside diff comments:
In `@docs/references/http_api_reference.md`:
- Around line 4719-4736: In the Request parameters section of the HTTP API
reference documentation, the first body parameter is currently named "question"
with the description "The question to start an AI-powered conversation." This
conflicts with the body schema and example sections which use "query" instead.
Rename the "question" parameter to "query" to maintain consistency throughout
the documentation and ensure readers use the correct field name when making API
requests.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 64323323-1417-4938-8741-027b8bc07b70

📥 Commits

Reviewing files that changed from the base of the PR and between 5de00bd and 69a52eb.

📒 Files selected for processing (1)
  • docs/references/http_api_reference.md

Comment on lines +4150 to +4153
- `"legacy"`: (*Body Parameter*), `boolean`
Defaults to `false`. Wheter to enable backward compatibility with RAGFlow v0.23.0 for streaming responses. When set to `true`:
- Cumulative output: The `"answer"` field in each chunk returns the entire text generated so far, rather than just the new tokens (deltas).
- No reasoning markers: The `start_to_think` and `end_to_think` signals are stripped from the stream.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify the legacy streaming semantics.

The prose says the v0.23.0-compatible stream strips start_to_think / end_to_think, but the example below still shows <think>...</think> in answer. Please make the text and example describe the same payload shape.

♻️ Suggested wording
-  Defaults to `false`. Wheter to enable backward compatibility with RAGFlow v0.23.0 for streaming responses. When set to `true`:  
-  - Cumulative output: The `"answer"` field in each chunk returns the entire text generated so far, rather than just the new tokens (deltas).
-  - No reasoning markers: The `start_to_think` and `end_to_think` signals are stripped from the stream.
+  Defaults to `false`. Whether to enable backward compatibility with RAGFlow v0.23.0 for streaming responses. When set to `true`:
+  - Cumulative output: The `"answer"` field in each chunk returns the entire text generated so far, rather than just the new tokens (deltas).
+  - Legacy reasoning text stays inside `answer` as literal `<think>...</think>` content.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- `"legacy"`: (*Body Parameter*), `boolean`
Defaults to `false`. Wheter to enable backward compatibility with RAGFlow v0.23.0 for streaming responses. When set to `true`:
- Cumulative output: The `"answer"` field in each chunk returns the entire text generated so far, rather than just the new tokens (deltas).
- No reasoning markers: The `start_to_think` and `end_to_think` signals are stripped from the stream.
- `"legacy"`: (*Body Parameter*), `boolean`
Defaults to `false`. Whether to enable backward compatibility with RAGFlow v0.23.0 for streaming responses. When set to `true`:
- Cumulative output: The `"answer"` field in each chunk returns the entire text generated so far, rather than just the new tokens (deltas).
- Legacy reasoning text stays inside `answer` as literal `<think>...</think>` content.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/references/http_api_reference.md` around lines 4150 - 4153, The prose
description of the `legacy` parameter states that start_to_think and
end_to_think signals are stripped from the stream, but the example payload that
follows still shows <think>...</think> markers in the answer field. Align the
documentation by either updating the prose description to clarify that the
thinking markers are preserved in legacy mode, or update the example to remove
the <think>...</think> tags from the answer field so that both the text
explanation and the example show the same payload structure.

@writinwaters writinwaters changed the title Docs: Updated Converse with agent Docs: Updated Converse with chat assistant Jun 17, 2026
@yingfeng
yingfeng merged commit 0aaba00 into infiniflow:main Jun 17, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jun 17, 2026
1 task done
@coderabbitai coderabbitai Bot mentioned this pull request Jun 26, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📖 documentation Improvements or additions to documentation size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants