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

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: mtllm-0.3.7.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.7.tar.gz
Algorithm Hash digest
SHA256 09b019ff3b22fc768fc8154ec83b326b5f2f6a8c4d0267e336dc9b5bdcd60609
MD5 5a8712e41853782b7991e746a5ff34c2
BLAKE2b-256 28877e98c53f1c87bb553afd734e42498c91c000e46aa7854e15d8f9930d2bd5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mtllm-0.3.7-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.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6aff70725390ead507a558a14139351b6ec4db8d14905b1e13dcb4b41062644f
MD5 b3d0180d6e890d771144d340edddbb45
BLAKE2b-256 9399d416b7e2d4f90d31bb23ff21981af9d02b64dcf829316bfd712e542c8368

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