mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 07:10:29 +08:00
Port Python agentic search to Go (nav service, harness, tools) (#17702)
Port Python rag/advanced_rag agentic search to Go: ES-backed dataset-nav service, agentic-search harness, and agent tools. Includes agentic-search port plan and self-review docs.
This commit is contained in:
@@ -38,6 +38,7 @@ import (
|
||||
dataset "ragflow/internal/service/dataset"
|
||||
"ragflow/internal/service/document"
|
||||
"ragflow/internal/service/file"
|
||||
"ragflow/internal/service/nav"
|
||||
"ragflow/internal/service/nlp"
|
||||
"ragflow/internal/storage"
|
||||
"ragflow/internal/syncer"
|
||||
@@ -835,6 +836,16 @@ func startServer(ctx context.Context) {
|
||||
compilationTemplateGroupHandler := handler.NewCompilationTemplateGroupHandler(service.NewCompilationTemplateGroupService())
|
||||
datasetArtifactHandler := handler.NewDatasetArtifactHandler(service.NewDatasetArtifactService(), datasetsService, file.NewFileCommitService())
|
||||
|
||||
// Install the production eino-based chat invoker as the shared chat default,
|
||||
// so agentic-search harness LLM calls work in production. Without this,
|
||||
// chat.GetDefaultInvoker() stays nil and the harness falls back gracefully.
|
||||
component.InstallDefaultChatInvoker()
|
||||
|
||||
// Install the dataset-nav ES-backed service (internal/service/nav +
|
||||
// internal/service/nlp). The embedder resolves the tenant's embedding model
|
||||
// on demand so Search/UpsertDoc can embed queries/summaries automatically.
|
||||
nav.SetNavService(nlp.NewNavService(service.NewNavEmbedder(modelProviderService, "")))
|
||||
|
||||
// Initialize router
|
||||
r := router.NewRouter(authHandler,
|
||||
userHandler,
|
||||
|
||||
Reference in New Issue
Block a user