feat(embedding): defer embedding workflow, use transcoded assets, and execute chunks in separate activities

This commit is contained in:
yiling
2026-06-18 10:57:22 +08:00
parent 4af081f128
commit f399d2c469
11 changed files with 451 additions and 95 deletions
+5 -4
View File
@@ -54,10 +54,11 @@ Shumai supports storing files locally or on S3-compatible endpoints.
Configures whether background transcoding and AI agents are executed locally or offloaded to a Temporal cluster.
| Variable | Description | Example / Default |
| :------------------ | :------------------------------------------------------------------------------------------------- | :------------------------------ |
| `WORKFLOW_EXECUTOR` | Engine choice. Use `local` for in-process database polling, or `temporal` for distributed workers. | `local` (default) or `temporal` |
| `TEMPORAL_ADDRESS` | Host and port of the Temporal cluster gRPC service. | `localhost:7233` (default) |
| Variable | Description | Example / Default |
| :------------------------- | :------------------------------------------------------------------------------------------------- | :------------------------------ |
| `WORKFLOW_EXECUTOR` | Engine choice. Use `local` for in-process database polling, or `temporal` for distributed workers. | `local` (default) or `temporal` |
| `TEMPORAL_ADDRESS` | Host and port of the Temporal cluster gRPC service. | `localhost:7233` (default) |
| `EMBEDDING_CHUNK_DURATION` | The duration in seconds for each video chunk when generating video embeddings. | `60.0` (default) |
---
+1
View File
@@ -34,6 +34,7 @@ A specialized utility agent that processes assets to generate search indexes. Yo
- Once created and enabled, Shumai automatically runs embedding generation for new file uploads if the file type is supported (image or video).
- These search indexes are saved to power Shumai's natural language semantic search capabilities.
- **Note:** The Embedding Agent is hardcoded to use `google-embedding-2` as the LLM model. Because of this, you cannot choose a provider or model. Make sure you set the `GEMINI_API_KEY` environment variable to make it work.
- **Chunk Duration:** You can configure the duration of chunks used for long video indexing via the `EMBEDDING_CHUNK_DURATION` environment variable (defaults to 60 seconds).
---