Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save KyMidd/d235d0e1b5c4adfc01029ffefcb18770 to your computer and use it in GitHub Desktop.
def handle_message_event(client, body, say, bedrock_client, app, token, registered_bot_id):
# ...
# Ask the AI for a response
ai_response = ai_request(bedrock_client, conversation, say, thread_ts, client, message_ts, channel_id, False)
# Append to conversation
conversation.append(
{
"role": "assistant",
"content": [
{
"text": ai_response,
}
],
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment