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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydantic_ai_unofficial_models-0.0.1.tar.gz.
File metadata
- Download URL: pydantic_ai_unofficial_models-0.0.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5167447c2713d06e3ea794bc9a388c7d0a4896569ae9f2c8d4374a87cf1f9e6
|
|
| MD5 |
561f111f6f90c8edcaaed05d1139e3e9
|
|
| BLAKE2b-256 |
89c8cfb7bd4661c0cd210b39e14e1ebf6ee1ad1f1aa5499c5668c6c778294516
|
File details
Details for the file pydantic_ai_unofficial_models-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pydantic_ai_unofficial_models-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d83bed2302f2d64535e46e63b11c345ece344b1f79e6b5fe4a7952f886fdcc01
|
|
| MD5 |
aa75883b5166016860806625e62a183f
|
|
| BLAKE2b-256 |
ff4dcf36aaea24289b2238f97eef0773c1104805db12f40ba092a99643b5c7f0
|