Function
hasCapability
(capabilities []string, expected string)
Source from the content-addressed store, hash-verified
| 165 | } |
| 166 | |
| 167 | func 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 | |
| 176 | func matchesRule(rule config.RouteRule, tenant config.TenantConfig, req types.AIRequest) bool { |
| 177 | if rule.When.TaskType != "" && rule.When.TaskType != req.TaskType { |
Tested by
no test coverage detected