feat(workflow): add opening statement and citation support
- Trigger opening statement on new conversation in run/run_stream - Fix /opening endpoint to support workflow app type - Fix features field missing in workflow config release snapshot - Knowledge node returns citations alongside chunks - Aggregate citations from all knowledge nodes in result builder - Filter citations based on features.citation.enabled switch - Fix WorkflowConfigCreate circular import in app_schema
This commit is contained in:
@@ -401,7 +401,7 @@ class AppService:
|
||||
def _create_workflow_config(
|
||||
self,
|
||||
app_id: uuid.UUID,
|
||||
data: app_schema.WorkflowConfigCreate,
|
||||
data,
|
||||
now: datetime.datetime
|
||||
):
|
||||
workflow_cfg = WorkflowConfig(
|
||||
@@ -678,7 +678,9 @@ class AppService:
|
||||
self._create_multi_agent_config(app.id, data.multi_agent_config, now)
|
||||
|
||||
if app.type == "workflow" and data.workflow_config:
|
||||
self._create_workflow_config(app.id, data.workflow_config, now)
|
||||
from app.schemas.workflow_schema import WorkflowConfigCreate
|
||||
wf_data = WorkflowConfigCreate(**data.workflow_config) if isinstance(data.workflow_config, dict) else data.workflow_config
|
||||
self._create_workflow_config(app.id, wf_data, now)
|
||||
|
||||
self.db.commit()
|
||||
self.db.refresh(app)
|
||||
|
||||
Reference in New Issue
Block a user