DefaultInMemoryPipeline 返回基于内存向量库和 MockEmbedder 的默认管线(单例)。
()
| 59 | |
| 60 | // DefaultInMemoryPipeline 返回基于内存向量库和 MockEmbedder 的默认管线(单例)。 |
| 61 | func DefaultInMemoryPipeline() (*Pipeline, error) { |
| 62 | defaultOnce.Do(func() { |
| 63 | defaultPipe, defaultErr = NewPipeline(PipelineConfig{ |
| 64 | Store: vector.NewMemoryStore(), |
| 65 | Embedder: vector.NewMockEmbedder(32), |
| 66 | Namespace: "default", |
| 67 | DefaultTopK: 5, |
| 68 | }) |
| 69 | }) |
| 70 | return defaultPipe, defaultErr |
| 71 | } |
| 72 | |
| 73 | // UpsertText 将纯文本写入向量库。 |
| 74 | // - 自动按段落切分;ID 会追加 chunk 索引(id#0, id#1...) |
nothing calls this directly
no test coverage detected