pydantic_ai_bedrock
Project description
pydantic_ai_bedrock
https://github.com/pydantic/pydantic-ai/issues/118#issuecomment-2589200395
Install
pip install pydantic_ai_bedrock
Usage
from pydantic_ai import Agent
from pydantic_ai_bedrock.bedrock import (
BedrockModel,
) # Replace with `pydantic_ai.bedrock import BedrockModel` when pydantic_ai support bedrock
model = BedrockModel(
model_name="anthropic.claude-3-5-sonnet-20241022-v2:0",
)
agent = Agent(model, system_prompt="You are a helpful assistant.")
if __name__ == "__main__":
result = agent.run_sync("Hello world!")
print(result.data)
print(result.usage())
Develop
Install pre-commit before commit
pip install pre-commit
pre-commit install
Install package locally
pip install -e .[test]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pydantic_ai_bedrock-0.1.9.tar.gz
(18.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydantic_ai_bedrock-0.1.9.tar.gz.
File metadata
- Download URL: pydantic_ai_bedrock-0.1.9.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1759f0b310cb2886e3b2bfdcd6a4e7f17efc76639c01ac72b302ff6dce22a7c
|
|
| MD5 |
0be6bcbed30fa8dab8eca37a86e9359b
|
|
| BLAKE2b-256 |
f65bf0d5883e4b8f3a9585457f165cb7f128794bff009a926622326901906541
|
File details
Details for the file pydantic_ai_bedrock-0.1.9-py3-none-any.whl.
File metadata
- Download URL: pydantic_ai_bedrock-0.1.9-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a671a98bc0eedeb84b865d812ebc79417f84f84ae6c71a958c0ebca6aea8a37
|
|
| MD5 |
94973a7a6421353bae17aa42e505a521
|
|
| BLAKE2b-256 |
a8ff0a76bd6eba6fc8c931b460e3b5d0fa7ad9952a9a958c0176803c6a2ae8c2
|