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.6.tar.gz (23.0 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.6-py2.py3-none-any.whl (34.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for mtllm-0.3.6.tar.gz
Algorithm Hash digest
SHA256 14bff01d24a2a8ef532220216266fcd7b11e1e72554ef723850c7fe20d3a277f
MD5 048e2c0b6f1b633c565b16c85e605871
BLAKE2b-256 a10531056950ec55558f543576263af51dd71d0f6039b15076deb51fe95ea77e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mtllm-0.3.6-py2.py3-none-any.whl
  • Upload date:
  • Size: 34.2 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-1014-azure

File hashes

Hashes for mtllm-0.3.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c2bf121c0ed8cfd6dd008a5bf940dad5ca74ea69966a27812e336fb430a5a964
MD5 2fb31e477586610ff0194b0c9cc55007
BLAKE2b-256 f3efdb191842439eee1a2d49d63572e9f454f5fea936a5dc1e80a885ff3258b7

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