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 premade prompts down your throat.
With tinylang, everything is intuitive and customizeable, 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 LLMChain
memory = ConversationMemory(last_k=10)
chatGPT = OpenAI(OpenAI='')
chain = LLMChain(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 automatic 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinylang-0.4.2.tar.gz.
File metadata
- Download URL: tinylang-0.4.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69c93306442bf318e50b94d98b1f50dbdef93c792e4598d802114c754b4dcb89
|
|
| MD5 |
65abf0689c79679468e9917d7914c30a
|
|
| BLAKE2b-256 |
915dd580672bad467ee490aed7dc1a51d3a24b8aa2ae828f61f51d38d32f58e7
|
File details
Details for the file tinylang-0.4.2-py3-none-any.whl.
File metadata
- Download URL: tinylang-0.4.2-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a7f2a743891d6169d5bf6d830a38662fe2e3c8a5671ac77f027218aa81fb9fc
|
|
| MD5 |
545ef37e8d2d730bc935f600fd37bcae
|
|
| BLAKE2b-256 |
4868d76c41d461e63dbdffe88177c1fdd6a4c44ce99d0e01755e2a5e8cd682b5
|