Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#2361)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 5, 2024
1 parent f44387c commit c18f654
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1335
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e14af815e43a68175aaf8a216fcfa98f21d3c9112bd1f52cc4235fe2de4d9ab7.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a9fac2ac06a106ac7e616a6b77e657a85e0f9f5549ac2452a52fe4f25c4f3c2c.yml
34 changes: 19 additions & 15 deletions ai_gateway/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,23 @@ func (r *LogService) Get(ctx context.Context, id string, params LogGetParams, op
}

type LogGetResponse struct {
ID string `json:"id,required" format:"uuid"`
Cached bool `json:"cached,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Duration int64 `json:"duration,required"`
Model string `json:"model,required"`
Path string `json:"path,required"`
Provider string `json:"provider,required"`
Request string `json:"request,required"`
Response string `json:"response,required"`
Success bool `json:"success,required"`
TokensIn int64 `json:"tokens_in,required"`
TokensOut int64 `json:"tokens_out,required"`
Metadata string `json:"metadata"`
StatusCode int64 `json:"status_code"`
JSON logGetResponseJSON `json:"-"`
ID string `json:"id,required" format:"uuid"`
Cached bool `json:"cached,required"`
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
Duration int64 `json:"duration,required"`
Model string `json:"model,required"`
Path string `json:"path,required"`
Provider string `json:"provider,required"`
Request string `json:"request,required"`
Response string `json:"response,required"`
Success bool `json:"success,required"`
TokensIn int64 `json:"tokens_in,required"`
TokensOut int64 `json:"tokens_out,required"`
Metadata string `json:"metadata"`
RequestType string `json:"request_type"`
StatusCode int64 `json:"status_code"`
Step int64 `json:"step"`
JSON logGetResponseJSON `json:"-"`
}

// logGetResponseJSON contains the JSON metadata for the struct [LogGetResponse]
Expand All @@ -90,7 +92,9 @@ type logGetResponseJSON struct {
TokensIn apijson.Field
TokensOut apijson.Field
Metadata apijson.Field
RequestType apijson.Field
StatusCode apijson.Field
Step apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
Expand Down

0 comments on commit c18f654

Please sign in to comment.