mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
fix(config.py): fix typo in max_uses variable declaration
feat(config.py): add support for TENOR_API_KEY environment variable to be able to use Tenor API for sending gifs feat(functionscalls.py): add new function send_a_gif to send a gif in the channel fix(makeprompt.py): add support for calling send_a_gif function in chatgpt_process function
This commit is contained in:
@@ -3,25 +3,27 @@ import sqlite3
|
||||
import json
|
||||
from dotenv import load_dotenv
|
||||
import os
|
||||
import openai
|
||||
|
||||
# Loading environement variables
|
||||
load_dotenv()
|
||||
|
||||
perspective_api_key = os.getenv("PERSPECTIVE_API_KEY")
|
||||
discord_token = os.getenv("DISCORD_TOKEN")
|
||||
webhook_url = os.getenv("WEBHOOK_URL")
|
||||
max_uses: int = 400
|
||||
tenor_api_key = os.getenv("TENOR_API_KEY")
|
||||
|
||||
# Logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
# Setting up the google vision api
|
||||
os.environ[
|
||||
"GOOGLE_APPLICATION_CREDENTIALS"
|
||||
] = "./../database/google-vision/botator.json"
|
||||
|
||||
with open(os.path.abspath(os.path.join("src", "prompts", "functions.json"))) as f:
|
||||
functions = json.load(f)
|
||||
|
||||
# Defining a debug function
|
||||
|
||||
def debug(message):
|
||||
# if the os is windows, we logging.info(message), if
|
||||
if os.name == "nt":
|
||||
logging.info(message)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user