Skip to content

release: 5.1.0 #4177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
bb5b444
codegen metadata
stainless-app[bot] Jul 31, 2025
9f593c5
codegen metadata
stainless-app[bot] Aug 1, 2025
c0918fa
feat(api): api update
stainless-app[bot] Aug 1, 2025
220e7b4
codegen metadata
stainless-app[bot] Aug 1, 2025
c3712db
feat(api): api update
stainless-app[bot] Aug 1, 2025
a69833c
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 1, 2025
a2e1eaf
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 1, 2025
cdccdfc
chore(api): upload stainless config from cloudflare-config
stainless-app[bot] Aug 4, 2025
a730729
feat(api): api update
stainless-app[bot] Aug 4, 2025
a88ccfd
codegen metadata
stainless-app[bot] Aug 4, 2025
33db8fc
codegen metadata
stainless-app[bot] Aug 4, 2025
90bae55
codegen metadata
stainless-app[bot] Aug 4, 2025
078a9f4
codegen metadata
stainless-app[bot] Aug 4, 2025
837c738
feat(api): api update
stainless-app[bot] Aug 4, 2025
5e4d5ac
codegen metadata
stainless-app[bot] Aug 4, 2025
9a64567
codegen metadata
stainless-app[bot] Aug 4, 2025
641814a
feat(api): api update
stainless-app[bot] Aug 4, 2025
0f83643
codegen metadata
stainless-app[bot] Aug 4, 2025
5563484
codegen metadata
stainless-app[bot] Aug 4, 2025
2141e37
codegen metadata
stainless-app[bot] Aug 5, 2025
44658d1
codegen metadata
stainless-app[bot] Aug 5, 2025
5fc9a0c
codegen metadata
stainless-app[bot] Aug 5, 2025
7ac617f
codegen metadata
stainless-app[bot] Aug 5, 2025
ffe467a
codegen metadata
stainless-app[bot] Aug 5, 2025
0cc257b
release: 5.1.0
stainless-app[bot] Aug 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.0.0"
".": "5.1.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 1783
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-e408a7cdec2dae3d1a18842dcc59280c56050fb042569139aec3fe0f12e0d461.yml
openapi_spec_hash: 7e210c76f5dd4c79b3e67204ad279b81
config_hash: 43130be32c5ad35813f78ea0d90fb11d
configured_endpoints: 1781
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8368d3a1fa6864067fed6a41705979b2b55f6f2c9750fbe2e97d7d2cfcc75bb7.yml
openapi_spec_hash: d373e48170339983debabbd4136483a5
config_hash: 11218d4e895d6852fa70acc77ad5da3d
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 5.1.0 (2025-08-05)

Full Changelog: [v5.0.0...v5.1.0](https://github.com/cloudflare/cloudflare-go/compare/v5.0.0...v5.1.0)

### Features

* **api:** api update ([641814a](https://github.com/cloudflare/cloudflare-go/commit/641814adef5c6802d907b9d620c21b8ee8d94387))
* **api:** api update ([837c738](https://github.com/cloudflare/cloudflare-go/commit/837c7383b20a5be532adacc721604bf11e63e9dd))
* **api:** api update ([a730729](https://github.com/cloudflare/cloudflare-go/commit/a7307298fe07106c7960dc640d578b6f5eb40294))
* **api:** api update ([c3712db](https://github.com/cloudflare/cloudflare-go/commit/c3712dbc6cf44a8221e14783f547079690c838ef))
* **api:** api update ([c0918fa](https://github.com/cloudflare/cloudflare-go/commit/c0918fa268ba44a7c55bb355b1afa5438da537b9))


### Chores

* **api:** upload stainless config from cloudflare-config ([cdccdfc](https://github.com/cloudflare/cloudflare-go/commit/cdccdfc215a54499866f7578266293ab62f3f7d6))
* **api:** upload stainless config from cloudflare-config ([a2e1eaf](https://github.com/cloudflare/cloudflare-go/commit/a2e1eaf61a9b7b44da848f2e8e7402a6e3745567))
* **api:** upload stainless config from cloudflare-config ([a69833c](https://github.com/cloudflare/cloudflare-go/commit/a69833cf63af8923971cc9ae9264e0e2218d00c7))

## 5.0.0 (2025-07-31)

Full Changelog: [v4.6.0...v5.0.0](https://github.com/cloudflare/cloudflare-go/compare/v4.6.0...v5.0.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Or to pin the version:
<!-- x-release-please-start-version -->

```sh
go get -u 'github.com/cloudflare/cloudflare-go/v4@v5.0.0'
go get -u 'github.com/cloudflare/cloudflare-go/v4@v5.1.0'
```

<!-- x-release-please-end -->
Expand Down
47 changes: 45 additions & 2 deletions ai/ai.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ func (r *AIService) Run(ctx context.Context, modelName string, params AIRunParam
// [AIRunResponseAutomaticSpeechRecognition], [AIRunResponseImageClassification],
// [AIRunResponseObjectDetection], [AIRunResponseObject],
// [AIRunResponseTranslation], [AIRunResponseSummarization],
// [AIRunResponseImageToText] or [AIRunResponseImageTextToText].
// [AIRunResponseImageToText], [AIRunResponseImageTextToText] or
// [AIRunResponseMultimodalEmbeddings].
type AIRunResponseUnion interface {
ImplementsAIRunResponseUnion()
}
Expand Down Expand Up @@ -137,6 +138,10 @@ func init() {
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AIRunResponseImageTextToText{}),
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AIRunResponseMultimodalEmbeddings{}),
},
)
}

Expand Down Expand Up @@ -549,6 +554,31 @@ func (r aiRunResponseImageTextToTextJSON) RawJSON() string {

func (r AIRunResponseImageTextToText) ImplementsAIRunResponseUnion() {}

type AIRunResponseMultimodalEmbeddings struct {
Data [][]float64 `json:"data"`
Shape []float64 `json:"shape"`
JSON aiRunResponseMultimodalEmbeddingsJSON `json:"-"`
}

// aiRunResponseMultimodalEmbeddingsJSON contains the JSON metadata for the struct
// [AIRunResponseMultimodalEmbeddings]
type aiRunResponseMultimodalEmbeddingsJSON struct {
Data apijson.Field
Shape apijson.Field
raw string
ExtraFields map[string]apijson.Field
}

func (r *AIRunResponseMultimodalEmbeddings) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}

func (r aiRunResponseMultimodalEmbeddingsJSON) RawJSON() string {
return r.raw
}

func (r AIRunResponseMultimodalEmbeddings) ImplementsAIRunResponseUnion() {}

type AIRunParams struct {
AccountID param.Field[string] `path:"account_id,required"`
Body AIRunParamsBodyUnion `json:"body"`
Expand Down Expand Up @@ -641,7 +671,8 @@ func (r AIRunParamsBody) implementsAIRunParamsBodyUnion() {}
// [ai.AIRunParamsBodyPrompt], [ai.AIRunParamsBodyTextGeneration],
// [ai.AIRunParamsBodyTranslation], [ai.AIRunParamsBodySummarization],
// [ai.AIRunParamsBodyImageToText], [ai.AIRunParamsBodyObject],
// [ai.AIRunParamsBodyImageTextToText], [AIRunParamsBody].
// [ai.AIRunParamsBodyImageTextToText], [ai.AIRunParamsBodyMultimodalEmbeddings],
// [AIRunParamsBody].
type AIRunParamsBodyUnion interface {
implementsAIRunParamsBodyUnion()
}
Expand Down Expand Up @@ -1190,6 +1221,18 @@ func (r AIRunParamsBodyImageTextToTextMessage) MarshalJSON() (data []byte, err e
return apijson.MarshalRoot(r)
}

type AIRunParamsBodyMultimodalEmbeddings struct {
// Image in base64 encoded format.
Image param.Field[string] `json:"image"`
Text param.Field[[]string] `json:"text"`
}

func (r AIRunParamsBodyMultimodalEmbeddings) MarshalJSON() (data []byte, err error) {
return apijson.MarshalRoot(r)
}

func (r AIRunParamsBodyMultimodalEmbeddings) implementsAIRunParamsBodyUnion() {}

type AIRunResponseEnvelope struct {
// An array of classification results for the input text
Result AIRunResponseUnion `json:"result" format:"binary"`
Expand Down
Loading
Loading