diff --git a/backend/.env.sample b/backend/.env.sample index 53191fa3..3d43e031 100644 --- a/backend/.env.sample +++ b/backend/.env.sample @@ -55,3 +55,7 @@ COMPOSIO_APPS=["HACKERNEWS"] # Web Search Agent SERP_API_KEY= + +# Devzery API Test +DEVZERY_API_KEY= +DEVZERY_SOURCE_NAME= \ No newline at end of file diff --git a/backend/director/agents/upload.py b/backend/director/agents/upload.py index eeafad70..c1c16ab9 100644 --- a/backend/director/agents/upload.py +++ b/backend/director/agents/upload.py @@ -40,7 +40,7 @@ "description": "Collection ID to upload the content", }, }, - "required": ["url", "media_type", "collection_id"], + "required": ["source", "media_type", "collection_id"], } diff --git a/backend/director/entrypoint/api/server.py b/backend/director/entrypoint/api/server.py index 0b841af2..ae9cf89f 100644 --- a/backend/director/entrypoint/api/server.py +++ b/backend/director/entrypoint/api/server.py @@ -80,6 +80,15 @@ class ProductionAppConfig(BaseAppConfig): # By default, the server is configured to run in development mode. To run in production mode, set the `SERVER_ENV` environment variable to `production`. app = create_app(app_config=configs[os.getenv("SERVER_ENV", "local")]) +if os.getenv("DEVZERY_API_KEY") and os.getenv("DEVZERY_SOURCE_NAME"): + from devzery import Devzery + devzery = Devzery( + api_key=os.getenv("DEVZERY_API_KEY"), + source_name=os.getenv("DEVZERY_SOURCE_NAME") + ) + + devzery.flask_middleware(app) + if __name__ == "__main__": app.run( host=os.getenv("SERVER_HOST", app.config["HOST"]), diff --git a/backend/requirements.txt b/backend/requirements.txt index 78c11e07..c36a2750 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -18,3 +18,4 @@ yt-dlp==2024.10.7 videodb==0.2.8 slack_sdk==3.33.2 psycopg2-binary==2.9.10 +devzery==0.0.7