Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.377.0 (#2)
Browse files Browse the repository at this point in the history
Co-authored-by: speakeasybot <[email protected]>
  • Loading branch information
github-actions[bot] and speakeasybot authored Aug 21, 2024
1 parent 357a7fe commit 85b7450
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

<div align="center">
<a href="https://codespaces.new/livepeer/livepeer-ai-go.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
</div>
<br>

> **Remember to shutdown a GitHub Codespace when it is not in use!**
# Dev Containers Quick Start
Expand Down
6 changes: 4 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ management:
docVersion: v0.1.2
speakeasyVersion: 1.377.0
generationVersion: 2.404.0
releaseVersion: 0.1.2
configChecksum: 9eb1d780a24ea18d23a76ec422c1cb4d
releaseVersion: 0.1.3
configChecksum: 09d6c9523e1dbc1e50c2961a86c18727
repoURL: https://github.com/livepeer/livepeer-ai-go.git
installationURL: https://github.com/livepeer/livepeer-ai-go
features:
go:
additionalDependencies: 0.1.0
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
go:
version: 0.1.2
version: 0.1.3
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
Expand Down
19 changes: 13 additions & 6 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ speakeasyVersion: 1.377.0
sources:
livepeerai-OAS:
sourceNamespace: livepeerai-oas
sourceRevisionDigest: sha256:d5d5448674c5945b56ea82b32a01c9bb5bfa977ce0db559f609135346f028189
sourceBlobDigest: sha256:48b0747b8e9a3740e70354e85817a677ea764896e39a5c31ec3060fd570e555f
sourceRevisionDigest: sha256:f646e5d47ef02204d486dc5bf6ea48a875ebb2a6558557bb2026af2a9af4a812
sourceBlobDigest: sha256:88b77186fc98fe193435d3069ab2e85fe4d404e802e4e23761979e984649ff70
tags:
- latest
- main
targets:
livepeerai:
source: livepeerai-OAS
Expand All @@ -16,9 +17,11 @@ targets:
livepeerai-go:
source: livepeerai-OAS
sourceNamespace: livepeerai-oas
sourceRevisionDigest: sha256:d5d5448674c5945b56ea82b32a01c9bb5bfa977ce0db559f609135346f028189
sourceBlobDigest: sha256:48b0747b8e9a3740e70354e85817a677ea764896e39a5c31ec3060fd570e555f
outLocation: /home/ricks/development/livepeer/ai/livepeer-ai-go
sourceRevisionDigest: sha256:f646e5d47ef02204d486dc5bf6ea48a875ebb2a6558557bb2026af2a9af4a812
sourceBlobDigest: sha256:88b77186fc98fe193435d3069ab2e85fe4d404e802e4e23761979e984649ff70
codeSamplesNamespace: code-samples-go-livepeerai-go
codeSamplesRevisionDigest: sha256:7034b6c4a6581852d0bd476d318445c3814803f206a136786e24e2c260890052
outLocation: /github/workspace/repo
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand All @@ -29,6 +32,10 @@ workflow:
registry:
location: registry.speakeasyapi.dev/livepeer-8mq/livepeer-ai/livepeerai-oas
targets:
livepeerai:
livepeerai-go:
target: go
source: livepeerai-OAS
codeSamples:
output: codeSamples.yaml
registry:
location: registry.speakeasyapi.dev/livepeer-8mq/livepeer-ai/code-samples-go-livepeerai-go
41 changes: 14 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ Welcome to the [Livepeer AI](https://livepeer.ai/) Golang client Library! This l
<!-- No SDK Example Usage -->
<!-- No SDK Available Operations -->
<!-- Start Retries [retries] -->

## Retries

Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.

To change the default retry strategy for a single API call, simply provide a `retry.Config` object to the call by using the `WithRetries` option:

```go
package main

Expand Down Expand Up @@ -55,7 +53,6 @@ func main() {
```

If you'd like to override the default retry strategy for all operations that support retries, you can use the `WithRetryConfig` option at SDK initialization:

```go
package main

Expand Down Expand Up @@ -96,20 +93,18 @@ func main() {
}

```

<!-- End Retries [retries] -->

<!-- Start Error Handling [errors] -->

## Error Handling

Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.
Handling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both. When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.

| Error Object | Status Code | Content Type |
| ----------------------------- | ----------- | ---------------- |
| sdkerrors.HTTPError | 400,401,500 | application/json |
| sdkerrors.HTTPValidationError | 422 | application/json |
| sdkerrors.SDKError | 4xx-5xx | _/_ |
| Error Object | Status Code | Content Type |
| ----------------------------- | ----------------------------- | ----------------------------- |
| sdkerrors.HTTPError | 400,401,500 | application/json |
| sdkerrors.HTTPValidationError | 422 | application/json |
| sdkerrors.SDKError | 4xx-5xx | */* |

### Example

Expand Down Expand Up @@ -157,20 +152,18 @@ func main() {
}

```

<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->

## Server Selection

### Select Server by Index

You can override the default server globally using the `WithServerIndex` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:

| # | Server | Variables |
| --- | -------------------------------------- | --------- |
| 0 | `https://dream-gateway.livepeer.cloud` | None |
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://dream-gateway.livepeer.cloud` | None |

#### Example

Expand Down Expand Up @@ -204,10 +197,10 @@ func main() {

```


### Override Server URL Per-Client

The default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:

```go
package main

Expand Down Expand Up @@ -237,11 +230,9 @@ func main() {
}

```

<!-- End Server Selection [server] -->

<!-- Start Custom HTTP Client [http-client] -->

## Custom HTTP Client

The Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface:
Expand All @@ -268,23 +259,20 @@ var (
```

This can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration.

<!-- End Custom HTTP Client [http-client] -->

<!-- Start Authentication [security] -->

## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme |
| ------------ | ---- | ----------- |
| `HTTPBearer` | http | HTTP Bearer |
| Name | Type | Scheme |
| ------------ | ------------ | ------------ |
| `HTTPBearer` | http | HTTP Bearer |

You can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:

```go
package main

Expand Down Expand Up @@ -313,13 +301,12 @@ func main() {
}

```

<!-- End Authentication [security] -->

<!-- Start Special Types [types] -->

## Special Types


<!-- End Special Types [types] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->
Expand Down
11 changes: 11 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


## 2024-08-21 10:32:50
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.377.0 (2.404.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [go v0.1.3] .
### Releases
- [Go v0.1.3] https://github.com/livepeer/livepeer-ai-go/releases/tag/v0.1.3 - .
35 changes: 35 additions & 0 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
overlay: 1.0.0
info:
title: CodeSamples overlay for go target
version: 0.0.0
actions:
- target: $["paths"]["/audio-to-text"]["post"]
update:
"x-codeSamples":
- "lang": "go"
"label": "audio_to_text"
"source": "package main\n\nimport(\n\tlivepeeraigo \"github.com/livepeer/livepeer-ai-go\"\n\t\"github.com/livepeer/livepeer-ai-go/models/components\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := livepeeraigo.New(\n livepeeraigo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n )\n request := components.BodyAudioToTextAudioToTextPost{\n Audio: components.Audio{\n FileName: \"your_file_here\",\n Content: os.Open(\"<file_path>\"),\n },\n }\n ctx := context.Background()\n res, err := s.AudioToText(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res.TextResponse != nil {\n // handle response\n }\n}"
- target: $["paths"]["/text-to-image"]["post"]
update:
"x-codeSamples":
- "lang": "go"
"label": "text_to_image"
"source": "package main\n\nimport(\n\tlivepeeraigo \"github.com/livepeer/livepeer-ai-go\"\n\t\"github.com/livepeer/livepeer-ai-go/models/components\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := livepeeraigo.New(\n livepeeraigo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n )\n request := components.TextToImageParams{\n Prompt: \"<value>\",\n }\n ctx := context.Background()\n res, err := s.TextToImage(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res.ImageResponse != nil {\n // handle response\n }\n}"
- target: $["paths"]["/image-to-image"]["post"]
update:
"x-codeSamples":
- "lang": "go"
"label": "image_to_image"
"source": "package main\n\nimport(\n\tlivepeeraigo \"github.com/livepeer/livepeer-ai-go\"\n\t\"github.com/livepeer/livepeer-ai-go/models/components\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := livepeeraigo.New(\n livepeeraigo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n )\n request := components.BodyImageToImageImageToImagePost{\n Prompt: \"<value>\",\n Image: components.Image{\n FileName: \"your_file_here\",\n Content: os.Open(\"<file_path>\"),\n },\n }\n ctx := context.Background()\n res, err := s.ImageToImage(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res.ImageResponse != nil {\n // handle response\n }\n}"
- target: $["paths"]["/image-to-video"]["post"]
update:
"x-codeSamples":
- "lang": "go"
"label": "image_to_video"
"source": "package main\n\nimport(\n\tlivepeeraigo \"github.com/livepeer/livepeer-ai-go\"\n\t\"github.com/livepeer/livepeer-ai-go/models/components\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := livepeeraigo.New(\n livepeeraigo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n )\n request := components.BodyImageToVideoImageToVideoPost{\n Image: components.BodyImageToVideoImageToVideoPostImage{\n FileName: \"your_file_here\",\n Content: os.Open(\"<file_path>\"),\n },\n }\n ctx := context.Background()\n res, err := s.ImageToVideo(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res.VideoResponse != nil {\n // handle response\n }\n}"
- target: $["paths"]["/upscale"]["post"]
update:
"x-codeSamples":
- "lang": "go"
"label": "upscale"
"source": "package main\n\nimport(\n\tlivepeeraigo \"github.com/livepeer/livepeer-ai-go\"\n\t\"github.com/livepeer/livepeer-ai-go/models/components\"\n\t\"context\"\n\t\"log\"\n)\n\nfunc main() {\n s := livepeeraigo.New(\n livepeeraigo.WithSecurity(\"<YOUR_BEARER_TOKEN_HERE>\"),\n )\n request := components.BodyUpscaleUpscalePost{\n Prompt: \"<value>\",\n Image: components.BodyUpscaleUpscalePostImage{\n FileName: \"your_file_here\",\n Content: os.Open(\"<file_path>\"),\n },\n }\n ctx := context.Background()\n res, err := s.Upscale(ctx, request)\n if err != nil {\n log.Fatal(err)\n }\n if res.ImageResponse != nil {\n // handle response\n }\n}"
4 changes: 2 additions & 2 deletions livepeerai.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ func New(opts ...SDKOption) *LivepeerAI {
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "v0.1.2",
SDKVersion: "0.1.2",
SDKVersion: "0.1.3",
GenVersion: "2.404.0",
UserAgent: "speakeasy-sdk/go 0.1.2 2.404.0 v0.1.2 github.com/livepeer/livepeer-ai-go",
UserAgent: "speakeasy-sdk/go 0.1.3 2.404.0 v0.1.2 github.com/livepeer/livepeer-ai-go",
Hooks: hooks.New(),
},
}
Expand Down

0 comments on commit 85b7450

Please sign in to comment.