mirror of
https://github.com/EthanMarti/infio-copilot.git
synced 2026-05-09 16:38:19 +00:00
Optimize the vector manager by adding batch transaction insertion and delayed memory cleanup features, limit the maximum batch size to reduce memory pressure, and enhance system performance and stability.
This commit is contained in:
@@ -16,7 +16,7 @@ import { getEmbeddingModel } from './embedding'
|
||||
type EmbeddingManager = {
|
||||
modelLoaded: boolean
|
||||
currentModel: string | null
|
||||
loadModel(modelId: string, useGpu: boolean): Promise<any>
|
||||
loadModel(modelId: string, useGpu: boolean): Promise<unknown>
|
||||
embed(text: string): Promise<{ vec: number[] }>
|
||||
embedBatch(texts: string[]): Promise<{ vec: number[] }[]>
|
||||
}
|
||||
@@ -248,7 +248,6 @@ export class RAGEngine {
|
||||
|
||||
if (workspace) {
|
||||
// 获取工作区中的所有文件路径
|
||||
const folders: string[] = []
|
||||
const files: string[] = []
|
||||
|
||||
for (const item of workspace.content) {
|
||||
|
||||
Reference in New Issue
Block a user