Demonstrates how easy it is to use OpenAi tools with Kibernikto as a core.
Basic telegram AI planner. Can use voice messages.
Can be updated to retrieve plans etc, just a demo functionality for now.
Reminds of planned messages.
Uses Kibernikto library as a core and is mostly here to show it's
capabilities.
All you need to use functions with Kibernikto is:
- Create you functions in 'tools' package and import them as in
main.py
file. See tools/plan_event.py for details. Pay attention to namings! - Optionally: create Kibernikto child class to extend the functionality.
See _kiberplanner bot it adds current time to default system message. - Use your bot when running a dispatcher like
await comprehensive_dispatcher.async_start(Kiberplanner, tools_to_use)
inmain.py
Mostly a set of tools and extended Kibernikto bots.
![image](https://private-user-images.githubusercontent.com/5033247/319374019-c3801b89-fa7f-4840-963b-db1a1c439214.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5MTAwODMsIm5iZiI6MTczODkwOTc4MywicGF0aCI6Ii81MDMzMjQ3LzMxOTM3NDAxOS1jMzgwMWI4OS1mYTdmLTQ4NDAtOTYzYi1kYjFhMWM0MzkyMTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMDYyOTQzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2U1Mzc4ODQ0YWNiZjFhODRlM2ZlNTg2NmFkYTUwNTAwN2E0ZTE3NGRlNmQyZTIzNzYyZWNhY2Q5ODE1ZjQzYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.bQjjSRJBFDmdjKM645b1iqYA_NjzOPrSy1gHWVCP6ac)
run code (assuming you set the environment yrself)
Install the requirements
pip install -r requirements.txt
Run main.py
file using the environment provided.
Minimal Environment
OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXX
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_API_MODEL=gpt-4o
OPENAI_MAX_TOKENS=550
OPENAI_MAX_MESSAGES=5
OPENAI_TEMPERATURE=0.1
VOICE_PROCESSOR=openai
VOICE_FILE_LOCATION=/tmp
VOICE_OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXX
VOICE_OPENAI_API_MODEL=whisper-1
VOICE_OPENAI_API_BASE_URL=https://api.openai.com/v1
TG_REACTION_CALLS=["hi","hola", "plan", "schedule"]
TG_STICKER_LIST=["CAACAgIAAxkBAAELx29l_2OsQzpRWhmXTIMBM4yekypTOwACdgkAAgi3GQI1Wnpqru6xgTQE"]
TG_BOT_KEY=XXXXXXXXXX:XXXxxxXXXxxxxXXXxxx
TG_MASTER_ID=XXXXXXXXX
#everyone can talk
TG_PUBLIC=true
# say hi on startup
TG_SAY_HI=true
TG_CHUNK_SENTENCES=5