Skip to main content

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


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.7.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydantic_ai_bedrock-0.1.7-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pydantic_ai_bedrock-0.1.7.tar.gz.

File metadata

  • Download URL: pydantic_ai_bedrock-0.1.7.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pydantic_ai_bedrock-0.1.7.tar.gz
Algorithm Hash digest
SHA256 9de63af534d017c1082661c63c878d867d8d5f73d0a3fb2edde1af2b032c8bb4
MD5 0f12aa8bf8dedfcd14dad97d2cb61e78
BLAKE2b-256 ac30e6303f3133d2878ded8b427da4acf4f6686f10fb5e71ccfe30a8194c732d

See more details on using hashes here.

File details

Details for the file pydantic_ai_bedrock-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for pydantic_ai_bedrock-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3b2b8bc5c762c50ea25e8f5b65459336995ede64b9d129c8ca6578bc4b31d663
MD5 34c83f612497e1ce3f58f7333f7e7d11
BLAKE2b-256 29280e55575f4b6d4b0922d1705a0fe4564861cd1ce9adf3bb9a235bab6270c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page