Skip to main content

A tiny language interpreter

Project description

🦜🔗🔍 Tinylang

Documentation Status

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

Documentation is a WIP right now, see examples for the time being!

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

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tinylang-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d01a5545f31ab0241a566f821c0fb90c0193eafc110a1ef5db040f3a3de04752
MD5 c70d340d6e36376d665fae1102737ac9
BLAKE2b-256 c1ddca4ad1fda8159e7a57eca772d2803a06ebed695d29ed4b97a95ae43c96f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinylang-1.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.5

File hashes

Hashes for tinylang-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01d3e279f14c4e39052709a0022faf53d5b02064db644297dea9c04b628b90a2
MD5 3019f8eb47d1a1690c92301621075501
BLAKE2b-256 56d580e7fe43d02150a5e6cbf01c816f1f03c0470ff9e1460fbcf08fad5f0656

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