Submit thread context in slack
This commit is contained in:
@@ -81,7 +81,7 @@ def respond_to_app_mention(
|
|||||||
limit=1000,
|
limit=1000,
|
||||||
).get("messages", [])
|
).get("messages", [])
|
||||||
reply = replies_in_thread[-1]
|
reply = replies_in_thread[-1]
|
||||||
#for reply in replies_in_thread:
|
for reply in replies_in_thread:
|
||||||
c = reply["text"]+"\n\n"
|
c = reply["text"]+"\n\n"
|
||||||
content += c
|
content += c
|
||||||
role = "assistant" if reply["user"] == context.bot_user_id else "user"
|
role = "assistant" if reply["user"] == context.bot_user_id else "user"
|
||||||
@@ -90,7 +90,7 @@ def respond_to_app_mention(
|
|||||||
"role": role,
|
"role": role,
|
||||||
"content": (
|
"content": (
|
||||||
format_openai_message_content(
|
format_openai_message_content(
|
||||||
reply["text"], TRANSLATE_MARKDOWN
|
content, TRANSLATE_MARKDOWN
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user