Read Codex rate limits at startup so Status always shows them
This commit is contained in:
@@ -24,6 +24,7 @@ var clientMethods = []string{
|
||||
"turn/start",
|
||||
"turn/steer",
|
||||
"turn/interrupt",
|
||||
"account/rateLimits/read",
|
||||
}
|
||||
|
||||
type schema struct {
|
||||
@@ -201,8 +202,13 @@ func (g *gen) variants(def string) []method {
|
||||
log.Fatalf("%s method: %v", def, err)
|
||||
}
|
||||
params := ""
|
||||
if p := v.Properties["params"]; p != nil && p.Ref != "" {
|
||||
params = refName(p.Ref)
|
||||
if p := v.Properties["params"]; p != nil {
|
||||
if alts := nonNull(p.AnyOf); len(alts) == 1 {
|
||||
p = alts[0]
|
||||
}
|
||||
if p.Ref != "" {
|
||||
params = refName(p.Ref)
|
||||
}
|
||||
}
|
||||
response := ""
|
||||
if strings.HasSuffix(params, "Params") {
|
||||
|
||||
Reference in New Issue
Block a user