From ca68ecb2828b55aa099e4c3926a96cb9e9ce017b Mon Sep 17 00:00:00 2001 From: Kumi Date: Tue, 23 Apr 2024 17:07:57 +0200 Subject: [PATCH] feat: add trackingmore API and ffmpeg - Included the `ffmpeg` package in the Docker environment to support multimedia content processing. - Added `trackingmore-api-tool` as a dependency to expand the bot's functionality with tracking capabilities. - Adjusted the `all` dependencies list in `pyproject.toml` to include the `trackingmore` module, indicating a broader feature set for the application. - Updated the bot class to prepare for integrating `TrackingMore` alongside existing services like `OpenAI` and `WolframAlpha`, highlighting an intention to make such integrations configurable in the future. This enhancement enables the bot to interact with multimedia content more effectively and introduces package tracking features, laying groundwork for configurable service integrations. --- Dockerfile | 3 ++- pyproject.toml | 6 +++++- src/gptbot/classes/bot.py | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3afc845..250a0c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ COPY pyproject.toml /app COPY README.md /app COPY LICENSE /app -RUN apt update && apt install -y build-essential libpython3-dev +RUN apt update +RUN apt install -y build-essential libpython3-dev ffmpeg RUN pip install .[all] RUN pip install 'future==1.0.0' diff --git a/pyproject.toml b/pyproject.toml index 33ad582..7246beb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,12 @@ e2ee = [ "pantalaimon>=0.10.5", ] +trackingmore = [ + "trackingmore-api-tool", +] + all = [ - "matrix-gptbot[openai,wolframalpha,e2ee]", + "matrix-gptbot[openai,wolframalpha,e2ee,trackingmore]", "geopy", "beautifulsoup4", ] diff --git a/src/gptbot/classes/bot.py b/src/gptbot/classes/bot.py index a1f1ae1..094070a 100644 --- a/src/gptbot/classes/bot.py +++ b/src/gptbot/classes/bot.py @@ -60,6 +60,8 @@ from ..migrations import migrate from ..callbacks import RESPONSE_CALLBACKS, EVENT_CALLBACKS from ..commands import COMMANDS from ..tools import TOOLS, Handover, StopProcessing + +# TODO: Make these optional based on config from .openai import OpenAI from .wolframalpha import WolframAlpha from .trackingmore import TrackingMore