Skip to main content

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

ploppie-0.4.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

ploppie-0.4.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file ploppie-0.4.0.tar.gz.

File metadata

  • Download URL: ploppie-0.4.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for ploppie-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fbc10bd9fb79afcebfa8386243902cd1222b3169b4c0d7c1baa03366f4e5840a
MD5 0b96bfa09e408b698c0c2880e2f151a1
BLAKE2b-256 c4a03b56efade056c7f38046cb97fc4fd709f70fcbf7b3f785a75afc740ee8a0

See more details on using hashes here.

File details

Details for the file ploppie-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ploppie-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.0

File hashes

Hashes for ploppie-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8961f862ca1b61f76ca72f24f5bca7b78d17e335fb1140462f7b92a3009e71ac
MD5 fd22594d0ad8fbd1b3d7cd096556a68b
BLAKE2b-256 95e58681f72e160b2f6c1bd85511d2f2faf4089b78f6b074f94e8f2585b5a46a

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