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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tinylang-0.6.7.tar.gz
  • Upload date:
  • Size: 9.1 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.7.tar.gz
Algorithm Hash digest
SHA256 9eb4977c4865cba5c70bb8b1483ed4c4e06556382b0d71e7cf3f207cd400c960
MD5 ac606cfb5b658f9d329e3b6c579a036e
BLAKE2b-256 4a4ab2f8cae8fd26bef3166120c2218f503a76b5d26d4218df3e1e62dc7e694f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinylang-0.6.7-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 dad9e4832941840daf370392844c44b4f4512cdc79444d32c571b1a25d26c79c
MD5 eaf841ad0f20aefd9208ab57f21fdeb5
BLAKE2b-256 62852c74f58f8dc6f1b7eb842449243f6a366fd5442872fafd63e44dc68a4df5

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