MCPcopy Index your code
hub / github.com/InferCore/InferCore / kbName

Function kbName

internal/server/server.go:511–521  ·  view source on GitHub ↗
(req types.AIRequest, cfg *config.Config)

Source from the content-addressed store, hash-verified

509}
510
511func kbName(req types.AIRequest, cfg *config.Config) string {
512 if req.Context != nil {
513 if v, ok := req.Context["knowledge_base"].(string); ok && strings.TrimSpace(v) != "" {
514 return strings.TrimSpace(v)
515 }
516 }
517 if cfg != nil && len(cfg.KnowledgeBases) > 0 {
518 return cfg.KnowledgeBases[0].Name
519 }
520 return ""
521}
522
523type aiSuccessParams struct {
524 traceID string

Callers 1

runRAGPipelineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected