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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tinylang-0.6.5.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.5.tar.gz
Algorithm Hash digest
SHA256 bb2dd32f016454febc992af072d2547b3b3ea61a4e8f8fac8dcd1a7fb7995553
MD5 26a63b3298079abcf9ab55b557824d89
BLAKE2b-256 4f717b2892d6308f044876d69c19a477033bd6549ba0b1daeeffd78bb07d83b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinylang-0.6.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e468a44d2ebbc8a20704a8d990d2fd06fa4a5ccee8750590710852b2acc6892c
MD5 695de90c7fb4638a303d53415d945297
BLAKE2b-256 10bc710b5df3f7c4cb1d2d55dd44435b7b319180bccaaf89b09cf1ec9b16c3ec

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