Skip to main content

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

Project description

MTLLM - 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. MTLLM is the plugin built, exploring this hypothesis. MTLLM is built as a plugin to the Jaseci ecosystem. This plugin can be installed as a PyPI package.

pip install mtllm

Basic Example

A basic usecase of MTP can be demonstrated as follows:

import from mtllm{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 mtllm {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 MTLLM 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

mtllm-0.4.0.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.

mtllm-0.4.0-py2.py3-none-any.whl (16.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file mtllm-0.4.0.tar.gz.

File metadata

  • Download URL: mtllm-0.4.0.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 mtllm-0.4.0.tar.gz
Algorithm Hash digest
SHA256 54359f58368820433601e80af59f201c907ecc17572e852fd2f2ef15b9f1e66c
MD5 caf9bad6d5cc60d221b4bd820c49881d
BLAKE2b-256 896dd2b86ee4865d4026a58211655623d6f5a408e518d771db905a92fabaf609

See more details on using hashes here.

File details

Details for the file mtllm-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: mtllm-0.4.0-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 mtllm-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c07b2a3b176ea607b0e39bc328632ce4ae7d4b853530d004b809b8d9098927ba
MD5 01c68534b86c7433ee807e46f71cb6a9
BLAKE2b-256 172704e1582268346bdc745449a94717d6059441044b80d92dc8b5d20230bba0

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