Skip to main content

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:

  1. 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 the OpenAIChat object is the exact field that is passed to the underlying api.
  2. 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
  3. Langchain Interoperable: Langtree can be used with Langchain. Although we are opinionated about Langtree, Langchain offers a LOT of value.
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langtree-0.1.1.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

langtree-0.1.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file langtree-0.1.1.tar.gz.

File metadata

  • Download URL: langtree-0.1.1.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for langtree-0.1.1.tar.gz
Algorithm Hash digest
SHA256 790853d34cbc4bfd1aaf25b53dc2d3f0b9ce660bf15137fd1516587f3fc22712
MD5 b646743860647bdafafd69ae329f3301
BLAKE2b-256 45ff0ba4991278958b8d351ab6116073c2ab4445d42983b592d4c2e27946960e

See more details on using hashes here.

File details

Details for the file langtree-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: langtree-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for langtree-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 01fabfa1098d299cb2860f1ab1af7425c0e25d13c61388ca50cdba82ca00014e
MD5 a3a60386c6b52c4d2c5680b9d7035896
BLAKE2b-256 ce8925a58f40540453e431c042b21cda7ec3987670d84061e878b2770cedfe06

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page