Crates.io | llm-chain |
lib.rs | llm-chain |
version | 0.13.0 |
source | src |
created_at | 2023-03-25 14:17:05.202043 |
updated_at | 2023-11-15 20:49:46.627628 |
description | A library for running chains of LLMs (such as ChatGPT) in series to complete complex tasks, such as text summation. |
homepage | |
repository | https://github.com/sobelio/llm-chain/ |
max_upload_size | |
id | 820290 |
size | 250,957 |
llm-chain
is a collection of Rust crates designed to help you create advanced LLM applications such as chatbots, agents, and more. As a comprehensive LLM-Ops platform we have strong support for both cloud and locally-hosted LLMs. We also provide robust support for prompt templates and chaining together prompts in multi-step chains, enabling complex tasks that LLMs can't handle in a single step. We also provide vector store integrations making it easy to give your model long-term memory and subject matter knowledge. This empowers you to build sophisticated applications.
This crate is the main crate for llm-chain
. You will need driver crate such as llm-chain-openai
, or llm-chain-local
To help you get started, here is an example demonstrating how to use llm-chain
. You can find more examples in the examples folder in the repository.
let exec = executor!()?;
let res = prompt!(
"You are a robot assistant for making personalized greetings",
"Make a personalized greeting for Joe"
)
.run(parameters()!, &exec)
.await?;
println!("{}", res);
β‘οΈ tutorial: get started with llm-chain β‘οΈ quick-start: Create project based on our template
llm-chain
.To start using llm-chain
, add it as a dependency in your Cargo.toml
:
cargo add llm-chain llm-chain-openai
The examples for llm-chain-openai
require you to set the OPENAI_API_KEY
environment variable which you can do like this:
export OPENAI_API_KEY="sk-YOUR_OPEN_AI_KEY_HERE"
Then, refer to the documentation and examples to learn how to create prompt templates, chains, and more.
We warmly welcome contributions from everyone! If you're interested in helping improve llm-chain
, please check out our CONTRIBUTING.md
file for guidelines and best practices.
llm-chain
is licensed under the MIT License.
If you have any questions, suggestions, or feedback, feel free to open an issue or join our community discord. We're always excited to hear from our users and learn about your experiences with llm-chain
.
We hope you enjoy using llm-chain
to unlock the full potential of Large Language Models in your projects. Happy coding! π