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.3.10.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.3.10-py2.py3-none-any.whl (16.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: mtllm-0.3.10.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.3.10.tar.gz
Algorithm Hash digest
SHA256 785f9c34f2a947fff2f8e95b1e425776064592f420f716f099a8ab07a07dbb45
MD5 48e227fb883dcfce1e1d00b0d0bd661a
BLAKE2b-256 029a531210ad6400438726256e2385778cfdc1128b2ec72caf8aee392c2da4e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mtllm-0.3.10-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.3.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 517cfb1875299d166bf820cf1740f5946b904a40c52a92d630d5ed1933fc35cf
MD5 3f008b5dcd735249de846fa37c597cd2
BLAKE2b-256 b28e81d964e45063d107e046967e20e5c06a9e5c10d93eb4bbcb9d0c4d48d2e7

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