Last active
May 2, 2025 16:58
-
-
Save KyMidd/3b627fa49b65a81106c41e40c6d82e31 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
| # Build converse body. If guardrails is enabled, add those keys to the body | |
| if enable_guardrails: | |
| converse_body = { | |
| "modelId": model_id, | |
| "guardrailConfig": { | |
| "guardrailIdentifier": guardrailIdentifier, | |
| "guardrailVersion": guardrailVersion, | |
| "trace": guardrailTracing, | |
| }, | |
| "messages": messages, | |
| "system": system, | |
| "inferenceConfig": inference_config, | |
| "additionalModelRequestFields": additional_model_fields, | |
| } | |
| else: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment