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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ai_cheerish-0.2.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4fca17e137e4a1979180398c7ff755d30b90298347eafdf0cd74c9113f75a499
MD5 154134bebb00fe5374805eb2929cb797
BLAKE2b-256 902eceebc7a8eb64ff1d6668ee3128aa36865a17de55d14f5df6597ebf94cfb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_cheerish-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: ai_cheerish-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e274e563314454a9b2de56b0a0461186f41374566d43e814ab499429b888b4
MD5 4b1556339252c2a87f5c1d516ee832ab
BLAKE2b-256 be9af080b6d5e79a2e521cee89e222286e5339ad215e2004bdc11805aa2808b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for ai_cheerish-0.2.1-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