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
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.2.0.tar.gz
.
File metadata
- Download URL: mtllm-0.2.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1024-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5be1073392d92e2d2817f63c97812fcfcd911d20dc0c34967cf9c4a6c41383f |
|
MD5 | 455b23d75cf4046bc8a4cd8b3a958c33 |
|
BLAKE2b-256 | 9bb59094233e33b03a1e69b96974636681581400c3af39cae592d42a6e02717a |
File details
Details for the file mtllm-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: mtllm-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.5.0-1024-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eb9d5cb761510eab3b733ecc1e6e8d8a8871ef0ecd34cb2ea7d1fdfa4d68ea4 |
|
MD5 | 9cf274759b248abf65c50eaa6b87a998 |
|
BLAKE2b-256 | a30b2c211e2a24a7085cc07fd5a75294d2b691794022f3a67a3a5efa45282127 |