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.5.tar.gz
(16.3 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.5.tar.gz.
File metadata
- Download URL: pydantic_ai_bedrock-0.0.5.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ad5108289f842ee6f9c425c621c919af8895e8d96607c8413f0e37857ad0af3
|
|
| MD5 |
fa450a3d18ef2167db73c19a9da27644
|
|
| BLAKE2b-256 |
18d5fcdffd7fa22b74ad803d8e0c92a2995acbf0f4b9c60d638e306d034db6df
|
File details
Details for the file pydantic_ai_bedrock-0.0.5-py3-none-any.whl.
File metadata
- Download URL: pydantic_ai_bedrock-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.9 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 |
80f96dd8121fb9c33ea496cf271ba7fdd120e7e4d0b63ef21533f6b2fd65025a
|
|
| MD5 |
b104d715057f6556aa9be2c11e82a4c0
|
|
| BLAKE2b-256 |
69c41736c9b98b2867461b884adedbbda1e5f65c06cf9a2e8eeaaf9f6acd3ff0
|