Skip to content

Commit

Permalink
feat(api): Config update for yjp20/dev (#3194)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Sep 19, 2024
1 parent ac9237d commit 1e3dd2f
Show file tree
Hide file tree
Showing 62 changed files with 1,678 additions and 1,152 deletions.
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1330
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-c3cd4c1b3d10ea035cd202f12f4157a15c89826346ecece251da05916303098e.yml
configured_endpoints: 1331
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-39b038356da795b90be9cf01748bbbfc58b3ea7c73bb33bf2a4b5b4969342c22.yml
4 changes: 2 additions & 2 deletions ai_gateway/aigateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ func (r AIGatewayListParams) URLQuery() (v url.Values) {
type AIGatewayListParamsOrderByDirection string

const (
AIGatewayListParamsOrderByDirectionAsc AIGatewayListParamsOrderByDirection = "asc"
AIGatewayListParamsOrderByDirectionDesc AIGatewayListParamsOrderByDirection = "desc"
AIGatewayListParamsOrderByDirectionAsc AIGatewayListParamsOrderByDirection = "ASC"
AIGatewayListParamsOrderByDirectionDesc AIGatewayListParamsOrderByDirection = "DESC"
)

func (r AIGatewayListParamsOrderByDirection) IsKnown() bool {
Expand Down
33 changes: 8 additions & 25 deletions ai_gateway/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,12 @@ type LogListParams struct {
Cached param.Field[bool] `query:"cached"`
Direction param.Field[LogListParamsDirection] `query:"direction"`
EndDate param.Field[time.Time] `query:"end_date" format:"date-time"`
Feedback param.Field[LogListParamsFeedback] `query:"feedback"`
MaxCost param.Field[float64] `query:"max_cost"`
MaxDuration param.Field[float64] `query:"max_duration"`
MaxTokensIn param.Field[float64] `query:"max_tokens_in"`
MaxTokensOut param.Field[float64] `query:"max_tokens_out"`
MaxTotalTokens param.Field[float64] `query:"max_total_tokens"`
MetaInfo param.Field[bool] `query:"meta_info"`
MaxTokens param.Field[float64] `query:"max_tokens"`
MinCost param.Field[float64] `query:"min_cost"`
MinDuration param.Field[float64] `query:"min_duration"`
MinTokensIn param.Field[float64] `query:"min_tokens_in"`
MinTokensOut param.Field[float64] `query:"min_tokens_out"`
MinTotalTokens param.Field[float64] `query:"min_total_tokens"`
MinTokens param.Field[float64] `query:"min_tokens"`
Model param.Field[string] `query:"model"`
ModelType param.Field[string] `query:"model_type"`
OrderBy param.Field[LogListParamsOrderBy] `query:"order_by"`
Expand Down Expand Up @@ -172,26 +166,13 @@ type LogListParamsDirection string
const (
LogListParamsDirectionAsc LogListParamsDirection = "asc"
LogListParamsDirectionDesc LogListParamsDirection = "desc"
LogListParamsDirectionAsc LogListParamsDirection = "ASC"
LogListParamsDirectionDesc LogListParamsDirection = "DESC"
)

func (r LogListParamsDirection) IsKnown() bool {
switch r {
case LogListParamsDirectionAsc, LogListParamsDirectionDesc:
return true
}
return false
}

type LogListParamsFeedback float64

const (
LogListParamsFeedback0 LogListParamsFeedback = 0
LogListParamsFeedback1 LogListParamsFeedback = 1
)

func (r LogListParamsFeedback) IsKnown() bool {
switch r {
case LogListParamsFeedback0, LogListParamsFeedback1:
case LogListParamsDirectionAsc, LogListParamsDirectionDesc, LogListParamsDirectionAsc, LogListParamsDirectionDesc:
return true
}
return false
Expand Down Expand Up @@ -221,11 +202,13 @@ type LogListParamsOrderByDirection string
const (
LogListParamsOrderByDirectionAsc LogListParamsOrderByDirection = "asc"
LogListParamsOrderByDirectionDesc LogListParamsOrderByDirection = "desc"
LogListParamsOrderByDirectionAsc LogListParamsOrderByDirection = "ASC"
LogListParamsOrderByDirectionDesc LogListParamsOrderByDirection = "DESC"
)

func (r LogListParamsOrderByDirection) IsKnown() bool {
switch r {
case LogListParamsOrderByDirectionAsc, LogListParamsOrderByDirectionDesc:
case LogListParamsOrderByDirectionAsc, LogListParamsOrderByDirectionDesc, LogListParamsOrderByDirectionAsc, LogListParamsOrderByDirectionDesc:
return true
}
return false
Expand Down
10 changes: 2 additions & 8 deletions ai_gateway/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,12 @@ func TestLogListWithOptionalParams(t *testing.T) {
Cached: cloudflare.F(true),
Direction: cloudflare.F(ai_gateway.LogListParamsDirectionAsc),
EndDate: cloudflare.F(time.Now()),
Feedback: cloudflare.F(ai_gateway.LogListParamsFeedback0),
MaxCost: cloudflare.F(0.000000),
MaxDuration: cloudflare.F(0.000000),
MaxTokensIn: cloudflare.F(0.000000),
MaxTokensOut: cloudflare.F(0.000000),
MaxTotalTokens: cloudflare.F(0.000000),
MetaInfo: cloudflare.F(true),
MaxTokens: cloudflare.F(0.000000),
MinCost: cloudflare.F(0.000000),
MinDuration: cloudflare.F(0.000000),
MinTokensIn: cloudflare.F(0.000000),
MinTokensOut: cloudflare.F(0.000000),
MinTotalTokens: cloudflare.F(0.000000),
MinTokens: cloudflare.F(0.000000),
Model: cloudflare.F("model"),
ModelType: cloudflare.F("model_type"),
OrderBy: cloudflare.F(ai_gateway.LogListParamsOrderByCreatedAt),
Expand Down
Loading

0 comments on commit 1e3dd2f

Please sign in to comment.