diff --git a/README.md b/README.md index e2812eb..193a9d7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@

- Spielberg + Director

@@ -26,7 +26,7 @@

- Deploy to Render + Deploy to Render Deploy on Railway @@ -40,16 +40,16 @@ View Demo Β»

- Report Bug + Report Bug Β· - Request Feature + Request Feature

## 🧐 What is it? -Spielberg provides a flexible framework for developing intelligent media agents that can interact with your audio/video collection in natural language. Whether you're dealing with lectures, movies, social content, youtube videos, TV shows, talks, music, or other digital content, Spielberg offers tools to build powerful AI-powered assistants. +Director provides a flexible framework for developing intelligent media agents that can interact with your audio/video collection in natural language. Whether you're dealing with lectures, movies, social content, youtube videos, TV shows, talks, music, or other digital content, Director offers tools to build powerful AI-powered assistants. It uses the VideoDB’s powerful infrastructure to create agentic workflows. For example in natural language you can give commands like `β€œupload this video and send the bullet point summary on my slack”` and the agent will handle the rest. @@ -76,8 +76,8 @@ TODO: Intro video here **1. Clone the repository:** ``` bash -git clone https://github.com/video-db/Spielberg.git -cd Spielberg +git clone https://github.com/video-db/Director.git +cd Director ``` **2. Run the setup script:** @@ -137,9 +137,9 @@ mkdocs build ## πŸ“˜ Creating a New Agent πŸ“Ί Watch: Code walkthrough -To create a new agent in Spielberg, follow these steps: +To create a new agent in Director, follow these steps: -1. **Copy the template**: Duplicate `sample_agent.py` in `Spielberg/backend/spielberg/agents/` and rename it to your agent's name. +1. **Copy the template**: Duplicate `sample_agent.py` in `Director/backend/director/agents/` and rename it to your agent's name. 2. **Update class details**: - Rename the class (e.g., from `SampleAgent` to `YourAgentName`) @@ -163,7 +163,7 @@ To create a new agent in Spielberg, follow these steps: - Return an `AgentResponse` with result, message, and data 7. **Register the agent**: - - Import your new agent class in `Spielberg/backend/spielberg/handler.py` + - Import your new agent class in `Director/backend/director/handler.py` - Add it to the `self.agents` list in `ChatHandler` Remember to consider creating reusable tools if your agent's functionality could be shared across multiple agents. @@ -185,10 +185,10 @@ Contributions are what make the open source community such an amazing place to b [npm-url]: https://www.npmjs.com/package/@videodb/player-vue [discord-shield]: https://img.shields.io/badge/dynamic/json?style=for-the-badge&url=https://discord.com/api/invites/py9P639jGz?with_counts=true&query=$.approximate_member_count&logo=discord&logoColor=blue&color=green&label=discord [discord-url]: https://discord.com/invite/py9P639jGz -[stars-shield]: https://img.shields.io/github/stars/video-db/Spielberg.svg?style=for-the-badge -[stars-url]: https://github.com/video-db/Spielberg/stargazers -[issues-shield]: https://img.shields.io/github/issues/video-db/Spielberg.svg?style=for-the-badge -[issues-url]: https://github.com/video-db/Spielberg/issues +[stars-shield]: https://img.shields.io/github/stars/video-db/Director.svg?style=for-the-badge +[stars-url]: https://github.com/video-db/Director/stargazers +[issues-shield]: https://img.shields.io/github/issues/video-db/Director.svg?style=for-the-badge +[issues-url]: https://github.com/video-db/Director/issues [website-shield]: https://img.shields.io/website?url=https%3A%2F%2Fvideodb.io%2F&style=for-the-badge&label=videodb.io [website-url]: https://videodb.io/ diff --git a/backend/Dockerfile b/backend/Dockerfile index fceade8..e881533 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -7,8 +7,8 @@ COPY . /app/ COPY ./requirements.txt /app/ RUN pip install --no-cache-dir -r requirements.txt -RUN [ ! -f spielberg.db ] && python spielberg/db/sqlite/initialize.py || echo "Database already initialized." +RUN [ ! -f director.db ] && python director/db/sqlite/initialize.py || echo "Database already initialized." EXPOSE 8000 -CMD ["python", "spielberg/entrypoint/api/server.py"] +CMD ["python", "director/entrypoint/api/server.py"] diff --git a/backend/Makefile b/backend/Makefile index 8aca2ab..ddfa529 100644 --- a/backend/Makefile +++ b/backend/Makefile @@ -25,7 +25,7 @@ help: init-sqlite-db: source $(VENV_DIR)/bin/activate && \ - python spielberg/db/sqlite/initialize.py + python director/db/sqlite/initialize.py install: @@ -43,4 +43,4 @@ lint: run: source $(VENV_DIR)/bin/activate && \ - python spielberg/entrypoint/api/server.py + python director/entrypoint/api/server.py diff --git a/backend/README.md b/backend/README.md index 534ec2d..2bbb3f4 100644 --- a/backend/README.md +++ b/backend/README.md @@ -1,8 +1,8 @@ -# 🎬 Spielberg Backend +# 🎬 Director Backend ## πŸ“‹ Overview -The Spielberg Backend is a Python-based server application that powers the Spielberg project. It provides a robust framework for managing video processing tasks, agent-based operations, and communication with the frontend. +The Director Backend is a Python-based server application that powers the Director project. It provides a robust framework for managing video processing tasks, agent-based operations, and communication with the frontend. ## πŸš€ Getting Started @@ -12,23 +12,23 @@ To run the backend using Docker: 1. Build the Docker image: ```bash - docker build -t spielberg-backend . + docker build -t director-backend . ``` 2. Run the container: ```bash - docker run -p 8000:8000 spielberg-backend + docker run -p 8000:8000 director-backend ``` The server will be available at `http://localhost:8000`. ## πŸ—οΈ Core Components -### 🧠 Reasoning Engine (`spielberg/core/reasoning.py`) +### 🧠 Reasoning Engine (`director/core/reasoning.py`) The Reasoning Engine is the central component that orchestrates agents, interprets user input, and manages the conversation flow. It uses LLMs for natural language understanding and agent orchestration. -### πŸ“‘ Session Management (`spielberg/core/session.py`) +### πŸ“‘ Session Management (`director/core/session.py`) The Session class manages user sessions, conversations, and message handling. It provides methods for creating, retrieving, and managing session data. @@ -41,15 +41,15 @@ The Session class manages user sessions, conversations, and message handling. It ## πŸ€– Agents -Agents are modular components that perform specific tasks. The `BaseAgent` class (`spielberg/agents/base.py`) provides a foundation for creating custom agents. Sample agents like `SampleAgent` (`spielberg/agents/sample.py`) demonstrate how to implement agent functionality. +Agents are modular components that perform specific tasks. The `BaseAgent` class (`director/agents/base.py`) provides a foundation for creating custom agents. Sample agents like `SampleAgent` (`director/agents/sample.py`) demonstrate how to implement agent functionality. ## πŸ—„οΈ Database -The project uses a database abstraction layer (`spielberg/db/base.py`) that can be implemented for different database systems. The current implementation uses SQLite (`spielberg/db/sqlite/`). +The project uses a database abstraction layer (`director/db/base.py`) that can be implemented for different database systems. The current implementation uses SQLite (`director/db/sqlite/`). ## πŸšͺ Entrypoint -The main entry point for the backend is the Flask server (`spielberg/entrypoint/api/server.py`). It sets up routes, WebSocket connections, and initializes the necessary components. +The main entry point for the backend is the Flask server (`director/entrypoint/api/server.py`). It sets up routes, WebSocket connections, and initializes the necessary components. ## πŸ”Œ Socket Communication @@ -57,11 +57,11 @@ The backend uses Flask-SocketIO for real-time communication with the frontend. S ## πŸ› οΈ Tools -The `VideoDBTool` (`spielberg/tools/videodb_tool.py`) provides an interface for interacting with the VideoDB API, allowing operations like video upload, search, and manipulation. +The `VideoDBTool` (`director/tools/videodb_tool.py`) provides an interface for interacting with the VideoDB API, allowing operations like video upload, search, and manipulation. ## 🧠 LLM Integration -The `BaseLLM` class (`spielberg/llm/base.py`) provides an abstraction for integrating different Language Model providers. The current implementation supports OpenAI (`spielberg/llm/openai.py`). +The `BaseLLM` class (`director/llm/base.py`) provides an abstraction for integrating different Language Model providers. The current implementation supports OpenAI (`director/llm/openai.py`). ## πŸ“¦ Dependencies @@ -98,7 +98,7 @@ To set up the development environment: 3. Run the development server: ```bash - python spielberg/entrypoint/api/server.py + python director/entrypoint/api/server.py ``` ### Using Make diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 2fa941a..47422d4 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,7 +1,7 @@ [project] -name = "spielberg" +name = "director" version = "0.1.0" -description = "Spielberg backend." +description = "Director backend." readme = "README.md" requires-python = ">=3.6" dependencies = [ @@ -14,7 +14,7 @@ dependencies = [ "python-dotenv==1.0.1", "videodb", "yt-dlp==2024.10.7", - "spielberg", + "director", ] diff --git a/backend/spielberg/agents/base.py b/backend/spielberg/agents/base.py index 9ed4a8d..3a37a42 100644 --- a/backend/spielberg/agents/base.py +++ b/backend/spielberg/agents/base.py @@ -5,7 +5,7 @@ from openai_function_calling import FunctionInferrer -from spielberg.core.session import Session, OutputMessage +from director.core.session import Session, OutputMessage logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/brandkit.py b/backend/spielberg/agents/brandkit.py index 3ff85a2..8aebe0c 100644 --- a/backend/spielberg/agents/brandkit.py +++ b/backend/spielberg/agents/brandkit.py @@ -1,9 +1,9 @@ import os import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session, MsgStatus, VideoContent, VideoData -from spielberg.tools.videodb_tool import VideoDBTool +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import Session, MsgStatus, VideoContent, VideoData +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/download.py b/backend/spielberg/agents/download.py index a6e9c4c..5f4107f 100644 --- a/backend/spielberg/agents/download.py +++ b/backend/spielberg/agents/download.py @@ -1,8 +1,8 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session -from spielberg.tools.videodb_tool import VideoDBTool +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import Session +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/image_generation.py b/backend/spielberg/agents/image_generation.py index dac08b7..ebe395e 100644 --- a/backend/spielberg/agents/image_generation.py +++ b/backend/spielberg/agents/image_generation.py @@ -1,8 +1,8 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session, MsgStatus, ImageContent, ImageData -from spielberg.tools.replicate import flux_dev +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import Session, MsgStatus, ImageContent, ImageData +from director.tools.replicate import flux_dev logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/index.py b/backend/spielberg/agents/index.py index af01325..9c3b284 100644 --- a/backend/spielberg/agents/index.py +++ b/backend/spielberg/agents/index.py @@ -1,9 +1,9 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session -from spielberg.tools.videodb_tool import VideoDBTool +from director.core.session import Session +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/pricing.py b/backend/spielberg/agents/pricing.py index 008b38c..0761528 100644 --- a/backend/spielberg/agents/pricing.py +++ b/backend/spielberg/agents/pricing.py @@ -1,14 +1,14 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ( Session, MsgStatus, ContextMessage, RoleTypes, TextContent, ) -from spielberg.llm.openai import OpenAI +from director.llm.openai import OpenAI logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/profanity_remover.py b/backend/spielberg/agents/profanity_remover.py index bf5481b..aa5bf22 100644 --- a/backend/spielberg/agents/profanity_remover.py +++ b/backend/spielberg/agents/profanity_remover.py @@ -4,8 +4,8 @@ from videodb.asset import VideoAsset, AudioAsset -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ( Session, MsgStatus, VideoContent, @@ -13,8 +13,8 @@ ContextMessage, RoleTypes, ) -from spielberg.llm.openai import OpenAI -from spielberg.tools.videodb_tool import VideoDBTool +from director.llm.openai import OpenAI +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/prompt_clip.py b/backend/spielberg/agents/prompt_clip.py index 154d932..c1c32cc 100644 --- a/backend/spielberg/agents/prompt_clip.py +++ b/backend/spielberg/agents/prompt_clip.py @@ -2,8 +2,8 @@ import json import concurrent.futures -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ( Session, ContextMessage, RoleTypes, @@ -11,8 +11,8 @@ VideoContent, VideoData, ) -from spielberg.tools.videodb_tool import VideoDBTool -from spielberg.llm.openai import OpenAI +from director.tools.videodb_tool import VideoDBTool +from director.llm.openai import OpenAI logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/sample.py b/backend/spielberg/agents/sample.py index 13e844c..46ab545 100644 --- a/backend/spielberg/agents/sample.py +++ b/backend/spielberg/agents/sample.py @@ -1,7 +1,7 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session, MsgStatus, TextContent +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import Session, MsgStatus, TextContent logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/search.py b/backend/spielberg/agents/search.py index b5b3e1d..c6408bc 100644 --- a/backend/spielberg/agents/search.py +++ b/backend/spielberg/agents/search.py @@ -1,8 +1,8 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.llm.openai import OpenAI -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.llm.openai import OpenAI +from director.core.session import ( Session, MsgStatus, TextContent, @@ -14,7 +14,7 @@ ContextMessage, RoleTypes, ) -from spielberg.tools.videodb_tool import VideoDBTool +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/slack_agent.py b/backend/spielberg/agents/slack_agent.py index c962166..1e3b912 100644 --- a/backend/spielberg/agents/slack_agent.py +++ b/backend/spielberg/agents/slack_agent.py @@ -1,17 +1,17 @@ import logging import os -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ( Session, TextContent, MsgStatus, ContextMessage, RoleTypes, ) -from spielberg.tools.slack import send_message_to_channel -from spielberg.llm.openai import OpenAI -from spielberg.llm.base import LLMResponseStatus +from director.tools.slack import send_message_to_channel +from director.llm.openai import OpenAI +from director.llm.base import LLMResponseStatus logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/stream_video.py b/backend/spielberg/agents/stream_video.py index 426bf17..5fd6ecd 100644 --- a/backend/spielberg/agents/stream_video.py +++ b/backend/spielberg/agents/stream_video.py @@ -1,8 +1,8 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session, MsgStatus, VideoContent, VideoData -from spielberg.tools.videodb_tool import VideoDBTool +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import Session, MsgStatus, VideoContent, VideoData +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/subtitle.py b/backend/spielberg/agents/subtitle.py index 776adc0..6e25651 100644 --- a/backend/spielberg/agents/subtitle.py +++ b/backend/spielberg/agents/subtitle.py @@ -2,8 +2,8 @@ import textwrap import json -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ( Session, ContextMessage, RoleTypes, @@ -11,8 +11,8 @@ VideoData, MsgStatus, ) -from spielberg.tools.videodb_tool import VideoDBTool -from spielberg.llm.openai import OpenAI, OpenaiConfig +from director.tools.videodb_tool import VideoDBTool +from director.llm.openai import OpenAI, OpenaiConfig from videodb.asset import VideoAsset, TextAsset, TextStyle diff --git a/backend/spielberg/agents/thumbnail.py b/backend/spielberg/agents/thumbnail.py index 1bf45f2..dcf864e 100644 --- a/backend/spielberg/agents/thumbnail.py +++ b/backend/spielberg/agents/thumbnail.py @@ -1,9 +1,9 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import Session, MsgStatus, ImageContent, ImageData -from spielberg.tools.videodb_tool import VideoDBTool +from director.core.session import Session, MsgStatus, ImageContent, ImageData +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/upload.py b/backend/spielberg/agents/upload.py index 227cbe5..899a293 100644 --- a/backend/spielberg/agents/upload.py +++ b/backend/spielberg/agents/upload.py @@ -2,15 +2,15 @@ import yt_dlp -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ( Session, MsgStatus, VideoContent, TextContent, VideoData, ) -from spielberg.tools.videodb_tool import VideoDBTool +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/agents/video_summary.py b/backend/spielberg/agents/video_summary.py index af6ee72..7c67cb9 100644 --- a/backend/spielberg/agents/video_summary.py +++ b/backend/spielberg/agents/video_summary.py @@ -1,9 +1,9 @@ import logging -from spielberg.agents.base import BaseAgent, AgentResponse, AgentStatus -from spielberg.core.session import ContextMessage, RoleTypes, TextContent, MsgStatus -from spielberg.llm.openai import OpenAI -from spielberg.tools.videodb_tool import VideoDBTool +from director.agents.base import BaseAgent, AgentResponse, AgentStatus +from director.core.session import ContextMessage, RoleTypes, TextContent, MsgStatus +from director.llm.openai import OpenAI +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/core/reasoning.py b/backend/spielberg/core/reasoning.py index 09a1e17..4990a31 100644 --- a/backend/spielberg/core/reasoning.py +++ b/backend/spielberg/core/reasoning.py @@ -2,8 +2,8 @@ from typing import List -from spielberg.agents.base import BaseAgent, AgentStatus, AgentResponse -from spielberg.core.session import ( +from director.agents.base import BaseAgent, AgentStatus, AgentResponse +from director.core.session import ( Session, OutputMessage, InputMessage, @@ -12,8 +12,8 @@ TextContent, MsgStatus, ) -from spielberg.llm.base import LLMResponse -from spielberg.llm.openai import OpenAI +from director.llm.base import LLMResponse +from director.llm.openai import OpenAI logger = logging.getLogger(__name__) diff --git a/backend/spielberg/core/session.py b/backend/spielberg/core/session.py index f1ae55b..d8f8615 100644 --- a/backend/spielberg/core/session.py +++ b/backend/spielberg/core/session.py @@ -5,7 +5,7 @@ from flask_socketio import emit from pydantic import BaseModel, Field, ConfigDict -from spielberg.db.base import BaseDB +from director.db.base import BaseDB class RoleTypes(str, Enum): @@ -29,7 +29,7 @@ class MsgStatus(str, Enum): class MsgType(str, Enum): - """Message type for the message. input is for the user input and output is for the spielberg output.""" + """Message type for the message. input is for the user input and output is for the director output.""" input = "input" output = "output" @@ -162,7 +162,7 @@ def publish(self): class OutputMessage(BaseMessage): - """Output message from the spielberg. This class is used to create the output message from the spielberg.""" + """Output message from the director. This class is used to create the output message from the director.""" db: BaseDB = Field(exclude=True) msg_type: MsgType = MsgType.output diff --git a/backend/spielberg/db/__init__.py b/backend/spielberg/db/__init__.py index cb9e4b1..4c8a25a 100644 --- a/backend/spielberg/db/__init__.py +++ b/backend/spielberg/db/__init__.py @@ -1,4 +1,4 @@ -from spielberg.constants import DBType +from director.constants import DBType from .base import BaseDB from .sqlite.db import SQLiteDB diff --git a/backend/spielberg/db/sqlite/db.py b/backend/spielberg/db/sqlite/db.py index 9de99d9..de85b3f 100644 --- a/backend/spielberg/db/sqlite/db.py +++ b/backend/spielberg/db/sqlite/db.py @@ -5,15 +5,15 @@ from typing import List -from spielberg.constants import DBType -from spielberg.db.base import BaseDB -from spielberg.db.sqlite.initialize import initialize_sqlite +from director.constants import DBType +from director.db.base import BaseDB +from director.db.sqlite.initialize import initialize_sqlite logger = logging.getLogger(__name__) class SQLiteDB(BaseDB): - def __init__(self, db_path: str = "spielberg.db"): + def __init__(self, db_path: str = "director.db"): """ :param db_path: Path to the SQLite database file. """ diff --git a/backend/spielberg/db/sqlite/initialize.py b/backend/spielberg/db/sqlite/initialize.py index 1ed9df3..ec95025 100644 --- a/backend/spielberg/db/sqlite/initialize.py +++ b/backend/spielberg/db/sqlite/initialize.py @@ -43,7 +43,7 @@ """ -def initialize_sqlite(db_name="spielberg.db"): +def initialize_sqlite(db_name="director.db"): """Initialize the SQLite database by creating the necessary tables.""" conn = sqlite3.connect(db_name) cursor = conn.cursor() diff --git a/backend/spielberg/entrypoint/api/__init__.py b/backend/spielberg/entrypoint/api/__init__.py index 7d1018c..ad031b2 100644 --- a/backend/spielberg/entrypoint/api/__init__.py +++ b/backend/spielberg/entrypoint/api/__init__.py @@ -11,8 +11,8 @@ from flask_socketio import SocketIO from logging.config import dictConfig -from spielberg.entrypoint.api.routes import agent_bp, session_bp, videodb_bp, config_bp -from spielberg.entrypoint.api.socket_io import ChatNamespace +from director.entrypoint.api.routes import agent_bp, session_bp, videodb_bp, config_bp +from director.entrypoint.api.socket_io import ChatNamespace from dotenv import load_dotenv @@ -49,7 +49,7 @@ def create_app(app_config: object): dictConfig(app.config["LOGGING_CONFIG"]) with app.app_context(): - from spielberg.entrypoint.api import errors + from director.entrypoint.api import errors # register blueprints app.register_blueprint(agent_bp) diff --git a/backend/spielberg/entrypoint/api/routes.py b/backend/spielberg/entrypoint/api/routes.py index 8a488fb..22c2e90 100644 --- a/backend/spielberg/entrypoint/api/routes.py +++ b/backend/spielberg/entrypoint/api/routes.py @@ -2,8 +2,8 @@ from flask import Blueprint, request, current_app as app -from spielberg.db import load_db -from spielberg.handler import ChatHandler, SessionHandler, VideoDBHandler, ConfigHandler +from director.db import load_db +from director.handler import ChatHandler, SessionHandler, VideoDBHandler, ConfigHandler agent_bp = Blueprint("agent", __name__, url_prefix="/agent") diff --git a/backend/spielberg/entrypoint/api/server.py b/backend/spielberg/entrypoint/api/server.py index 6d548db..ef9fbc8 100644 --- a/backend/spielberg/entrypoint/api/server.py +++ b/backend/spielberg/entrypoint/api/server.py @@ -1,7 +1,7 @@ import os from dotenv import load_dotenv -from spielberg.entrypoint.api import create_app +from director.entrypoint.api import create_app load_dotenv() diff --git a/backend/spielberg/entrypoint/api/socket_io.py b/backend/spielberg/entrypoint/api/socket_io.py index 58138df..857e339 100644 --- a/backend/spielberg/entrypoint/api/socket_io.py +++ b/backend/spielberg/entrypoint/api/socket_io.py @@ -3,8 +3,8 @@ from flask import current_app as app from flask_socketio import Namespace -from spielberg.db import load_db -from spielberg.handler import ChatHandler +from director.db import load_db +from director.handler import ChatHandler class ChatNamespace(Namespace): diff --git a/backend/spielberg/handler.py b/backend/spielberg/handler.py index b25f1cd..1a21a61 100644 --- a/backend/spielberg/handler.py +++ b/backend/spielberg/handler.py @@ -3,27 +3,27 @@ from dotenv import dotenv_values -from spielberg.agents.thumbnail import ThumbnailAgent -from spielberg.agents.video_summary import VideoSummaryAgent -from spielberg.agents.download import DownloadAgent -from spielberg.agents.pricing import PricingAgent -from spielberg.agents.upload import UploadAgent -from spielberg.agents.search import SearchAgent -from spielberg.agents.prompt_clip import PromptClipAgent -from spielberg.agents.index import IndexAgent -from spielberg.agents.brandkit import BrandkitAgent -from spielberg.agents.profanity_remover import ProfanityRemoverAgent -from spielberg.agents.image_generation import ImageGenerationAgent -from spielberg.agents.stream_video import StreamVideoAgent -from spielberg.agents.subtitle import SubtitleAgent -from spielberg.agents.slack_agent import SlackAgent - - -from spielberg.core.session import Session, InputMessage, MsgStatus -from spielberg.core.reasoning import ReasoningEngine -from spielberg.db.base import BaseDB -from spielberg.db import load_db -from spielberg.tools.videodb_tool import VideoDBTool +from director.agents.thumbnail import ThumbnailAgent +from director.agents.video_summary import VideoSummaryAgent +from director.agents.download import DownloadAgent +from director.agents.pricing import PricingAgent +from director.agents.upload import UploadAgent +from director.agents.search import SearchAgent +from director.agents.prompt_clip import PromptClipAgent +from director.agents.index import IndexAgent +from director.agents.brandkit import BrandkitAgent +from director.agents.profanity_remover import ProfanityRemoverAgent +from director.agents.image_generation import ImageGenerationAgent +from director.agents.stream_video import StreamVideoAgent +from director.agents.subtitle import SubtitleAgent +from director.agents.slack_agent import SlackAgent + + +from director.core.session import Session, InputMessage, MsgStatus +from director.core.reasoning import ReasoningEngine +from director.db.base import BaseDB +from director.db import load_db +from director.tools.videodb_tool import VideoDBTool logger = logging.getLogger(__name__) diff --git a/backend/spielberg/llm/anthropic.py b/backend/spielberg/llm/anthropic.py index 3428953..79b21b9 100644 --- a/backend/spielberg/llm/anthropic.py +++ b/backend/spielberg/llm/anthropic.py @@ -3,9 +3,9 @@ from pydantic import Field, field_validator, FieldValidationInfo from pydantic_settings import SettingsConfigDict -from spielberg.core.session import RoleTypes -from spielberg.llm.base import BaseLLM, BaseLLMConfig, LLMResponse, LLMResponseStatus -from spielberg.constants import ( +from director.core.session import RoleTypes +from director.llm.base import BaseLLM, BaseLLMConfig, LLMResponse, LLMResponseStatus +from director.constants import ( LLMType, EnvPrefix, ) diff --git a/backend/spielberg/llm/openai.py b/backend/spielberg/llm/openai.py index b0d7205..42421e6 100644 --- a/backend/spielberg/llm/openai.py +++ b/backend/spielberg/llm/openai.py @@ -5,8 +5,8 @@ from pydantic_settings import SettingsConfigDict -from spielberg.llm.base import BaseLLM, BaseLLMConfig, LLMResponse, LLMResponseStatus -from spielberg.constants import ( +from director.llm.base import BaseLLM, BaseLLMConfig, LLMResponse, LLMResponseStatus +from director.constants import ( LLMType, EnvPrefix, ) diff --git a/backend/spielberg/utils/exceptions.py b/backend/spielberg/utils/exceptions.py index f234e8a..94202de 100644 --- a/backend/spielberg/utils/exceptions.py +++ b/backend/spielberg/utils/exceptions.py @@ -1,21 +1,21 @@ -"""This module contains the exceptions used in the spielberg package.""" +"""This module contains the exceptions used in the director package.""" -class SpielbergException(Exception): +class DirectorException(Exception): """Base class for exceptions in this module.""" def __init__(self, message="An error occurred.", **kwargs): super(ValueError, self).__init__(message) -class AgentException(SpielbergException): +class AgentException(DirectorException): """Exception raised for errors in the agent.""" def __init__(self, message="An error occurred in the agent", **kwargs): super(ValueError, self).__init__(message) -class ToolException(SpielbergException): +class ToolException(DirectorException): """Exception raised for errors in the tool.""" def __init__(self, message="An error occurred in the tool", **kwargs): diff --git a/docker-compose.yml b/docker-compose.yml index cfdf734..72596d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: backend: - image: spielberg:latest + image: director:latest build: context: ./backend dockerfile: Dockerfile @@ -12,13 +12,13 @@ services: env_file: - ./backend/.env environment: - - FLASK_APP=spielberg.entrypoint.api.server + - FLASK_APP=director.entrypoint.api.server - FLASK_DEBUG=1 # dev command - command: python spielberg/entrypoint/api/server.py + command: python director/entrypoint/api/server.py frontend: - image: spielberg_frontend:latest + image: director_frontend:latest build: context: ./frontend ports: diff --git a/docs/README.md b/docs/README.md index bd451e0..0a162ca 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,6 @@ -# πŸ“š Spielberg Documentation +# πŸ“š Director Documentation -This directory contains the documentation for the Spielberg project. We use MkDocs to build and serve our documentation. +This directory contains the documentation for the Director project. We use MkDocs to build and serve our documentation. ## πŸš€ Getting Started @@ -65,4 +65,4 @@ When adding new documentation: ## 🀝 Need Help? -If you encounter any issues or have questions about the documentation, please [open an issue](https://github.com/video-db/Spielberg/issues) on our GitHub repository. +If you encounter any issues or have questions about the documentation, please [open an issue](https://github.com/video-db/Director/issues) on our GitHub repository. diff --git a/docs/agents/interface.md b/docs/agents/interface.md index adaba07..7784d0e 100644 --- a/docs/agents/interface.md +++ b/docs/agents/interface.md @@ -8,8 +8,8 @@ Base Agent is the base class for all agents. It provides a common interface for ### Base Agent -::: spielberg.agents.base.BaseAgent +::: director.agents.base.BaseAgent ### Agent Response -::: spielberg.agents.base.AgentResponse +::: director.agents.base.AgentResponse diff --git a/docs/core/reasoning.md b/docs/core/reasoning.md index 01d494d..1fc7624 100644 --- a/docs/core/reasoning.md +++ b/docs/core/reasoning.md @@ -1,4 +1,4 @@ ## Reasoning Engine -::: spielberg.core.reasoning.ReasoningEngine +::: director.core.reasoning.ReasoningEngine diff --git a/docs/core/session.md b/docs/core/session.md index 7173ea8..99e1480 100644 --- a/docs/core/session.md +++ b/docs/core/session.md @@ -3,20 +3,20 @@ ## BaseMessage -::: spielberg.core.session.BaseMessage +::: director.core.session.BaseMessage ## InputMessage -::: spielberg.core.session.InputMessage +::: director.core.session.InputMessage ## Output Message -::: spielberg.core.session.OutputMessage +::: director.core.session.OutputMessage ## Context Message -::: spielberg.core.session.ContextMessage +::: director.core.session.ContextMessage ## Session -::: spielberg.core.session.Session +::: director.core.session.Session diff --git a/docs/database/interface.md b/docs/database/interface.md index 4ca386d..c2a9e95 100644 --- a/docs/database/interface.md +++ b/docs/database/interface.md @@ -5,4 +5,4 @@ Base DB is the base class for all databases. It provides a common interface for ### Base DB -::: spielberg.db.base.BaseDB +::: director.db.base.BaseDB diff --git a/docs/database/sqlite.md b/docs/database/sqlite.md index 18b4ac8..efb5aaa 100644 --- a/docs/database/sqlite.md +++ b/docs/database/sqlite.md @@ -12,4 +12,4 @@ make init-sqlite-db ## SQLite Interface -::: spielberg.db.sqlite.db.SQLiteDB +::: director.db.sqlite.db.SQLiteDB diff --git a/docs/get_started/install.md b/docs/get_started/install.md index b0678ee..8e89f89 100644 --- a/docs/get_started/install.md +++ b/docs/get_started/install.md @@ -11,8 +11,8 @@ 1. Clone the repository: ``` bash -git clone https://github.com/video-db/Spielberg.git -cd Spielberg +git clone https://github.com/video-db/Director.git +cd Director ``` 2. Set up the environment: diff --git a/docs/get_started/railway.md b/docs/get_started/railway.md index 6f81f75..52ea381 100644 --- a/docs/get_started/railway.md +++ b/docs/get_started/railway.md @@ -1,16 +1,16 @@ !!! note - Spielberg will soon be available on the Railway Marketplace for easy deployment. + Director will soon be available on the Railway Marketplace for easy deployment. ## Deployment Instructions via Railway CLI -1. Clone the Spielberg repository to your local machine: +1. Clone the Director repository to your local machine: ``` - git clone https://github.com/video-db/Spielberg + git clone https://github.com/video-db/Director ``` 2. Change the directory to the cloned repository: ``` - cd Spielberg + cd Director ``` 3. Install the [Railway CLI](https://docs.railway.app/guides/cli). 4. Navigate to the Railway [Dashboard](https://railway.app/dashboard) and create an empty project. @@ -60,4 +60,4 @@ VITE_APP_BACKEND_URL="deployed_backend_service_public_url" ``` -* After deployment, generate a domain and navigate to the frontend service URL (which can be found in Settings β†’ Networking β†’ Public Networking) in your web browser to access the Spielberg application. +* After deployment, generate a domain and navigate to the frontend service URL (which can be found in Settings β†’ Networking β†’ Public Networking) in your web browser to access the Director application. diff --git a/docs/get_started/render.md b/docs/get_started/render.md index 1fb9bb3..0e7b833 100644 --- a/docs/get_started/render.md +++ b/docs/get_started/render.md @@ -2,7 +2,7 @@ 1. Go to the [Render dashboard](https://dashboard.render.com/blueprints). 2. Click **Add New Blueprint Instance** by visiting this [link](https://dashboard.render.com/select-repo?type=blueprint). -3. Add the public Spielberg Git repository: [Spielberg Repository](https://github.com/video-db/Spielberg). Alternatively, you can fork the repository and connect your fork to your Railway account. +3. Add the public Director Git repository: [Director Repository](https://github.com/video-db/Director). Alternatively, you can fork the repository and connect your fork to your Railway account. 4. Set a name for the blueprint and deploy it. This will deploy both the frontend and backend services. @@ -21,4 +21,4 @@ Next, update the frontend environment variables: VITE_APP_BACKEND_URL="deployed_backend_service_public_url" ``` -Once the deployment is complete, navigate to the frontend service URL in your web browser to access the Spielberg application. +Once the deployment is complete, navigate to the frontend service URL in your web browser to access the Director application. diff --git a/docs/index.md b/docs/index.md index 8adf17f..6adc6a8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,3 @@ -# Welcome to Spielberg +# Welcome to Director -The Spielberg project is an advanced video processing and analysis platform that utilizes a range of AI agents and language models to handle diverse video management needs and tasks. It features a modular architecture that supports easy expansion and integration of new functionalities. Core components include specialized agents for distinct processing tasks, multiple language models for natural language processing, and a flexible database interface for data storage and retrieval. The project emphasizes ease of installation and setup through a streamlined Makefile, catering to developers looking to deploy or extend its capabilities efficiently. +The Director project is an advanced video processing and analysis platform that utilizes a range of AI agents and language models to handle diverse video management needs and tasks. It features a modular architecture that supports easy expansion and integration of new functionalities. Core components include specialized agents for distinct processing tasks, multiple language models for natural language processing, and a flexible database interface for data storage and retrieval. The project emphasizes ease of installation and setup through a streamlined Makefile, catering to developers looking to deploy or extend its capabilities efficiently. diff --git a/docs/llm/anthropic.md b/docs/llm/anthropic.md index 1e24036..df8d3c0 100644 --- a/docs/llm/anthropic.md +++ b/docs/llm/anthropic.md @@ -6,10 +6,10 @@ AnthropicAI extends the base LLM and implements the Anthropic API. AnthropicAI Config is the configuration object for AnthropicAI. It is used to configure AnthropicAI and is passed to AnthropicAI when it is created. -::: spielberg.llm.anthropic.AnthropicAIConfig +::: director.llm.anthropic.AnthropicAIConfig ### AnthropicAI Interface AnthropicAI is the LLM used by the agents and tools. It is used to generate responses to messages. -::: spielberg.llm.anthropic.AnthropicAI +::: director.llm.anthropic.AnthropicAI diff --git a/docs/llm/interface.md b/docs/llm/interface.md index 8e05734..130741b 100644 --- a/docs/llm/interface.md +++ b/docs/llm/interface.md @@ -6,17 +6,17 @@ Base LLM is the base class for all LLMs. It provides a common interface for all Base LLM Config is the configuration object for an LLM. It is used to configure the LLM and is passed to the LLM when it is created. -::: spielberg.llm.base.BaseLLMConfig +::: director.llm.base.BaseLLMConfig ### Base LLM Base LLM is the base class for all LLMs. It provides a common interface for all LLMs to follow. -::: spielberg.llm.base.BaseLLM +::: director.llm.base.BaseLLM ### LLM Response LLM Response is the response object for an LLM. It is returned by the LLM after processing an input message. -::: spielberg.llm.base.LLMResponse +::: director.llm.base.LLMResponse diff --git a/docs/llm/openai.md b/docs/llm/openai.md index 85280ba..e58e786 100644 --- a/docs/llm/openai.md +++ b/docs/llm/openai.md @@ -6,10 +6,10 @@ OpenAI extends the Base LLM and implements the OpenAI API. OpenAI Config is the configuration object for OpenAI. It is used to configure OpenAI and is passed to OpenAI when it is created. -::: spielberg.llm.openai.OpenaiConfig +::: director.llm.openai.OpenaiConfig ### OpenAI Interface OpenAI is the LLM used by the agents and tools. It is used to generate responses to messages. -::: spielberg.llm.openai.OpenAI +::: director.llm.openai.OpenAI diff --git a/docs/overrides/main.html b/docs/overrides/main.html index 82f7603..37d4f03 100644 --- a/docs/overrides/main.html +++ b/docs/overrides/main.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block announce %} -Spielberg is in open beta. Come join our +Director is in open beta. Come join our Discord community . Feedback and questions are welcome! πŸš€ diff --git a/docs/server/initialization.md b/docs/server/initialization.md index d29135b..fd9dd4f 100644 --- a/docs/server/initialization.md +++ b/docs/server/initialization.md @@ -7,10 +7,10 @@ Server is the entry point for the application. Implemented using Flask and Socke By default, the server is configured to run in development mode. To run in production mode, set the `SERVER_ENV` environment variable to `production`. -::: spielberg.entrypoint.api.server.LocalAppConfig +::: director.entrypoint.api.server.LocalAppConfig -::: spielberg.entrypoint.api.server.ProductionAppConfig +::: director.entrypoint.api.server.ProductionAppConfig ## Server Initialization -::: spielberg.entrypoint.api.create_app +::: director.entrypoint.api.create_app diff --git a/docs/server/socketio.md b/docs/server/socketio.md index 07019db..44b3d5c 100644 --- a/docs/server/socketio.md +++ b/docs/server/socketio.md @@ -5,4 +5,4 @@ WebSocket routes are defined in the `sockets` folder. ### Chat Namespace -::: spielberg.entrypoint.api.socket_io.ChatNamespace +::: director.entrypoint.api.socket_io.ChatNamespace diff --git a/docs/utilities/exceptions.md b/docs/utilities/exceptions.md index 0b256fd..29ada7d 100644 --- a/docs/utilities/exceptions.md +++ b/docs/utilities/exceptions.md @@ -1,7 +1,7 @@ ## Exceptions -::: spielberg.utils.exceptions.SpielbergException +::: director.utils.exceptions.DirectorException -::: spielberg.utils.exceptions.AgentException +::: director.utils.exceptions.AgentException -::: spielberg.utils.exceptions.ToolException +::: director.utils.exceptions.ToolException diff --git a/frontend/README.md b/frontend/README.md index 5acc3cf..c3ea3b1 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,8 +1,8 @@ -# 🎬 Spielberg Frontend +# 🎬 Director Frontend ## πŸ“‹ Overview -Spielberg Frontend is a Vue.js-based user interface for the Spielberg project. It utilizes various components and libraries to create an interactive and responsive web application. +Director Frontend is a Vue.js-based user interface for the Director project. It utilizes various components and libraries to create an interactive and responsive web application. ### 🧩 Key Components: - Vue.js 3 diff --git a/frontend/index.html b/frontend/index.html index f6d850b..862d6cf 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - Spielberg + Director
diff --git a/frontend/package.json b/frontend/package.json index 0a517e4..7fce820 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "spielberg-fe", + "name": "director-fe", "private": true, "version": "0.0.0", "type": "module", diff --git a/render.yaml b/render.yaml index db5a746..d7afbe0 100644 --- a/render.yaml +++ b/render.yaml @@ -8,7 +8,7 @@ services: dockerContext: ./backend envVars: - key: FLASK_APP - value: spielberg.entrypoint.api.server + value: director.entrypoint.api.server - key: SERVER_DEBUG value: 1 diff --git a/setup.sh b/setup.sh index 23826be..48feb2a 100755 --- a/setup.sh +++ b/setup.sh @@ -240,7 +240,7 @@ echo "πŸ“ Creating .env file with provided API keys..." cat < .env VIDEO_DB_API_KEY=$VIDEO_DB_API_KEY VIDEO_DB_BASE_URL=https://api.videodb.io -FLASK_APP=spielberg/entrypoint/api/server.py +FLASK_APP=director/entrypoint/api/server.py EOT cd ..