mtllm


Namemtllm JSON
Version 0.3.9 PyPI version JSON
download
home_pageNone
SummaryMTLLM Provides Easy to use APIs for different LLM Providers to be used with Jaseci's Jaclang Programming Language.
upload_time2025-07-16 03:40:54
maintainerJason Mars
docs_urlNone
authorJason Mars
requires_pythonNone
licenseMIT
keywords llm jaclang jaseci mtllm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MTLLM - AI Integration Framework for Jac-lang

[![PyPI version](https://img.shields.io/pypi/v/mtllm.svg)](https://pypi.org/project/mtllm/) [![tests](https://github.com/jaseci-labs/jaseci/actions/workflows/test-jaseci.yml/badge.svg?branch=main)](https://github.com/jaseci-labs/jaseci/actions/workflows/test-jaseci.yml)

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.

```bash
pip install mtllm
```

## Basic Example

A basic usecase of MTP can be demonstrated as follows:

```python
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

```python
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](https://www.jac-lang.org/learn/jac-mtllm/with_llm/)

**🎮 Complete Examples**:
- [Fantasy Trading Game](https://www.jac-lang.org/learn/examples/mtp_examples/fantasy_trading_game/) - Interactive RPG with AI-generated characters
- [RPG Level Generator](https://www.jac-lang.org/learn/examples/mtp_examples/rpg_game/) - AI-powered game level creation
- [RAG Chatbot Tutorial](https://www.jac-lang.org/learn/examples/rag_chatbot/Overview/) - Building chatbots with document retrieval

**🔬 Research**: The research journey of MTP is available on [Arxiv](https://arxiv.org/abs/2405.08965).

## Quick Links

- [Getting Started Guide](https://www.jac-lang.org/learn/jac-mtllm/with_llm/)
- [Model Configuration](https://www.jac-lang.org/learn/jac-mtllm/model_declaration/)
- [Jac Language Documentation](https://www.jac-lang.org/)
- [GitHub Repository](https://github.com/jaseci-labs/jaseci)
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mtllm",
    "maintainer": "Jason Mars",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "jason@jaseci.org",
    "keywords": "llm, jaclang, jaseci, mtllm",
    "author": "Jason Mars",
    "author_email": "jason@jaseci.org",
    "download_url": "https://files.pythonhosted.org/packages/ec/6c/5953b91773375856bbb6087948f57f0ea0b5b7d71ea544bc2959acfea79a/mtllm-0.3.9.tar.gz",
    "platform": null,
    "description": "# MTLLM - AI Integration Framework for Jac-lang\n\n[![PyPI version](https://img.shields.io/pypi/v/mtllm.svg)](https://pypi.org/project/mtllm/) [![tests](https://github.com/jaseci-labs/jaseci/actions/workflows/test-jaseci.yml/badge.svg?branch=main)](https://github.com/jaseci-labs/jaseci/actions/workflows/test-jaseci.yml)\n\nMeaning 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.\n\n```bash\npip install mtllm\n```\n\n## Basic Example\n\nA basic usecase of MTP can be demonstrated as follows:\n\n```python\nimport from mtllm{Model}\n\nglob llm = Model(model_name=\"openai\\gpt-4o\");\n\ndef translate_to(language: str, phrase: str) -> str by llm();\n\nwith entry {\n    output = translate_to(language=\"Welsh\", phrase=\"Hello world\");\n    print(output);\n}\n```\n\n## AI-Powered Object Generation\n\n```python\nimport from mtllm {Model}\n\nglob llm = Model(model_name=\"gpt-4o\");\n\nobj Task {\n    has description: str,\n        priority: int,\n        estimated_time: int;\n}\n\nsem Task.priority = \"priority between 0 (highest priority) and 10(lowest priority)\";\n\ndef create_task(description: str, previous_tasks: list[Task]) -> Task by llm();\n\nwith entry {\n    tasks = [];\n    new_task = create_task(\"Write documentation for the API\", tasks);\n    print(f\"Task: {new_task.description}, Priority: {new_task.priority}, Time: {new_task.estimated_time}min\");\n}\n```\n\nThe `by` abstraction allows to automate semantic extraction from existing code semantics, eliminating manual prompt engineering while leveraging type annotations for structured AI responses.\n\n## Documentation and Examples\n\n**\ud83d\udcda Full Documentation**: [Jac MTLLM Documentation](https://www.jac-lang.org/learn/jac-mtllm/with_llm/)\n\n**\ud83c\udfae Complete Examples**:\n- [Fantasy Trading Game](https://www.jac-lang.org/learn/examples/mtp_examples/fantasy_trading_game/) - Interactive RPG with AI-generated characters\n- [RPG Level Generator](https://www.jac-lang.org/learn/examples/mtp_examples/rpg_game/) - AI-powered game level creation\n- [RAG Chatbot Tutorial](https://www.jac-lang.org/learn/examples/rag_chatbot/Overview/) - Building chatbots with document retrieval\n\n**\ud83d\udd2c Research**: The research journey of MTP is available on [Arxiv](https://arxiv.org/abs/2405.08965).\n\n## Quick Links\n\n- [Getting Started Guide](https://www.jac-lang.org/learn/jac-mtllm/with_llm/)\n- [Model Configuration](https://www.jac-lang.org/learn/jac-mtllm/model_declaration/)\n- [Jac Language Documentation](https://www.jac-lang.org/)\n- [GitHub Repository](https://github.com/jaseci-labs/jaseci)",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "MTLLM Provides Easy to use APIs for different LLM Providers to be used with Jaseci's Jaclang Programming Language.",
    "version": "0.3.9",
    "project_urls": null,
    "split_keywords": [
        "llm",
        " jaclang",
        " jaseci",
        " mtllm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d80c5a3339e958fb18497841ed427246b3260fff7fac3bfb3d44caf494609fe",
                "md5": "9c8d50a4ba7fc995ff22990fe69560e2",
                "sha256": "73516f32d07b31e8f7283bb3ca5e7bba16023d79fcfaa9ebf1428abf2e7c48c2"
            },
            "downloads": -1,
            "filename": "mtllm-0.3.9-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9c8d50a4ba7fc995ff22990fe69560e2",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 13773,
            "upload_time": "2025-07-16T03:40:53",
            "upload_time_iso_8601": "2025-07-16T03:40:53.408445Z",
            "url": "https://files.pythonhosted.org/packages/6d/80/c5a3339e958fb18497841ed427246b3260fff7fac3bfb3d44caf494609fe/mtllm-0.3.9-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec6c5953b91773375856bbb6087948f57f0ea0b5b7d71ea544bc2959acfea79a",
                "md5": "4ed7ed1bb2a09025f3833e1d36103b62",
                "sha256": "6d2f935314060b9e1d59facccb61841ba099a1adee79728b1eba7e19ced656c6"
            },
            "downloads": -1,
            "filename": "mtllm-0.3.9.tar.gz",
            "has_sig": false,
            "md5_digest": "4ed7ed1bb2a09025f3833e1d36103b62",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12895,
            "upload_time": "2025-07-16T03:40:54",
            "upload_time_iso_8601": "2025-07-16T03:40:54.881925Z",
            "url": "https://files.pythonhosted.org/packages/ec/6c/5953b91773375856bbb6087948f57f0ea0b5b7d71ea544bc2959acfea79a/mtllm-0.3.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-16 03:40:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "mtllm"
}
        
Elapsed time: 2.05147s