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.0.6.tar.gz
(18.6 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.0.6.tar.gz.
File metadata
- Download URL: pydantic_ai_bedrock-0.0.6.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32e40689e9e7f6e57be42bf737a06d3a7a066d96eba79c440c3e76202b567a21
|
|
| MD5 |
19aa4621e35a116963630f1572a04e2b
|
|
| BLAKE2b-256 |
e791496ad817c94dd7fa415371afd92401f9896d173a8c259d1ca23ff492e7b3
|
File details
Details for the file pydantic_ai_bedrock-0.0.6-py3-none-any.whl.
File metadata
- Download URL: pydantic_ai_bedrock-0.0.6-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7eebf2c21132e54010a24efa8b4f320bccbf19d013e98ed80e5b0e10b8fd0b4
|
|
| MD5 |
3f89926f14027acb7ca30ac38ced7ff3
|
|
| BLAKE2b-256 |
ea6631ab0e5566adee63c0f661b45487ea56eaf80fa126f030091b7c0379b2d7
|