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

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.

Contributing

To automate package versions, we use semantic-release, which automatically bumps versions based on our commit messages. See here.

Example: add a feature, minor version will be bumped from 0.1.0 to 0.2.0:

git commit -m "feat: add example data and datasets module"

Example: fix a bug, patch version bumped from 0.1.0 to 0.1.1

git commit -m "fix: fix confusing error message in plot_words"

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: tinylang-0.6.3.tar.gz
  • Upload date:
  • Size: 9.6 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.3.tar.gz
Algorithm Hash digest
SHA256 d7240aa6bb3c5ce49942d2d23391ee4fe863f0ddbd370e37f4b40bfed8f78577
MD5 e7446d0c1fc1bcd09c467eccc38a8b6c
BLAKE2b-256 14f2f873f51dac66bbe0d1c4fb2a21629d29901f012dab2252f5aa69d151f7cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinylang-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 11.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-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 18e5fa2b03f862090c70d13dedaae0c3243e658dc14deeb7ae3b496dd426e1d8
MD5 8cf74f6530e813dfc0459c3094959b4e
BLAKE2b-256 05855290a92773fb28dff5c71aad295c6f857a5bf77630fd517741226c64c4bf

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