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
- 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_frequencysetting) gets an additional motivational note injected.
- Single API Call:
- Instead of sending separate system and user messages, the system note is prepended directly to the user's message.
- Logging:
- Each interaction is logged in a CSV file (
chat_logs.csv) for later review or debugging.
- Each interaction is logged in a CSV file (
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fca17e137e4a1979180398c7ff755d30b90298347eafdf0cd74c9113f75a499
|
|
| MD5 |
154134bebb00fe5374805eb2929cb797
|
|
| BLAKE2b-256 |
902eceebc7a8eb64ff1d6668ee3128aa36865a17de55d14f5df6597ebf94cfb4
|
Provenance
The following attestation bundles were made for ai_cheerish-0.2.1.tar.gz:
Publisher:
python-publish.yml on Alex-ardashev/cheer_lib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_cheerish-0.2.1.tar.gz -
Subject digest:
4fca17e137e4a1979180398c7ff755d30b90298347eafdf0cd74c9113f75a499 - Sigstore transparency entry: 169898513
- Sigstore integration time:
-
Permalink:
Alex-ardashev/cheer_lib@68e63a4df04709283a3c903626a1f27ef6cb12b0 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/Alex-ardashev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@68e63a4df04709283a3c903626a1f27ef6cb12b0 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1e274e563314454a9b2de56b0a0461186f41374566d43e814ab499429b888b4
|
|
| MD5 |
4b1556339252c2a87f5c1d516ee832ab
|
|
| BLAKE2b-256 |
be9af080b6d5e79a2e521cee89e222286e5339ad215e2004bdc11805aa2808b1
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ai_cheerish-0.2.1-py3-none-any.whl -
Subject digest:
e1e274e563314454a9b2de56b0a0461186f41374566d43e814ab499429b888b4 - Sigstore transparency entry: 169898514
- Sigstore integration time:
-
Permalink:
Alex-ardashev/cheer_lib@68e63a4df04709283a3c903626a1f27ef6cb12b0 -
Branch / Tag:
refs/tags/0.2.1 - Owner: https://github.com/Alex-ardashev
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@68e63a4df04709283a3c903626a1f27ef6cb12b0 -
Trigger Event:
release
-
Statement type: