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

Uploaded Source

Built Distribution

tinylang-2.0.1-py3-none-any.whl (12.3 kB view hashes)

Uploaded Python 3

Supported by

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