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.0.1.tar.gz (2.0 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.0.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e5167447c2713d06e3ea794bc9a388c7d0a4896569ae9f2c8d4374a87cf1f9e6
MD5 561f111f6f90c8edcaaed05d1139e3e9
BLAKE2b-256 89c8cfb7bd4661c0cd210b39e14e1ebf6ee1ad1f1aa5499c5668c6c778294516

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d83bed2302f2d64535e46e63b11c345ece344b1f79e6b5fe4a7952f886fdcc01
MD5 aa75883b5166016860806625e62a183f
BLAKE2b-256 ff4dcf36aaea24289b2238f97eef0773c1104805db12f40ba092a99643b5c7f0

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