mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-13 01:06:03 +00:00
feat: enhance user message preprocessing to include message creation timestamp
This commit is contained in:
@@ -78,7 +78,6 @@ class AsyncDifyServiceClient:
|
|||||||
trust_env=True,
|
trust_env=True,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
) as client:
|
) as client:
|
||||||
print(f"inputs: {inputs}")
|
|
||||||
|
|
||||||
async with client.stream(
|
async with client.stream(
|
||||||
"POST",
|
"POST",
|
||||||
|
|||||||
@@ -256,9 +256,9 @@ class DifyServiceAPIRunner(runner.RequestRunner):
|
|||||||
async for chunk in self.dify_client.workflow_run(
|
async for chunk in self.dify_client.workflow_run(
|
||||||
inputs={
|
inputs={
|
||||||
"langbot_user_message_text": plain_text,
|
"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_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}",
|
user=f"{query.session.launcher_type.value}_{query.session.launcher_id}",
|
||||||
files=files,
|
files=files,
|
||||||
|
|||||||
Reference in New Issue
Block a user