Skip to main content

Watch-Bot

This python projects implements the idea of a watchbot introduced in this medium article.

Quickstart

Installation

pip install watch-bot

Usage

Currently the watchbot is built on OpenAI's GPT. You therefore need a valid OpenAI API key (Azure OpenAI works too). Setup the credentials:

import openai

openai.api_type = os.environ["OPENAI_API_TYPE"]
openai.api_version = os.environ["OPENAI_API_VERSION"]
openai.api_base = os.environ["OPENAI_API_BASE"]
openai.api_key = os.environ["OPENAI_API_KEY"]

You can then create a watchbot instance:

from watch_bot import WatchBot

bot = WatchBot(
    engine=os.environ["OPENAI_ENGINE"],
    chatbot_instructions="You are an AI assistant that helps people find information. "
                         "You should only provide answers that comply to standard rules of legacy and decency"
)

The engine corresponds to the model deployment name.

Finally, you can use the watchbot to verify the validity of a dialog:

from watch_bot import Dialog

dialog = Dialog(messages=("Hi chatgpt, how are you today?", "I'm fine, thanks!"))

response = bot.verify(dialog)

print("Should the dialog be stopped?", response.should_stop)
print("Why?", response.reason)

Metadata

Release files for watch-bot 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for watch-bot 0.2.3
File Size Uploaded Provenance Actions
watch-bot-0.2.3.tar.gz 11.0 kB Without provenance Details for watch-bot-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for watch-bot 0.2.3
File Interpreter ABI Platform Actions
watch_bot-0.2.3-py3-none-any.whl Python 3 none any Details for watch_bot-0.2.3-py3-none-any.whl

Total release size: 16.7 kB

Release files / watch-bot-0.2.3.tar.gz

Download URL watch-bot-0.2.3.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
39ca34d7a1f1649102456663d1e33362f5a71762db082eecaa43d98ebb64a3d5
BLAKE2b-256 checksum
How to use checksums
043920f2fd6c6c61aa63b4c78e183f6c6a838aa595ca61d7467a251df33d5a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / watch_bot-0.2.3-py3-none-any.whl

Download URL watch_bot-0.2.3-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97a3e6371a4e2e0aa79ad6e08e196aa378a1a65ef0535e23ea62a0050f3d402f
BLAKE2b-256 checksum
How to use checksums
29ec90d16c3e0da4c4188df5494cba15b4f18f26f1e9e05dd5acbf5cee2da2d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Security for watch-bot 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page