Skip to main content

A tiny language interpreter

Project description

🦜🔗🔍 Tinylang

Documentation

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

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

model = "gpt-3.5-turbo"

chatGPT = OpenAI(
    openai_api_key=openai_api_key,
    openai_organization=openai_organization,
    model=model,
)

memory = ConversationMemory()

chain = Chain(
    llm=chatGPT,
    memory=memory,
)

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.
  • 🤖 Agents. Coming soon!

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-2.0.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

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

tinylang-2.0.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tinylang-2.0.0.tar.gz
Algorithm Hash digest
SHA256 e1786a370c78f258eedde995fa02340b68eab968853bc7125aa752057eecb567
MD5 b063c88df6d2583eb06a06ac5b350650
BLAKE2b-256 de5bb999ac7ba57200c565d9a3b073d477099eec73ef37bbac1d5b88d19a100e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tinylang-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b63098241108cd48b626b2146f5e126413b9d12e78be2c67c58575b7bf994009
MD5 a18b13d0c6a321287482812dea02fc56
BLAKE2b-256 86f999d3f1b5c569022a6b3970e931233c905721cd215fd3a1f40e0f691bb99a

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