mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: add sync_dsl parameter to support synchronizing modifications to existing sessions (#5843)
When accessing the /api/v1/agents/{agent_id}/completions API, sessions
created before agent modifications retain the old DSL data. To use the
latest agent configuration (like new prompts) in historical sessions, I
added the sync_dsl parameter. It defaults to False to maintain existing
behavior and only synchronizes when set to True. If needed, a manual
synchronization API can be created to trigger the sync explicitly.
This commit is contained in:
@ -2513,6 +2513,7 @@ Asks a specified agent a question to start an AI-powered conversation.
|
||||
- `"stream"`: `boolean`
|
||||
- `"session_id"`: `string`
|
||||
- `"user_id"`: `string`(optional)
|
||||
- `"sync_dsl"`: `boolean` (optional)
|
||||
- other parameters: `string`
|
||||
##### Request example
|
||||
If the **Begin** component does not take parameters, the following code will create a session.
|
||||
@ -2565,6 +2566,8 @@ curl --request POST \
|
||||
The ID of the session. If it is not provided, a new session will be generated.
|
||||
- `"user_id"`: (*Body parameter*), `string`
|
||||
The optional user-defined ID. Valid *only* when no `session_id` is provided.
|
||||
- `"sync_dsl"`: (*Body parameter*), `boolean`
|
||||
Whether to synchronize the changes to existing sessions when an agent is modified, defaults to `false`.
|
||||
- Other parameters: (*Body Parameter*)
|
||||
Parameters specified in the **Begin** component.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user