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

Function hasCapability

internal/router/rule_router.go:167–174  ·  view source on GitHub ↗
(capabilities []string, expected string)

Source from the content-addressed store, hash-verified

165}
166
167func hasCapability(capabilities []string, expected string) bool {
168 for _, c := range capabilities {
169 if c == expected {
170 return true
171 }
172 }
173 return false
174}
175
176func matchesRule(rule config.RouteRule, tenant config.TenantConfig, req types.AIRequest) bool {
177 if rule.When.TaskType != "" && rule.When.TaskType != req.TaskType {

Callers 1

supportsTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected