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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.2.0.tar.gz
Algorithm Hash digest
SHA256 91b5e0e2f0e77024704effe4a442193f2f9f21fe572c2e440abdeb5475213169
MD5 a99ca3f450f7bb973d18e838ca0f125a
BLAKE2b-256 4c9cfe27bfdc04154d3f8144ca6871e5f78832d84d6924e69fa80bde412447b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19402873ef19dd54d781df5cffc9b71a4511baf5223f709036c7b09afeaee2a9
MD5 ebbacd1ca705c1a2f5944c6a84e79cfe
BLAKE2b-256 e93b987db0cbbbf2bb6a0b0ad5ba8245863d962473fd4c0b88806edd048a9a34

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