Skip to main content

A framework for AI engineering

Project description

Aixen: AI x Engineering

PyPI version

An open-source toolkit for the rapid development of AI-powered applications.

Features:

  • Clean Pipelines: Write AI pipelines as simple Python functions for readability and easy team collaboration.
  • Declarative: Use type annotations and Pydantic for function signatures, enabling auto-checks and code generation.
  • Tracking: Track and debug AI runs with statistics, performance evaluation, and API cost tracking. Gather fine-tuning samples.
  • Learnable Functions: (Coming soon) Optimize functions with hyperparameters automatically.

Quick Start

Install using pip:

pip install aixen

Add API keys to the environment or .env file in your working directory:

OPENAI_API_KEY=sk-xxx

A simple pipeline:

import aixen as ai
from pydantic import BaseModel

@ai.fn
def add(a: int, b: int) -> int:
    """
    Adds two numbers
    """
    return a + b


@ai.chat_fn
def factorial(n: int) -> int:
    """
    Calculates the factorial of a number
    """


class GreetingCard(BaseModel):
    text: str
    image_description: str


@ai.chat_fn
def greet(name: str) -> GreetingCard:
    """
    Creates a greeting media message for a person specified by the user.
    """


with ai.Context() as context:
    result = add(a=1, b=2)
    fact5 = factorial(5)
    card = greet(name="Lev")

    print(f"Greeting card: {card}")
    print(f"Used: ${context.usage_cost_usd}")

See the examples folder.

Community and Support

Join our community to stay updated and get support:

If you encounter any issues, please open an issue on GitHub.

Contributing

We welcome contributions from the community!

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

aixen-0.1.0.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

aixen-0.1.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aixen-0.1.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for aixen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25274cf106bead7110ee598c8dcbd8cc79116525f4a60309cc2d204a37c2e55e
MD5 29301d2b7a2328abd7563beb0ac91063
BLAKE2b-256 05c6fbaeb2b2e3c5cb2135638a49bcb5c2dcc247d1c6a1fddf831a8683ee0921

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aixen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for aixen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abbb184464b80cc584431a28fb6316db4597e338017b8bfcafaad0c96db30b06
MD5 c2940c9790c7c20b0e21a78406aa0c47
BLAKE2b-256 ab9715362e2a736730c2414e82548e66117fcf29f9bb23cee081f6fc2cd2e745

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page