`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks

Overview

llm-chain 🚀

llm-chain is a collection of Rust crates designed to help you work with Large Language Models (LLMs) more effectively. Our primary focus is on providing 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. This includes, but is not limited to, summarizing lengthy texts or performing advanced data processing tasks.

GitHub Workflow Status Crates.io Crates.io License

Examples 💡

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::new_default();
let chain = Step::new(
    Model::ChatGPT3_5Turbo,
    [
        (Role::System, "You are a bot for making personalized greetings"),
        (Role::User, "Make a personalied greet for Joe"),
    ]
).to_chain();
let res = chain.run(Parameters::new(), exec).await.unwrap();
println!("{:?}", res);

Features 🌟

  • Prompt templates: Create reusable and easily customizable prompt templates for consistent and structured interactions with LLMs.
  • Chains: Build powerful chains of prompts that allow you to execute more complex tasks, step by step, leveraging the full potential of LLMs.
  • ChatGPT support: Currently supports ChatGPT models, with plans to add support for more LLMs in the future.
  • Extensibility: Designed with extensibility in mind, making it easy to integrate additional LLMs as the ecosystem grows.
  • Community-driven: We welcome and encourage contributions from the community to help improve and expand the capabilities of llm-chain.

Getting Started 🚀

To start using llm-chain, add it as a dependency in your Cargo.toml:

[dependencies]
llm-chain = "0.1.0"
llm-chain-openai = "0.1.0

Then, refer to the documentation and examples to learn how to create prompt templates, chains, and more.

Contributing 🤝

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.

License 📄

llm-chain is licensed under the MIT License.

Connect with Us 🌐

If you have any questions, suggestions, or feedback, feel free to open an issue or join our community discussions. 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! 🎉

You might also like...
generate peerid from secret_ed25119 for chains made with polkadot-sdk

genpeerid genpeerid is a command-line tool designed to generate a PeerId from an ED25519 secret key, formatted specifically for Polkadot and Substrate

Ingraind - a security monitoring agent built around RedBPF for complex containerized environments and endpoints.
Ingraind - a security monitoring agent built around RedBPF for complex containerized environments and endpoints.

ingraind is a security monitoring agent built around RedBPF for complex containerized environments and endpoints. The ingraind agent uses eBPF probes to provide safe and performant instrumentation for any Linux-based environment.

Helpers crate to simplify ink! chain extension development

OpenBrush Chain Extension library The library provides tools and primitives to simplify the development of chain extensions for ink! and for the subst

A crate for working with Ethereum beacon chain light client protocol messages. `no_std` friendly!

eth-lightclient-rs A crate for working with Ethereum beacon chain light client protocol messages. no_std friendly! !! For hacking and experimentation

The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canisters on IC,
The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canisters on IC,

Agent of Internet Computer for Unity The Intro The project brings the IC ecosystem to Unity, allowing Unity developers to call the functions of canist

Lockstitch is an incremental, stateful cryptographic primitive for symmetric-key cryptographic operations in complex protocols.

Lockstitch is an incremental, stateful cryptographic primitive for symmetric-key cryptographic operations (e.g. hashing, encryption, message authentication codes, and authenticated encryption) in complex protocols.

Release complex cargo-workspaces automatically with changelog generation, used by `gitoxide`

cargo smart-release Fearlessly release workspace crates and with beautiful semi-handcrafted changelogs. Key Features zero-configuration cargo smart-re

Radix Babylon vanity address finder allowing easy import into Radix mobile Wallet.
Radix Babylon vanity address finder allowing easy import into Radix mobile Wallet.

Rad Vanity address finder for Radix Babylon which you can import directly into your Radix Wallet using QR scanner using Import from a Legacy Wallet fe

NymDrive is a complete, end-to-end encrypted file syncing daemon that runs over the Nym network.

NymDrive NymDrive is a complete, end-to-end encrypted file syncing daemon that runs over the Nym network. Features Active file monitoring of changes i

Comments
  • Fix broken links in README.md

    Fix broken links in README.md

    Fix broken links in README.md which did not work due to README.md not being in root directory. Links to other documents (such as examples and license) are now absolute instead of relative which works regardless of the location of the README.md.

    opened by mantono 0
Owner
Sobel IO
Sobel IO
Starknet Stack let's you easily create new Cairo Starknet chains with their own sequencers, provers and verifiers

Starknet Stack flowchart LR A("Client") ==>|"Starknet Transactions"| subGraph0["Sequencer"] subGraph0 -.->|"Blocks with txs"| 300319["Watcher prover

Lambdaclass 7 Jul 11, 2023
CLI tool for deterministically building and verifying executable against on-chain programs or buffer accounts

Solana Verify CLI A command line tool to build and verify solana programs. Users can ensure that the hash of the on-chain program matches the hash of

Ellipsis Labs 5 Jan 30, 2023
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 15 Oct 25, 2022
Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Ahmad Abdullahi Adamu 7 Jan 9, 2023
Complete Ethereum and Celo wallet implementation and utilities in Rust

ethers.rs Complete Ethereum and Celo wallet implementation and utilities in Rust Documentation Extensive documentation and examples are available here

Georgios Konstantopoulos 1.5k Jan 8, 2023
A template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it.

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

null 1 Mar 7, 2022
Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it

CoinSwap is a Smart Contract that is built on the terra blockchain and can be used to swap cryptocurrencies such as LUNA, UST, TerraUSD, Anchor, Mirror Protocol, LUNI and other CW20 tokens. The Project also contains a smart contract which works as a analysis tool for the gas fees on the Terra Blockchain.

Prajjwal Chittori 9 Oct 11, 2022
Alternative client for Substrate-based chains.

Lightweight Substrate and Polkadot client. Introduction smoldot is an alternative client of Substrate-based chains, including Polkadot. There exists t

null 14 Feb 16, 2023
A framework for developing EVM-compatible chains

rt-evm A compact development framework for creating EVM-compatible runtimes/chains. Usage Check the example for details. Projects referenced trie, MPT

Rust Util Collections 4 Mar 15, 2023
Web App for exploring Substrate-based Chains using Subxt

Subxt Explorer Check it out at https://paritytech.github.io/subxt-explorer/. An SPA for exploring metadata of substrate based blockchains in the Brows

Parity Technologies 5 Oct 30, 2023