Skip to main content

byLLM Provides Easy to use APIs for different LLM Providers to be used with Jaseci's Jaclang Programming Language.

Project description

byLLM - AI Integration Framework for Jac-lang

PyPI version tests

Meaning Typed Programming (MTP) is a programming paradigm for AI integration where prompt engineering is hidden through code semantics. byLLM is the plugin built, exploring this hypothesis. byLLM is built as a plugin to the Jaseci ecosystem. This plugin can be installed as a PyPI package.

pip install byllm

Basic Example

A basic usecase of MTP can be demonstrated as follows:

import from byllm {Model}

glob llm = Model(model_name="openai\gpt-4o");

def translate_to(language: str, phrase: str) -> str by llm();

with entry {
    output = translate_to(language="Welsh", phrase="Hello world");
    print(output);
}

AI-Powered Object Generation

import from byllm {Model}

glob llm = Model(model_name="gpt-4o");

obj Task {
    has description: str,
        priority: int,
        estimated_time: int;
}

sem Task.priority = "priority between 0 (highest priority) and 10(lowest priority)";

def create_task(description: str, previous_tasks: list[Task]) -> Task by llm();

with entry {
    tasks = [];
    new_task = create_task("Write documentation for the API", tasks);
    print(f"Task: {new_task.description}, Priority: {new_task.priority}, Time: {new_task.estimated_time}min");
}

The by abstraction allows to automate semantic extraction from existing code semantics, eliminating manual prompt engineering while leveraging type annotations for structured AI responses.

Documentation and Examples

📚 Full Documentation: Jac byLLM Documentation

🎮 Complete Examples:

🔬 Research: The research journey of MTP is available on Arxiv.

Quick Links

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

byllm-0.4.1.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

byllm-0.4.1-py2.py3-none-any.whl (16.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file byllm-0.4.1.tar.gz.

File metadata

  • Download URL: byllm-0.4.1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for byllm-0.4.1.tar.gz
Algorithm Hash digest
SHA256 d97e0a38d9ebec89fe8c30f0283308aee3e4354d85b68ecd77b01df547d81fdd
MD5 708d02cbe2d30f32e5e96dace676d531
BLAKE2b-256 465e25b7f560dff2ac95fb39f51b4ad7144ad61c19cc71cdeca90898d8e78860

See more details on using hashes here.

File details

Details for the file byllm-0.4.1-py2.py3-none-any.whl.

File metadata

  • Download URL: byllm-0.4.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for byllm-0.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ed9111293974b573bfc71b1ee3d385d4ababd5305128b7abcbadfb55d8dc4e91
MD5 53c80bae0f7790a69567658b43c15dd9
BLAKE2b-256 5e099d9d5bbdb697ee83001fa0aeb5a8ccc1d48a8f8be373c0deab74fad9406f

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