feat: 重构资料包模型与会话绑定主链路
This commit is contained in:
@@ -8,6 +8,9 @@ def create_audit_log(
|
||||
scenario_name: str,
|
||||
user_input: str,
|
||||
agent_result: AgentResult,
|
||||
batch_id: str = "",
|
||||
conversation_id: str = "",
|
||||
product_name: str = "",
|
||||
) -> AgentAuditLog:
|
||||
"""
|
||||
将一次 Agent 执行结果落库为审计日志。
|
||||
@@ -20,6 +23,9 @@ def create_audit_log(
|
||||
return AgentAuditLog.objects.create(
|
||||
scenario_id=scenario_id,
|
||||
scenario_name=scenario_name,
|
||||
batch_id=batch_id,
|
||||
conversation_id=conversation_id,
|
||||
product_name=product_name,
|
||||
user_input=user_input,
|
||||
retrieved_chunks=agent_result.references,
|
||||
tool_calls=agent_result.tool_calls,
|
||||
|
||||
Reference in New Issue
Block a user