A minimalist python library for LLMs. Our mission is to reduce the mental overhead of developers interacting with language models. This perhead required to interact with language models without making you leave your framework of choice.
Project description
Welcome to Langtree!
What is Langtree
Langtree is a micro framework for building natively parallel LLM chains. Our goal is to keep the core of this repo under 100 LOC (not including test cases).
Why use Langtree?
Langtree is dead simple. It's under 100 LOC for the core of the project. Seriously. Theres only 3 constructs: Operators, Buffers, and Prompts.
This means the following capabilities are trivial:
- Debuggability: Langtree is insanely debuggable.
It's so minimal that the underlying api's are almost identical to those exposed by our integrations.
For example, the
messages
field on theOpenAIChat
object is the exact field that is passed to the underlying api. - Natively Parallel: A common issue with LLM tools is parallelism. With Langtree, doing this is a piece of cake. This means Agents, retrieval, etc. are far quicker to iterate upon. Make sure to read the docs before using the parallel tools
- Langchain Interoperable: Langtree can be used with Langchain. Although we are opinionated about Langtree, Langchain offers a LOT of value.
- Back Compatibility: Expect Langtree to be extremely stable. Its so flexible that it actually adjusts when integrations change. It's only this capable because it is minimal. This is why we are commited to keeping the core library under 200 LOC. Forever.
Features
Chain recording
We offer a simple abstraction to record analytics on any chain (Including Langchain code)
We currently only have recording to JSON but expect to see more by 08/11/23
Providers
Models: We currently support OpenAI.
Roadmap
Function Calling: We plan to support function calls in the VERY near future. Models: To support Azure, Huggingface (local and remote), Anthropic and Cohere VectorDBs: Currently in development. Again we promise to maintain minimal levels of abstraction. Recording: We are in the process of implementing S3, Planetscale, and more!
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 langtree-0.1.0.tar.gz
.
File metadata
- Download URL: langtree-0.1.0.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dba5573560da131190be9e4fcf357507a0cf5a45ed2640dc17f2ea10f5759886 |
|
MD5 | a8f7caed37a5eb416bd83c3d70860d6d |
|
BLAKE2b-256 | fcc431a5c191b0bb5034cb69a1146d6bce78c48de3f1cbcd4083f2c5be6f355c |
File details
Details for the file langtree-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: langtree-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f55fb38abe69b05e86878cea05fbb137b24f1019d63e1471163739ce68cf145 |
|
MD5 | 02f960a0d493c852b121617a654737c5 |
|
BLAKE2b-256 | 646a213afe7c2be5d7967169585a80df50a218ce3b7d732ac9990650f28fab54 |