We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b721d6 commit 6203b55Copy full SHA for 6203b55
core/llm_token_ratelimit/rule.go
@@ -29,6 +29,9 @@ type Rule struct {
29
}
30
31
func (r *Rule) ResourceName() string {
32
+ if r == nil {
33
+ return "Rule{nil}"
34
+ }
35
return r.Resource
36
37
@@ -68,6 +71,10 @@ func (r *Rule) String() string {
68
71
69
72
70
73
func (r *Rule) setDefaultRuleOption() {
74
75
+ return
76
77
+
78
if len(r.Resource) == 0 {
79
r.Resource = DefaultResourcePattern
80
@@ -89,6 +96,10 @@ func (r *Rule) setDefaultRuleOption() {
89
96
90
97
91
98
func (r *Rule) filterDuplicatedItem() {
99
100
101
102
92
103
occuredKeyItem := make(map[string]struct{})
93
104
var specificItems []*SpecificItem
94
105
for idx1 := len(r.SpecificItems) - 1; idx1 >= 0; idx1-- {
0 commit comments