Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bringitupx/chatgptinxmppprofanity
Profanity Plugin for answering incoming Xmpp messages (uses openAI API)
https://github.com/bringitupx/chatgptinxmppprofanity
plugin python xmpp
Last synced: 4 months ago
JSON representation
Profanity Plugin for answering incoming Xmpp messages (uses openAI API)
- Host: GitHub
- URL: https://github.com/bringitupx/chatgptinxmppprofanity
- Owner: bringItUpX
- License: apache-2.0
- Created: 2024-08-01T03:45:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T06:06:04.000Z (6 months ago)
- Last Synced: 2024-10-10T01:05:17.021Z (4 months ago)
- Topics: plugin, python, xmpp
- Language: Python
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# chatGPTinXmppProfanity
Python Plugin for the Terminal Xmpp Client Profanity.
If loaded in Profanity and Profanify is connected to a Xmpp Account - anyone who writes this account a message like:"chat Who is Friedrich Schiller ?"
or:
"Chat Who is Friedrich Schiller ?""
Then this plugin sends everything behind "Chat" to ChatGPT 4o over the openAI API. You need a valid API Key for using this API. For example define an environment variable before you start Profanity.
In Linux it would be: "export OPENAI_API_KEY=sk-...."The answer of ChatGPT will be send to the XMPP contact that sends the message. Like:
"Antwort vom plugin: Friedrich Schiller was born at 10. November 1759 ....."
To load this plugin in your Profanity XMPP Terminal Chat Client: Please copy the chat04.py file of this repo in your user directory, start profanity and type:
/plugins install ~/chat04.py
### sources:
This plugin was inspired by Rainer Stropeks scooling about openAI API from the german heise-academy during Juli 2024. In this scooling he provided his code from the Microsoft AI day:
https://github.com/rstropek/microsoft-ai-day/tree/main/labs/015-basics-python### dependencies:
- profanity 0.14 (i.e. on Ubuntu 24.04)
- python3-openai