diff --git a/.devcontainer/README.md b/.devcontainer/README.md
deleted file mode 100644
index e3ac920..0000000
--- a/.devcontainer/README.md
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-> **Remember to shutdown a GitHub Codespace when it is not in use!**
-
-# Dev Containers Quick Start
-
-The default location for usage snippets is the `samples` directory.
-
-## Running a Usage Sample
-
-A sample usage example has been provided in a `root.go` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below.
-
-```
-go run root.go
-```
-
-## Generating Additional Usage Samples
-
-The speakeasy CLI allows you to generate more usage snippets. Here's how:
-
-- To generate a sample for a specific operation by providing an operation ID, use:
-
-```
-speakeasy generate usage -s https://raw.githubusercontent.com/livepeer/ai-worker/main/runner/gateway.openapi.yaml -l go -i {INPUT_OPERATION_ID} -o ./samples
-```
-
-- To generate samples for an entire namespace (like a tag or group name), use:
-
-```
-speakeasy generate usage -s https://raw.githubusercontent.com/livepeer/ai-worker/main/runner/gateway.openapi.yaml -l go -n {INPUT_TAG_NAME} -o ./samples
-```
diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
deleted file mode 100644
index 2afb19f..0000000
--- a/.devcontainer/devcontainer.json
+++ /dev/null
@@ -1,59 +0,0 @@
-// For format details, see https://aka.ms/devcontainer.json. For config options, see the
-// README at: https://github.com/devcontainers/templates/tree/main/src/go
-{
- "name": "Go",
- "image": "mcr.microsoft.com/devcontainers/go:1-1.20-bullseye",
- // Features to add to the dev container. More info: https://containers.dev/features.
- // "features": {},
- // Use 'forwardPorts' to make a list of ports inside the container available locally.
- // "forwardPorts": [],
- // Use 'postCreateCommand' to run commands after the container is created.
- "postCreateCommand": "sudo chmod +x ./.devcontainer/setup.sh && ./.devcontainer/setup.sh",
- "customizations": {
- "vscode": {
- "extensions": [
- "golang.go",
- "github.vscode-pull-request-github" // Github interaction
- ],
- "settings": {
- "files.eol": "\n",
- "editor.formatOnSave": true,
- "go.buildTags": "",
- "go.toolsEnvVars": {
- "CGO_ENABLED": "0"
- },
- "go.useLanguageServer": true,
- "go.testEnvVars": {
- "CGO_ENABLED": "1"
- },
- "go.testFlags": [
- "-v",
- "-race"
- ],
- "go.testTimeout": "60s",
- "go.coverOnSingleTest": true,
- "go.coverOnSingleTestFile": true,
- "go.coverOnTestPackage": true,
- "go.lintTool": "golangci-lint",
- "go.lintOnSave": "package",
- "[go]": {
- "editor.codeActionsOnSave": {
- "source.organizeImports": true
- }
- },
- "gopls": {
- "usePlaceholders": false,
- "staticcheck": true,
- "vulncheck": "Imports"
- }
- }
- },
- "codespaces": {
- "openFiles": [
- ".devcontainer/README.md"
- ]
- }
- }
- // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
- // "remoteUser": "root"
-}
\ No newline at end of file
diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh
deleted file mode 100644
index 82b9c67..0000000
--- a/.devcontainer/setup.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# Install the speakeasy CLI
-curl -fsSL https://raw.githubusercontent.com/speakeasy-api/speakeasy/main/install.sh | sh
-
-# Setup samples directory
-rmdir samples || true
-mkdir samples
-
-# Go module commands
-go mod download
-go mod tidy
-
-# Generate starter usage sample with speakeasy
-speakeasy generate usage -s https://raw.githubusercontent.com/livepeer/ai-worker/main/runner/gateway.openapi.yaml -l go -o samples/root.go
\ No newline at end of file
diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 4e9b3b9..25ab66a 100644
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -3,10 +3,10 @@ id: 98621ff3-f200-4a5c-9c69-bc1fe845e39c
management:
docChecksum: 5649b2692e9b9f3c1065851a47fbba06
docVersion: v0.5.0
- speakeasyVersion: 1.396.9
- generationVersion: 2.415.7
- releaseVersion: 0.3.0
- configChecksum: ed5d7d075ec9eccb6474a8affc01b5fa
+ speakeasyVersion: 1.398.1
+ generationVersion: 2.415.8
+ releaseVersion: 0.4.0
+ configChecksum: ac3dd6cddc96b972e6ca8108e686e6a7
repoURL: https://github.com/livepeer/livepeer-ai-go.git
installationURL: https://github.com/livepeer/livepeer-ai-go
features:
@@ -15,7 +15,6 @@ features:
constsAndDefaults: 0.1.6
core: 3.5.8
defaultEnabledRetries: 0.2.0
- devContainers: 2.90.0
envVarSecurityUsage: 0.3.1
globalSecurity: 2.82.10
globalSecurityCallbacks: 0.1.0
@@ -29,9 +28,6 @@ features:
unions: 2.85.9
uploadStreams: 0.1.0
generatedFiles:
- - .devcontainer/README.md
- - .devcontainer/devcontainer.json
- - .devcontainer/setup.sh
- .gitattributes
- /models/components/apierror.go
- /models/components/bodygenaudiototext.go
@@ -102,7 +98,7 @@ generatedFiles:
- internal/utils/retries.go
- internal/utils/security.go
- internal/utils/utils.go
- - livepeerai.go
+ - livepeer.go
- models/operations/options.go
- models/sdkerrors/sdkerror.go
- retry/config.go
diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml
index e4b768b..58d3464 100644
--- a/.speakeasy/gen.yaml
+++ b/.speakeasy/gen.yaml
@@ -12,7 +12,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: true
go:
- version: 0.3.0
+ version: 0.4.0
additionalDependencies: {}
allowUnknownFieldsInWeakUnions: false
clientServerStatusCodesAsErrors: true
diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock
index b72e28c..fa39d3b 100644
--- a/.speakeasy/workflow.lock
+++ b/.speakeasy/workflow.lock
@@ -1,11 +1,12 @@
-speakeasyVersion: 1.398.0
+speakeasyVersion: 1.398.1
sources:
livepeerai-OAS:
sourceNamespace: livepeerai-oas
- sourceRevisionDigest: sha256:43cf0ae12df6c7eaefaf51d7dc7aa9264f153a8b7ecd28563cf938eb4d382170
- sourceBlobDigest: sha256:726bd47684eeb00a5a351e77d612da793deb9a236281df00a64c7109b741938c
+ sourceRevisionDigest: sha256:3076fe48ebeac5e7f4ac1bc2dbb39f3c7c3cf93d02570881dc3e26c17644e7ad
+ sourceBlobDigest: sha256:84962d1cdd2b3ec311a1e3de4848a560478cefda5b3038810a518281c8032152
tags:
- latest
+ - main
targets:
livepeerai:
source: livepeerai-OAS
@@ -15,10 +16,10 @@ targets:
livepeerai-go:
source: livepeerai-OAS
sourceNamespace: livepeerai-oas
- sourceRevisionDigest: sha256:43cf0ae12df6c7eaefaf51d7dc7aa9264f153a8b7ecd28563cf938eb4d382170
- sourceBlobDigest: sha256:726bd47684eeb00a5a351e77d612da793deb9a236281df00a64c7109b741938c
+ sourceRevisionDigest: sha256:3076fe48ebeac5e7f4ac1bc2dbb39f3c7c3cf93d02570881dc3e26c17644e7ad
+ sourceBlobDigest: sha256:84962d1cdd2b3ec311a1e3de4848a560478cefda5b3038810a518281c8032152
codeSamplesNamespace: code-samples-go-livepeerai-go
- codeSamplesRevisionDigest: sha256:abcc2b2c1f048b36ce12039304e5658920491c5fd95f9e00f6478be5431bf465
+ codeSamplesRevisionDigest: sha256:ef940f3b3a922a45b296cb368853fb259387b9bf81f54288c29439655f30d3a5
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
diff --git a/RELEASES.md b/RELEASES.md
index 765b090..c33200f 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -48,4 +48,14 @@ Based on:
### Generated
- [go v0.3.0] .
### Releases
-- [Go v0.3.0] https://github.com/livepeer/livepeer-ai-go/releases/tag/v0.3.0 - .
\ No newline at end of file
+- [Go v0.3.0] https://github.com/livepeer/livepeer-ai-go/releases/tag/v0.3.0 - .
+
+## 2024-09-17 17:25:56
+### Changes
+Based on:
+- OpenAPI Doc
+- Speakeasy CLI 1.398.1 (2.415.8) https://github.com/speakeasy-api/speakeasy
+### Generated
+- [go v0.4.0] .
+### Releases
+- [Go v0.4.0] https://github.com/livepeer/livepeer-ai-go/releases/tag/v0.4.0 - .
\ No newline at end of file
diff --git a/livepeerai.go b/livepeer.go
similarity index 89%
rename from livepeerai.go
rename to livepeer.go
index d660414..90148b4 100644
--- a/livepeerai.go
+++ b/livepeer.go
@@ -70,25 +70,25 @@ func (c *sdkConfiguration) GetServerDetails() (string, map[string]string) {
return ServerList[c.ServerIndex], nil
}
-// LivepeerAI - Livepeer AI Runner: An application to run AI pipelines
-type LivepeerAI struct {
+// Livepeer AI Runner: An application to run AI pipelines
+type Livepeer struct {
Generate *Generate
sdkConfiguration sdkConfiguration
}
-type SDKOption func(*LivepeerAI)
+type SDKOption func(*Livepeer)
// WithServerURL allows the overriding of the default server URL
func WithServerURL(serverURL string) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
sdk.sdkConfiguration.ServerURL = serverURL
}
}
// WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters
func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
if params != nil {
serverURL = utils.ReplaceParameters(serverURL, params)
}
@@ -99,7 +99,7 @@ func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOptio
// WithServerIndex allows the overriding of the default server by index
func WithServerIndex(serverIndex int) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
if serverIndex < 0 || serverIndex >= len(ServerList) {
panic(fmt.Errorf("server index %d out of range", serverIndex))
}
@@ -110,14 +110,14 @@ func WithServerIndex(serverIndex int) SDKOption {
// WithClient allows the overriding of the default HTTP client used by the SDK
func WithClient(client HTTPClient) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
sdk.sdkConfiguration.Client = client
}
}
// WithSecurity configures the SDK to use the provided security details
func WithSecurity(httpBearer string) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
security := components.Security{HTTPBearer: httpBearer}
sdk.sdkConfiguration.Security = utils.AsSecuritySource(&security)
}
@@ -125,7 +125,7 @@ func WithSecurity(httpBearer string) SDKOption {
// WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
sdk.sdkConfiguration.Security = func(ctx context.Context) (interface{}, error) {
return security(ctx)
}
@@ -133,27 +133,27 @@ func WithSecuritySource(security func(context.Context) (components.Security, err
}
func WithRetryConfig(retryConfig retry.Config) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
sdk.sdkConfiguration.RetryConfig = &retryConfig
}
}
// WithTimeout Optional request timeout applied to each operation
func WithTimeout(timeout time.Duration) SDKOption {
- return func(sdk *LivepeerAI) {
+ return func(sdk *Livepeer) {
sdk.sdkConfiguration.Timeout = &timeout
}
}
// New creates a new instance of the SDK with the provided options
-func New(opts ...SDKOption) *LivepeerAI {
- sdk := &LivepeerAI{
+func New(opts ...SDKOption) *Livepeer {
+ sdk := &Livepeer{
sdkConfiguration: sdkConfiguration{
Language: "go",
OpenAPIDocVersion: "v0.5.0",
- SDKVersion: "0.3.0",
- GenVersion: "2.415.7",
- UserAgent: "speakeasy-sdk/go 0.3.0 2.415.7 v0.5.0 github.com/livepeer/livepeer-ai-go",
+ SDKVersion: "0.4.0",
+ GenVersion: "2.415.8",
+ UserAgent: "speakeasy-sdk/go 0.4.0 2.415.8 v0.5.0 github.com/livepeer/livepeer-ai-go",
Hooks: hooks.New(),
},
}