KnowledgeSearchTool 在核心管线中执行向量检索。
()
| 43 | |
| 44 | // KnowledgeSearchTool 在核心管线中执行向量检索。 |
| 45 | func (f *Factory) KnowledgeSearchTool() (tools.Tool, error) { |
| 46 | if f.Pipeline == nil { |
| 47 | return nil, errors.New("knowledge tool: pipeline is nil") |
| 48 | } |
| 49 | return &searchTool{pipe: f.Pipeline}, nil |
| 50 | } |
| 51 | |
| 52 | type addTool struct { |
| 53 | pipe *core.Pipeline |
no outgoing calls