Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created April 22, 2025 03:19
Show Gist options
  • Select an option

  • Save KyMidd/dd87f79704054de49316950c2be50c37 to your computer and use it in GitHub Desktop.

Select an option

Save KyMidd/dd87f79704054de49316950c2be50c37 to your computer and use it in GitHub Desktop.
def handle_message_event(client, body, say, bedrock_client, app, token, registered_bot_id):
# ...
# Before we fetch the knowledge base, do an initial turn with the AI to add context
if enable_initial_model_context_step:
message_ts = update_slack_response(
say, client, message_ts, channel_id, thread_ts,
initial_model_user_status_message,
)
# Append to conversation
conversation.append(
{
"role": "user",
"content": [
{
"text": initial_model_context_instructions,
}
],
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment