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 from 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.0.2.tar.gz (14.6 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.0.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pydantic_ai_bedrock-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8ca5e76b1633e0d872807a679669d9e74520fe51b631ae94454debf769acba2f
MD5 1aed9bbead196cbc67ffd8cdfbb560da
BLAKE2b-256 804f9cfcc0fcbbf11ff88b4761e4ebc3c33cd0da704927a08533033c5873697f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pydantic_ai_bedrock-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 622739c6ac9e1320f9ca5028b91143e9714476f966ff26d2d511f7b024bd4d09
MD5 548e9729a5a373bde535fb1d6d2d885c
BLAKE2b-256 bb61d840ecf98e2a7c4838f50e5d4e745fed10cae98b32b908e0d1484dc29222

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