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.0.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.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0c788c5851574980c7891c1b330faa61595952205def275cb100abb2208e3786
MD5 6a9635e74c387a43a13a93b99dacd420
BLAKE2b-256 56e17492587ded71cfd5ffa7103a334c16fa1f98e6729a4c980f40fa00693370

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pydantic_ai_unofficial_models-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b814612883cd96988b6254365893288dffc8293aa029337009aaee3a253d8593
MD5 bdef74b5475adf85805e9eeaab2aca1b
BLAKE2b-256 08716b9aa31536336091c2ea7abf121d669ee717a2eeef1c6653fceed7a4be43

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