mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-29 20:34:28 +00:00
fix(agent): adaptively set video embedding frame count based on aspect ratio (#477)
* fix(agent): adaptively set video embedding frame count based on aspect ratio Adjust sampled video frame counts between 15 and 14 based on the video's aspect ratio. Standard aspect ratios (1:1, 4:3, 3:4, 16:9, 9:16, 21:9) stay within the 2048 token signature bucket when using 15 frames, while non-standard or custom aspect ratios use 14 frames to guarantee that sequence length never exceeds 2048 tokens, preventing out-of-memory errors on the embedding server. * feat(agent): persist video chunk embeddings incrementally and resume on retry (#478)
This commit is contained in:
@@ -63,7 +63,7 @@ export class TextEmbeddingService {
|
||||
}
|
||||
}
|
||||
|
||||
const signal = options?.signal ?? AbortSignal.timeout(5000)
|
||||
const signal = options?.signal ?? AbortSignal.timeout(15000)
|
||||
|
||||
let result: TextEmbeddingResult
|
||||
if (provider === 'gemma-embedding-2-openai') {
|
||||
|
||||
Reference in New Issue
Block a user