Add multi-language system prompts and BedrockChatAdapter implementation #576
+244
−81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Centralize and Internationalize System Prompts
This pull request addresses the issue of scattered system prompts across the codebase and the lack of support for internationalization, as described in the corresponding Git issue #571.
Changes:
256279db811d17f6c558ccf469bfbec0e0d93583
system_prompts.py
: A new module created to centralize all system prompts and support multiple languages (English and Canadian French).base.py
: Refactored methods (get_prompt
,get_condense_question_prompt
,get_qa_prompt
) to retrieve prompts fromsystem_prompts.py
.__init__.py
: Updated to import system prompts for simplified access.Key Improvements:
system_prompts.py
), improving manageability and scalability.azure-openai
,mistral
,claude
,titan
, andllama
are updated to use the new prompt management system, ensuring consistency and reducing code duplication.Testing Instructions:
system_prompts.py
.GenAIChatBotStack-LangchainInterfaceReques
Lambda function.prompt
field of the metadata variable in the AWS GenAI Chatbot console for further analysis.Expected Outcome: