Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
vgmartinez committed Jan 13, 2025
1 parent 74d88a8 commit e1d86da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ We love contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for

## 📜 License

AI Gateway CE is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
TrustGate is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

## 🌟 Star History

Expand Down
11 changes: 9 additions & 2 deletions pkg/plugins/external_api/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,15 @@ func evaluateCondition(actual interface{}, operator string, expected interface{}
case "neq":
return actual != expected
case "gt":
// Add numeric comparisons if needed
return false
// Convert to float64 for numeric comparison
actualFloat, aok := actual.(float64)
expectedFloat, eok := expected.(float64)
return aok && eok && actualFloat > expectedFloat
case "lt":
// Convert to float64 for numeric comparison
actualFloat, aok := actual.(float64)
expectedFloat, eok := expected.(float64)
return aok && eok && actualFloat < expectedFloat
default:
return false
}
Expand Down

0 comments on commit e1d86da

Please sign in to comment.