MCPcopy Create free account
hub / github.com/InferCore/InferCore / Classify

Function Classify

internal/pipelines/registry.go:26–43  ·  view source on GitHub ↗

Classify returns pipeline kind from ref or request type.

(requestType, ref string)

Source from the content-addressed store, hash-verified

24
25// Classify returns pipeline kind from ref or request type.
26func Classify(requestType, ref string) Kind {
27 rt := strings.ToLower(strings.TrimSpace(requestType))
28 switch rt {
29 case types.RequestTypeRAG:
30 return KindRAG
31 case types.RequestTypeAgent:
32 return KindAgent
33 default:
34 r := strings.ToLower(strings.TrimSpace(ref))
35 if strings.Contains(r, "rag/") {
36 return KindRAG
37 }
38 if strings.Contains(r, "agent/") {
39 return KindAgent
40 }
41 return KindInference
42 }
43}

Callers 1

TestClassifyFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestClassifyFunction · 0.68