Created
April 22, 2025 03:19
-
-
Save KyMidd/dd87f79704054de49316950c2be50c37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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