Skip to main content

Enhance your AI chatbot by seamlessly injecting motivational messages and logging interactions.

Project description

AI Cheerish

AI Cheerish is a lightweight Python library designed to enhance your AI chatbot's performance by injecting motivational and inspirational messages into conversation prompts. It integrates seamlessly with your existing AI client and automatically logs interactions for improved debugging and analysis.

Key Features

  • Prompt Enhancement: Automatically inject a custom "human nature" message on the first interaction and add motivational notes periodically (every nth message, as set in your configuration).
  • Easy Integration: Works with any AI client that follows a conversational API pattern.
  • Logging: Records conversation details including timestamps, original messages, enhanced prompts, and AI responses in a CSV file.

Installation

Install the package via pip:

pip install ai-cheerish

Usage Example

from ai_cheerish import Cheerish

def dummy_get_response(messages): return "Dummy response: " + messages[0]["content"]

Pass the function directly instead of creating a class instance.

cheerish = Cheerish(dummy_get_response)

response = cheerish("Hello, how are you?") print(response)

How It Works

  1. Message Enhancement:
    • On the first user message, the library can prepend a configured "human_nature" note.
    • Every nth message (by default, every 3rd message—modifiable via the motivational_frequency setting) gets an additional motivational note injected.
  2. Single API Call:
    • Instead of sending separate system and user messages, the system note is prepended directly to the user's message.
  3. Logging:
    • Each interaction is logged in a CSV file (chat_logs.csv) for later review or debugging.

License

This project is licensed under the MIT License.

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

ai_cheerish-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

ai_cheerish-0.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ai_cheerish-0.2.0.tar.gz.

File metadata

  • Download URL: ai_cheerish-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ai_cheerish-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dc047f08c6c24fab5c833d786694bbd1b5bc480a6d5a225dffa7e60b40cc0e54
MD5 623eb39ae9abe58e75e70ad53865e8aa
BLAKE2b-256 e3e0eff9a509e8feddbba22a85af8811d9b9923569be5784fb9cc6b32af24dc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_cheerish-0.2.0.tar.gz:

Publisher: python-publish.yml on Alex-ardashev/cheer_lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ai_cheerish-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ai_cheerish-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for ai_cheerish-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af5f4bb1812587f514ec027231488a2ce40daba6eabac1c4f1626be8e3e4e1cf
MD5 03ea4c07bff639bd16d4d5cf7ae66428
BLAKE2b-256 b322540ef27ee32f0b860c8cf48dd5c1c999afdc6730e806dfe4b01e3de4eeb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_cheerish-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on Alex-ardashev/cheer_lib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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