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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tinylang-0.6.2.tar.gz
Algorithm Hash digest
SHA256 ec74a494b212882e0d59edd578f2eadaa2891659d5600d3635dc59370d40e30f
MD5 127d044d12aa4f2802d9bf39c0fa5380
BLAKE2b-256 fe6e1fd84e5876d5a98abce139b058824b7abb89450128ab934b660194f5339b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tinylang-0.6.2-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.6

File hashes

Hashes for tinylang-0.6.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e349c9cfbb2efbd1fc0a147876f389161652755bfc4a48237697adce7e41026a
MD5 569be022dda55609ce28401da4708cfe
BLAKE2b-256 085af4c844cd68705bd873d251b7533b2f96fc2f7ed3f09c1399a5ca1db0f8c3

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