A high-level, stupid-simple Pythonic LiteLLM abstraction layer for implementing simple chat workflows, with tools.
Project description
Ploppie
A high-level, stupid-simple Pythonic LiteLLM abstraction layer for implementing simple chat workflows, with tools. Supports vision and audio models. Includes facilities for easy (de)serialization of chat histories.
So stupid that I couldn't come up with a better name.
Installation
pip install ploppie
Usage
Simple chat
from ploppie import Chat
chat = Chat()
response = chat.system("You are a helpful assistant.") \
.user("What is the capital of France?") \
.ready()
print(response)
Chat with tools
from ploppie import Chat
chat = Chat()
@chat.tool("Perform mathematical calculations")
def calculate(expression: "str: The expression to calculate"):
return eval(expression)
print(chat.send("What is 2502 * 2502, and 2858 - 28592? Please tell me the results."))
Chat with vision
from ploppie import Chat
from ploppie.messages import Image
chat = Chat()
response = chat.system("You are a helpful assistant.") \
.user(Image(file_handle=open("beautiful_landscape.png", "rb"))) \
.ready()
print(response)
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
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 ploppie-0.4.2.tar.gz.
File metadata
- Download URL: ploppie-0.4.2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec2bf8bbb6cbad992bd9f9c0558bf97aee3b7edada1a8c69cf0e362330f450f
|
|
| MD5 |
ca9f78c6ae725015866b41178d736bea
|
|
| BLAKE2b-256 |
a35bc09d6cebcae782582b287006756e6b261c50e7e662429ed451e9ae5344b7
|
File details
Details for the file ploppie-0.4.2-py3-none-any.whl.
File metadata
- Download URL: ploppie-0.4.2-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f91581a2cb1ba5f8bba4a2468a2787bcc27a781b1aed7d751eaaa4fe0b1135ba
|
|
| MD5 |
e7bf1a59f84cee1a8b90e5e71550c9de
|
|
| BLAKE2b-256 |
a595549f9abfa8e10f90cd4d224668af245acf069b7ffee0f17e6ccb80a5738c
|