From 48841daff500f56b2c00cdcf5adf2efe99ed09c6 Mon Sep 17 00:00:00 2001 From: Ethan Date: Sun, 2 Mar 2025 19:30:07 +0800 Subject: [PATCH] feat: enhance user message preprocessing to include message creation timestamp --- libs/dify_service_api/v1/client.py | 1 - pkg/provider/runners/difysvapi.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/dify_service_api/v1/client.py b/libs/dify_service_api/v1/client.py index 7e5dba53..70a804b7 100644 --- a/libs/dify_service_api/v1/client.py +++ b/libs/dify_service_api/v1/client.py @@ -78,7 +78,6 @@ class AsyncDifyServiceClient: trust_env=True, timeout=timeout, ) as client: - print(f"inputs: {inputs}") async with client.stream( "POST", diff --git a/pkg/provider/runners/difysvapi.py b/pkg/provider/runners/difysvapi.py index 50dd38bd..fb3f47d7 100644 --- a/pkg/provider/runners/difysvapi.py +++ b/pkg/provider/runners/difysvapi.py @@ -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,