Skip to main content

A collection of unofficial models for pydantic-ai

Project description

Pydantic AI Unofficial Models

A package containing support for unofficial wrapper of LLM Models in the Pydantic AI framework/style/ecosystem.

Meta AI API (Unofficial)

Basic Usage

from pydantic_ai import Agent
from pydantic_ai_unofficial_models import MetaAIChatModel

model = MetaAIChatModel()
agent = Agent(model)

response = agent.run_sync("Hi, I am John, give some famous personality names based of my name.")

print(response)

Usage with Tools

from pydantic_ai import Agent
from pydantic_ai_unofficial_models import MetaAIChatModel

model = MetaAIChatModel()
agent = Agent(model)

@agent.tool_plain
def add(a: int, b: int) -> int:
    """Add two numbers."""
    return a + b

@agent.tool_plain
def multiply(a: int, b: int) -> int:
    """Multiply two numbers."""
    return a * b

@agent.tool_plain
def subtract(a: int, b: int) -> int:
    """Subtract two numbers."""
    return a - b

@agent.tool_plain
def divide(a: int, b: int) -> float:
    """Divide two numbers."""
    return a / b

result = agent.run_sync("I have borrowed $2,000 at 6% interest for 1 year. What’s the EMI?")
print(result)

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_unofficial_models-0.1.1.tar.gz (8.8 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_unofficial_models-0.1.1-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file pydantic_ai_unofficial_models-0.1.1.tar.gz.

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b84b8b52f00266de258d4d5691afc2cffdc117114cf44744a9cf884c7fd9689b
MD5 2570b1409ffe97393d79f0546825087f
BLAKE2b-256 15c71b940058044ddb81f08c4315a32a091f3d95317236ddd98327ab3e12166e

See more details on using hashes here.

File details

Details for the file pydantic_ai_unofficial_models-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ffe36b61adfc8d8ae122d07e6ca633ac8c1b43b83b7d119f3f669ab75d96a77e
MD5 43dfb2e4b86b56e1e9d1fadf63e423c9
BLAKE2b-256 c17b6c2c221c1b27dba5660b1002deb0a5194e13eb046c005e02647f5a21f857

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