feat: enhance user message preprocessing to include message creation timestamp

This commit is contained in:
Ethan
2025-03-02 19:30:07 +08:00
parent 8878f1ed87
commit 48841daff5
2 changed files with 2 additions and 3 deletions

View File

@@ -78,7 +78,6 @@ class AsyncDifyServiceClient:
trust_env=True,
timeout=timeout,
) as client:
print(f"inputs: {inputs}")
async with client.stream(
"POST",

View File

@@ -256,9 +256,9 @@ class DifyServiceAPIRunner(runner.RequestRunner):
async for chunk in self.dify_client.workflow_run(
inputs={
"langbot_user_message_text": plain_text,
"langbot_session_id": f"{query.session.launcher_type.value}_{query.session.launcher_id}_{create_time}",
"langbot_session_id": f"{query.session.launcher_type.value}_{query.session.launcher_id}",
"langbot_conversation_id": cov_id,
"langbot_msg_create_time": f"ctime_{create_time}",
"langbot_msg_create_time": create_time,
},
user=f"{query.session.launcher_type.value}_{query.session.launcher_id}",
files=files,