Convenient LLM chat wrapper for data pipelines, CI/CD, or personal workspaces.
Project description
LLMT
Convenient LLM chat wrapper for data pipelines, CI/CD, or personal workspaces.
Supports local function calling, chat history retention, and can run wherever. Chat using a terminal, input/output files, or directly through LLMT API.
Getting started
Install Docker and make command.
- Optionally create custom functions in the udf/ directory and import them in cli.py.
- Update or create a new configuration file in configs/.
- Make sure the configuration file describes your custom functions in
assistants.tools
. - Run
make run
. - Use files/input.md to send messages.
- Use files/output.md to receive messages.
- CTRL + C to quit out of the container and clean up orphans.
Configuration file
If both (input_file, output_file) are ommited, then the default terminal will be used. Using the input and output files to converse with an LLM is easier than using the terminal.
- input_file: specify a file for user input
- output_file: specify a file for LLM response
- assistants:
- type: Assistant type, currently only OpenAI.
- assistant_name: Assistant name.
- assistant_description: Assistant description which OpenAI will use for assistant context.
- api_key: OpenAI API key.
- model: OpenAI model.
- tools: Function definitions. For now, in addition to creating functions, functions must be also defined in a format which OpenAI API can understand. Functions take one object argument which must be unpacked to extract arguments within each function. Hopefully this changes in the future.
The image used for running this code has some common tools installed which I use daily in my custom functions:
- awscli
- cloudquery
- numpy
- pandas
- psycopg2-binary
- SQLAlchemy
Build and use your own image with additional tools for whatever your functions need.
Need help?
I help organizations build data pipelines with AI integrations. If your organization needs help building or exploring solutions, feel free to reach me at artem at outermeasure.com. The general workflow is:
- Fine tune a curated model with proprietary data to perform tasks specific to your pipeline.
- Deploy the model in your cloud environment.
- Connect your pipeline to the deployment via an API.
- Iterate and improve the model.
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 llmt-0.0.1.tar.gz
.
File metadata
- Download URL: llmt-0.0.1.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92bf8b0caa22e706ccce551e2169861a9158d3b56002e63795e874c37da55ccf |
|
MD5 | 3ce4167bb5bf1074c09ae49a7979a39d |
|
BLAKE2b-256 | 24b29a3a67ed9bb539a19705539086640fea549723822762ff1592ad32689a45 |
File details
Details for the file llmt-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: llmt-0.0.1-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80f6eab2af35164bb8dd5ed9f187c6c4c13a3b3e12947151591c0b7dfea44eee |
|
MD5 | be4f24e4542be0e242e6a188864d496e |
|
BLAKE2b-256 | 33aa9cba294508aff38b732a7d86763f3e41c70d8f16ef2934cb1f204cb2e861 |