From f1b39164ef0e1c7e222b0217709ebf7a4676363f Mon Sep 17 00:00:00 2001 From: mudler Date: Sat, 16 Dec 2023 19:10:31 +0100 Subject: [PATCH] Submit thread context in slack --- examples/slack/app/bolt_listeners.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/slack/app/bolt_listeners.py b/examples/slack/app/bolt_listeners.py index 643b2fe..7085919 100644 --- a/examples/slack/app/bolt_listeners.py +++ b/examples/slack/app/bolt_listeners.py @@ -81,16 +81,16 @@ def respond_to_app_mention( limit=1000, ).get("messages", []) reply = replies_in_thread[-1] - #for reply in replies_in_thread: - c = reply["text"]+"\n\n" - content += c + for reply in replies_in_thread: + c = reply["text"]+"\n\n" + content += c role = "assistant" if reply["user"] == context.bot_user_id else "user" messages.append( { "role": role, "content": ( format_openai_message_content( - reply["text"], TRANSLATE_MARKDOWN + content, TRANSLATE_MARKDOWN ) ), }