onux
Keras-style symbolic DAGs for LLM programs.
onux is a Python library for semantic inputs, composable layers, and model graphs that look and feel like Keras, but target LLM workflows.
Install
uv add onux
For local development:
uv venv .venv
source .venv/bin/activate
uv sync
Quick example
from onux import Input, Model
from onux.layers import ChainOfThought, Generate
question = Input("question")
context = Input("context", type=list[str])
answer = ChainOfThought("answer")([question, context])
score = Generate(("score", float))([question, answer])
model = Model(
inputs=[question, context],
outputs=score,
name="qa_pipeline",
)
model.compile(optimizer="auto_prompt", meta_lm="gpt-4o")
model.fit(
[
{
"question": "What's the capital of France?",
"context": ["Paris is the capital of France."],
"score": 1.0,
}
]
)
model.summary()
Current status
This package is intentionally minimal right now. It includes:
- symbolic
Input(...) - a base
Layer - graph-closing
Model(...) - placeholder built-in layers like
Generate,ChainOfThought,ReAct,Retrieve,ExecuteSQL, andMap
License
MIT
Metadata
Release files for onux 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| onux-0.1.1.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| onux-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / onux-0.1.1.tar.gz
| Download URL | onux-0.1.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4de679336faa77fea5b243272d7526d31eb97208df4a84945201d70ef12b2c3
|
|
BLAKE2b-256 checksum How to use checksums |
f98df49d08c3a3d992a3daef554c81926c2affdaf220d66ffe564d818d74f889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / onux-0.1.1-py3-none-any.whl
| Download URL | onux-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
86f0c58737e0d0d46f2523cca49a6f67d1fceb86fdb36f60e87d4e1f5ce9da91
|
|
BLAKE2b-256 checksum How to use checksums |
113cde6b4f0a21eb84f08028a29a07622559972d8ace3c610793a79d34276425
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|