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 API library

PyPI version tests

The MTLLM Python library provides convenient access to a large number of easy to use and customizable APIs to be used in Jaseci's Jaclang by llm feature. The Library provides automatic output fixing, output type validation, different prompting techniques, and more.

Documentation

The documentation on how to use this library with Jaseci's Jaclang can be found here.

Installation

[!IMPORTANT] Though this is can be used with python projects, it is primarily intended to be used with Jaseci's Jaclang.

# install from PyPI
pip install mtllm

Usage

Refer the Documentation for detailed usage instructions.

Using Different LLMs

import from mtllm.llms, OpenAI;

glob llm = OpenAI();

can "Translate English to French"
translate(word: "English Word": str) -> "French Word": str by llm();

Based on your LLM of choice, make sure to set the API Key in the environment variable. For example, for OpenAI:

export OPENAI_API_KEY="your-api-key"

Using Tools

import from mtllm.llms, OpenAI;
import from mtllm.tools, wikipedia;

glob llm = OpenAI();

can "Answer History Questions"
history_qa(question: "History Question": str) -> "Detailed Answer": str by llm(tools=[wikipedia]);

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

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.8.tar.gz (24.1 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.8-py2.py3-none-any.whl (35.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: mtllm-0.3.8.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.11.0-1015-azure

File hashes

Hashes for mtllm-0.3.8.tar.gz
Algorithm Hash digest
SHA256 9480bee7dddff87c1194258268f4dcaa765aa6a9d9be1fdabce8c82dc2752ad7
MD5 d0376436e351ee8b9fd811e25fec060a
BLAKE2b-256 02c9aa97e22e1080a58cf7102e85839d0c47c3985a261d37ee8c4fef359b5ee0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mtllm-0.3.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Linux/6.11.0-1015-azure

File hashes

Hashes for mtllm-0.3.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0592d19e9f260e06f9a56766bb46597b401a5c2d1d1cfb9b23ba504f6251ef97
MD5 fc805aacd906d416985ca50f3a37e171
BLAKE2b-256 d5e85a6545737129cbe945111b6e086327c8a3b8726aae7f7fee5b7ea6302858

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