Skip to main content

A tiny language interpreter

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 pre-made prompts down your throat.

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

Installation

pip install tinylang

Usage

See examples as well!

from tinychain.memory import ConversationMemory
from tinychain.llms import OpenAI
from tinychain.chains import Chain

memory = ConversationMemory(last_k=10)

chatGPT = OpenAI(openai_api_key='')

chain = Chain(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.

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.6.10.tar.gz (9.7 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.6.10-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tinylang-0.6.10.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tinylang-0.6.10.tar.gz
Algorithm Hash digest
SHA256 3fc203f0c8719a1e09838ea9b7056215b89fe2f99f571be299b7385e73f7ee7e
MD5 cb24967cf8b57619febdf78f5853bb4c
BLAKE2b-256 cbc83f31accbd957ebd017deb358bef43325b692aaf93f874359d310a621d5d6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinylang-0.6.10-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tinylang-0.6.10-py3-none-any.whl
Algorithm Hash digest
SHA256 edbb91357a37ed359e43cba27eeac2e462e767f4a6f1d27d46ea0b1e055c3f71
MD5 6dccb729f30a2f414c555b1d1a6ca1eb
BLAKE2b-256 1e8a67729ada881b5398b249f12bfb4c4e9ac09a7b95e99acf3a7a3f93e91d91

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