Skip to main content

Langchain simplified

Project description

🦜🔗🔍 Tinylang

Make working with LLMs insanely simpler and easier than ever before.

What is tinylang?

A hackable and simpler Langchain.

Langchain can be very cumbersome and annoying to work with. It's too big, complicated, and shoves premade prompts down your throat.

With tinylang, everything is intuitive and customizeable, following most of the Langchain API.

Installation

pip install tinylang

Usage

from tinychain.memory import ConversationMemory
from tinychain.llms import OpenAIChat
from tinychain.chains import LLMChain

memory = ConversationMemory(last_k=10)

chatGPT = OpenAIChat(OPENAI_API_KEY='')

chain = LLMChain(memory, chatGPT)

prompt = "Hello"
print(chain.run(prompt))

Features

  • 🧠 Conversation Memory. Keep all or some aspects of your conversation
  • 🤖 OpenAI LLMs. It couldn't be easier to call the OpenAI API.
  • 💻 Prompts. Simple and hackable.

Contributing

To automatic package versions, we use semantic-release, which automatically bumps versions based on our commit messages. See here.

Example: add a feature, minor version will be bumped from 0.1.0 to 0.2.0:

git commit -m "feat: add example data and datasets module"

Example: fix a bug, patch version bumped from 0.1.0 to 0.1.1

git commit -m "fix: fix confusing error message in plot_words"

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

tinylang-0.1.12.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinylang-0.1.12-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file tinylang-0.1.12.tar.gz.

File metadata

  • Download URL: tinylang-0.1.12.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

File hashes

Hashes for tinylang-0.1.12.tar.gz
Algorithm Hash digest
SHA256 63007a308b887dc570e9a9fa14ce2630c87001dba1b02f6e5ed64a75364f005f
MD5 889d97f53341b4cbb14ebbcef8e89a35
BLAKE2b-256 99fe30199f0493605ef3fe58e297182771acae32f43423ecc42d0ae08bf707b3

See more details on using hashes here.

File details

Details for the file tinylang-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: tinylang-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

File hashes

Hashes for tinylang-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 70e7104689b2d18caf039b9c5cb6c9a4530f280547985729334867cadab0de88
MD5 78aa6dfecbcf2ee831c127ad536cb69e
BLAKE2b-256 22f7fdc38284ab7190a0c6e3d7aa8b51e58bb34298a892f807d3817528341903

See more details on using hashes here.

Supported by

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