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

Function ragQuery

internal/server/server.go:497–509  ·  view source on GitHub ↗
(req types.AIRequest)

Source from the content-addressed store, hash-verified

495}
496
497func ragQuery(req types.AIRequest) string {
498 if req.Context != nil {
499 if q, ok := req.Context["query"].(string); ok && strings.TrimSpace(q) != "" {
500 return strings.TrimSpace(q)
501 }
502 }
503 if req.Input != nil {
504 if t, ok := req.Input["text"].(string); ok {
505 return strings.TrimSpace(t)
506 }
507 }
508 return ""
509}
510
511func kbName(req types.AIRequest, cfg *config.Config) string {
512 if req.Context != nil {

Callers 1

runRAGPipelineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected