-
-
Save KyMidd/23ef276d6d5416407bd074f7d716b8ee 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
| response = bedrock_client.converse( | |
| modelId=model_id, | |
| guardrailConfig={ | |
| "guardrailIdentifier": guardrailIdentifier, | |
| "guardrailVersion": guardrailVersion, | |
| }, | |
| messages=messages, | |
| system=model_prompt, | |
| inferenceConfig=inference_config, | |
| additionalModelRequestFields=additional_model_fields | |
| ) | |
| # Find the response text | |
| response = response["output"]["message"]["content"][0]["text"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment