Skip to content

Commit

Permalink
Merge pull request #24 from video-db/name-change
Browse files Browse the repository at this point in the history
Name change
  • Loading branch information
ashish-spext authored Oct 28, 2024
2 parents 44a5eb7 + 234c2d7 commit ee86c82
Show file tree
Hide file tree
Showing 57 changed files with 185 additions and 185 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


<h1 align="center">
Spielberg
Director
<br/>
<br />
<a href="https://videodb.io/">
Expand All @@ -26,7 +26,7 @@
<br />
<p align="center">
<p align="center">
<a href="https://render.com/deploy?repo=https://github.com/video-db/Spielberg" target="_blank" rel="nofollow"><img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render"></a>
<a href="https://render.com/deploy?repo=https://github.com/video-db/Director" target="_blank" rel="nofollow"><img src="https://render.com/images/deploy-to-render-button.svg" alt="Deploy to Render"></a>
<a href="https://railway.app/template/">
<img src="https://railway.app/button.svg" alt="Deploy on Railway">
</a>
Expand All @@ -40,16 +40,16 @@
<a href="https://stackblitz.com/edit/videodb-player-demo-pxy8k7?file=src%2FApp.vue"><strong>View Demo »</strong></a>
<br />
<br />
<a href="https://github.com/video-db/Spielberg/issues">Report Bug</a>
<a href="https://github.com/video-db/Director/issues">Report Bug</a>
·
<a href="https://github.com/video-db/Spielberg/issues">Request Feature</a>
<a href="https://github.com/video-db/Director/issues">Request Feature</a>
</p>
</p>

<!-- ABOUT THE PROJECT -->

## 🧐 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.

Expand All @@ -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:**
Expand Down Expand Up @@ -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`)
Expand All @@ -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.
Expand All @@ -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/

Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
4 changes: 2 additions & 2 deletions backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -43,4 +43,4 @@ lint:

run:
source $(VENV_DIR)/bin/activate && \
python spielberg/entrypoint/api/server.py
python director/entrypoint/api/server.py
24 changes: 12 additions & 12 deletions backend/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.

Expand All @@ -41,27 +41,27 @@ 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

The backend uses Flask-SocketIO for real-time communication with the frontend. Socket events are used to send and receive messages, updates, and other real-time data.

## 🛠️ 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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand All @@ -14,7 +14,7 @@ dependencies = [
"python-dotenv==1.0.1",
"videodb",
"yt-dlp==2024.10.7",
"spielberg",
"director",
]


Expand Down
2 changes: 1 addition & 1 deletion backend/spielberg/agents/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions backend/spielberg/agents/brandkit.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions backend/spielberg/agents/download.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions backend/spielberg/agents/image_generation.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions backend/spielberg/agents/index.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions backend/spielberg/agents/pricing.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
8 changes: 4 additions & 4 deletions backend/spielberg/agents/profanity_remover.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

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,
VideoData,
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__)

Expand Down
8 changes: 4 additions & 4 deletions backend/spielberg/agents/prompt_clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
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,
MsgStatus,
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__)

Expand Down
4 changes: 2 additions & 2 deletions backend/spielberg/agents/sample.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
8 changes: 4 additions & 4 deletions backend/spielberg/agents/search.py
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -14,7 +14,7 @@
ContextMessage,
RoleTypes,
)
from spielberg.tools.videodb_tool import VideoDBTool
from director.tools.videodb_tool import VideoDBTool

logger = logging.getLogger(__name__)

Expand Down
10 changes: 5 additions & 5 deletions backend/spielberg/agents/slack_agent.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions backend/spielberg/agents/stream_video.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down
Loading

0 comments on commit ee86c82

Please sign in to comment.