✨ A minimal generative models router
Project description
A minimal generative models router, caching, structured output with native python linting.
Work in progress.
Chat example
from delusion.chat.router import Ollama
from pydantic import BaseModel, Field
class Country(BaseModel):
name: str
capital: str
languages: set[str] = Field(
description="Officially recognized languages"
)
chat = Ollama().serve()
chat.gemma4("e2b").pull()
chat.send("Tell me about Canada, its capital and spoken languages.")
# Your linter should properly point to the class
canada = chat.generate(schema=Country)
print(canada.struct)
assert (canada.struct.name == "Canada")
assert (canada.struct.capital == "Ottawa")
assert (canada.struct.languages == {"English", "French"})
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 delusion-0.1.0-py3-none-any.whl.
File metadata
- Download URL: delusion-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5453654efc93adb5e649c2da8959884aad154b7b0d132b6406a0f5f439344833
|
|
| MD5 |
34466c137c8392f72e1851c58367008a
|
|
| BLAKE2b-256 |
4e9b487f85d61bd8a4baae5aecb4f14c6f4f0480e3e0a9db47613c6381ba703f
|