MTLLM Provides Easy to use APIs for different LLM Providers to be used with Jaseci's Jaclang Programming Language.
Project description
MTLLM API library
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:py 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:py from mtllm.llms, OpenAI;
import:py 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mtllm-0.3.4.tar.gz
.
File metadata
- Download URL: mtllm-0.3.4.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 407a315916d8dfc211918ce23fadbc856e6333572f33342156ef10ace14efafb |
|
MD5 | 0ef0809c3c818e3a7dbab50215a8d230 |
|
BLAKE2b-256 | c4727de61df2e6c23a338c1644b5fe553cc1315f1f1116dd07f227777e765772 |
File details
Details for the file mtllm-0.3.4-py2.py3-none-any.whl
.
File metadata
- Download URL: mtllm-0.3.4-py2.py3-none-any.whl
- Upload date:
- Size: 27.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c0691d2194a149e346c568eadf11dbf2dfb6eb3a1bfdd0e211a42c39daa755c |
|
MD5 | 0457dcff64cea70a9f2d1f64cbb9c68a |
|
BLAKE2b-256 | 26aeebf32ebb769223cc1f79df3e2a99e58d0e9a90a320b76b77373970659f44 |