Last active
October 16, 2025 14:16
-
-
Save praise2112/47a192707040c70967e23fb71a993f76 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
| from litellm import completion | |
| # REQUIRES: AWS_BEARER_TOKEN_BEDROCK ENV varaible | |
| # List of Modela and their names here: https://eu-west-3.console.aws.amazon.com/bedrock/home?region=eu-west-3#/model-catalog | |
| # The global. prefix for the model name is required | |
| def main(): | |
| response = completion( | |
| model="bedrock/global.anthropic.claude-sonnet-4-5-20250929-v1:0", | |
| messages=[ | |
| { | |
| "role": "user", | |
| "content": "Explain the theory of relativity in simple terms.", | |
| } | |
| ], | |
| max_tokens=100, | |
| ) | |
| print(response) | |
| if __name__ == "__main__": | |
| main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment