mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 10:14:51 +00:00
feat(tools): local-first document extraction for read_document
Squash merge PR #111 after resolving docs/changelog conflicts. Local checks covered tools/config and both Go builds; PR CI run 26704622503 passed release-versioning, go, and web.
This commit is contained in:
1 parent
80893a1e6c
commit
9ab3d6dfe5
9 files changed
+770
-2
No files matched your search
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/google/uuid"
|
||||
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/nextlevelbuilder/goclaw/internal/agent"
|
||||
"github.com/nextlevelbuilder/goclaw/internal/bus"
|
||||
@@ -86,6 +87,12 @@ func wireExtras(
|
||||
// Register media analysis tools (need mediaStore for file access).
|
||||
readDocumentTool := tools.NewReadDocumentTool(providerReg, mediaStore)
|
||||
readDocumentTool.SetUsageCapService(usageCapSvc)
|
||||
readDocumentTool.SetLocalParser(tools.NewLocalExtractParser(tools.LocalExtractConfig{
|
||||
Enabled: appCfg.Tools.DocumentParser.LocalFirstEnabled(),
|
||||
MaxPages: appCfg.Tools.DocumentParser.MaxPages,
|
||||
Timeout: time.Duration(appCfg.Tools.DocumentParser.TimeoutSec) * time.Second,
|
||||
MinTextLen: appCfg.Tools.DocumentParser.MinTextLen,
|
||||
}))
|
||||
toolsReg.Register(readDocumentTool)
|
||||
readAudioTool := tools.NewReadAudioTool(providerReg, mediaStore)
|
||||
readAudioTool.SetUsageCapService(usageCapSvc)
|
||||
|
||||
Reference in new issue
Block a user