diff --git a/docs/references/http_api_reference.md b/docs/references/http_api_reference.md index 5fe114a5e5..94d38b4429 100644 --- a/docs/references/http_api_reference.md +++ b/docs/references/http_api_reference.md @@ -4542,6 +4542,7 @@ Use this mode for the native agent API. - `"user_id"`: `string` (optional) - `"return_trace"`: `boolean` (optional, default `false`) - `"release"`: `boolean` (optional, default `false`) +- `"chat_template_kwargs": object` (optional) #### Streaming events to handle @@ -4643,6 +4644,8 @@ curl --request POST \ Variables specified in the **Begin** component. - `"user_id"`: (*Body parameter*), `string` The optional user-defined ID. Valid *only* when no `session_id` is provided. +- `"chat_template_kwargs"`: (*Body parameter*), `object` + Optional passthrough parameters for the underlying LLM's chat template. Commonly used to toggle thinking/reasoning modes on supported models (e.g., `{"enable_thinking": false}`). :::tip NOTE For now, this method does *not* support a file type input/variable. As a workaround, use the following to upload a file to an agent: @@ -4714,6 +4717,7 @@ Use the same endpoint and add `"openai-compatible": true`. - `"stream"`: `boolean` - `"session_id"`: `string` (optional) - `"model"`: `string` (optional, accepted for compatibility) +- `"chat_template_kwargs": object` (optional) ##### Request examples @@ -4734,7 +4738,10 @@ curl --request POST \ "role": "user", "content": "Hello" } - ] + ], + "chat_template_kwargs": { + "enable_thinking": true + } }' ``` @@ -4774,6 +4781,8 @@ curl --request POST \ Optional existing session ID. - `"model"`: (*Body parameter*), `string` Optional compatibility field. The server still routes by `agent_id`. +- `"chat_template_kwargs"`: (*Body parameter*), `object` + Optional passthrough parameters for the underlying LLM's chat template. Commonly used to toggle thinking/reasoning modes on supported models (e.g., `{"enable_thinking": false}`). ##### Response diff --git a/docs/release_notes.md b/docs/release_notes.md index c3e6be245a..bfd921a03e 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -30,7 +30,7 @@ Released on May 26, 2026. - Fixes `/chat/completions` to allow sending only latest message in API payload and removes requirement to transmit full conversation history. [#15197](https://github.com/infiniflow/ragflow/pull/15197) See also [Converse with chat assistant](./references/http_api_reference.md#converse-with-chat-assistant). - Weight assigned to vector similarity was not applied during the retrieval phase. [#15108](https://github.com/infiniflow/ragflow/pull/15108) - Fixes parser configs not saving on dataset configuration page. -- Logs wer not fully displayed on data source details page. +- Logs were not fully displayed on data source details page. - Fixes document status filtering failure. - Fixes crash guard for empty LLM choices responses. - RAG: RAPTOR construction process halted when using the [Infinity](https://github.com/infiniflow/infinity) document engine. [#14998](https://github.com/infiniflow/ragflow/pull/14998)