Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.460.3 (#24)
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 Dec 31, 2024
1 parent bb89520 commit 65cb4e3
Show file tree
Hide file tree
Showing 39 changed files with 391 additions and 198 deletions.
53 changes: 33 additions & 20 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
lockVersion: 2.0.0
id: 8bd6d3b6-cae6-4e55-b72f-6fdc1dbce9a1
management:
docChecksum: a690daf53c97c95bb6c912a2c59f804d
docChecksum: 5162ce13f49e729b6efa20dd5cdf32be
docVersion: 0.0.0
speakeasyVersion: 1.454.0
generationVersion: 2.477.0
releaseVersion: 0.6.0
configChecksum: 46257babca85eed2675780b7015dc1c1
speakeasyVersion: 1.460.3
generationVersion: 2.484.0
releaseVersion: 0.6.1
configChecksum: 3f7609e2eb7caeb1f44841b4805ed0c4
repoURL: https://github.com/livepeer/livepeer-ai-js.git
installationURL: https://github.com/livepeer/livepeer-ai-js
published: true
features:
typescript:
additionalDependencies: 0.1.0
constsAndDefaults: 0.1.11
core: 3.18.9
core: 3.18.12
defaultEnabledRetries: 0.1.0
envVarSecurityUsage: 0.1.2
globalSecurity: 2.82.11
globalSecurity: 2.82.12
globalSecurityCallbacks: 0.1.0
globalSecurityFlattening: 0.1.0
globalServerURLs: 2.82.4
Expand All @@ -44,7 +44,6 @@ generatedFiles:
- docs/models/components/bodygenimagetotextimage.md
- docs/models/components/bodygenimagetovideo.md
- docs/models/components/bodygenimagetovideoimage.md
- docs/models/components/bodygenllm.md
- docs/models/components/bodygensegmentanything2.md
- docs/models/components/bodygensegmentanything2image.md
- docs/models/components/bodygenupscale.md
Expand All @@ -55,6 +54,8 @@ generatedFiles:
- docs/models/components/imagetotextresponse.md
- docs/models/components/livevideotovideoparams.md
- docs/models/components/livevideotovideoresponse.md
- docs/models/components/llmmessage.md
- docs/models/components/llmrequest.md
- docs/models/components/llmresponse.md
- docs/models/components/loc.md
- docs/models/components/masksresponse.md
Expand Down Expand Up @@ -119,7 +120,6 @@ generatedFiles:
- src/models/components/bodygenimagetoimage.ts
- src/models/components/bodygenimagetotext.ts
- src/models/components/bodygenimagetovideo.ts
- src/models/components/bodygenllm.ts
- src/models/components/bodygensegmentanything2.ts
- src/models/components/bodygenupscale.ts
- src/models/components/chunk.ts
Expand All @@ -128,6 +128,8 @@ generatedFiles:
- src/models/components/index.ts
- src/models/components/livevideotovideoparams.ts
- src/models/components/livevideotovideoresponse.ts
- src/models/components/llmmessage.ts
- src/models/components/llmrequest.ts
- src/models/components/llmresponse.ts
- src/models/components/masksresponse.ts
- src/models/components/media.ts
Expand Down Expand Up @@ -177,7 +179,8 @@ examples:
application/json: {"images": []}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genImageToImage:
speakeasy-default-gen-image-to-image:
requestBody:
Expand All @@ -187,7 +190,8 @@ examples:
application/json: {"images": []}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genImageToVideo:
speakeasy-default-gen-image-to-video:
requestBody:
Expand All @@ -197,7 +201,8 @@ examples:
application/json: {"images": []}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genUpscale:
speakeasy-default-gen-upscale:
requestBody:
Expand All @@ -207,7 +212,8 @@ examples:
application/json: {"images": []}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genAudioToText:
speakeasy-default-gen-audio-to-text:
requestBody:
Expand All @@ -217,7 +223,8 @@ examples:
application/json: {"text": "<value>", "chunks": []}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genSegmentAnything2:
speakeasy-default-gen-segment-anything2:
requestBody:
Expand All @@ -227,17 +234,20 @@ examples:
application/json: {"masks": "<value>", "scores": "<value>", "logits": "<value>"}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genLLM:
speakeasy-default-gen-LLM:
requestBody:
application/x-www-form-urlencoded: {"prompt": "<value>"}
application/json: {"messages": []}
responses:
"200":
application/json: {"response": "<value>", "tokens_used": 60712}
application/json: {"response": "<value>", "tokens_used": 60712, "id": "<id>", "model": "Expedition", "created": 755586}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genImageToText:
speakeasy-default-gen-image-to-text:
requestBody:
Expand All @@ -247,7 +257,8 @@ examples:
application/json: {"text": "<value>"}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genLiveVideoToVideo:
speakeasy-default-gen-live-video-to-video:
requestBody:
Expand All @@ -257,13 +268,15 @@ examples:
application/json: {"subscribe_url": "https://vain-kiss.name", "publish_url": "https://frail-duffel.com"}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
genTextToSpeech:
speakeasy-default-gen-text-to-speech:
responses:
"200":
application/json: {"audio": {"url": "https://accurate-parsnip.net/"}}
"400":
application/json: {"detail": {"msg": "<value>"}}
"422": {}
"422":
application/json: {}
generatedTests: {}
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ generation:
oAuth2ClientCredentialsEnabled: false
oAuth2PasswordEnabled: false
typescript:
version: 0.6.0
version: 0.6.1
additionalDependencies:
dependencies:
jest: ^29.7.0
Expand Down
14 changes: 7 additions & 7 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
speakeasyVersion: 1.454.0
speakeasyVersion: 1.460.3
sources:
livepeer-ai-OAS:
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:26819ab7f27b32612a3068222ed66a3115c07d562aa7afa6ca5b9ce28c3baec9
sourceBlobDigest: sha256:96965175cd37993dd71c66039301a689b5a65b4068d704a3f31b91666c0df03b
sourceRevisionDigest: sha256:55ae25143686ab2932be31cf92c1554a5a79646c739274d4600b449cc5206cce
sourceBlobDigest: sha256:3d8f629c40a46ffe8c1284434daf4e7dded2357d015c6f89f0e8ed8179c96d28
tags:
- latest
- speakeasy-sdk-regen-1732060880
- speakeasy-sdk-regen-1735257676
- 0.0.0
targets:
livepeer-ai-ts:
source: livepeer-ai-OAS
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:26819ab7f27b32612a3068222ed66a3115c07d562aa7afa6ca5b9ce28c3baec9
sourceBlobDigest: sha256:96965175cd37993dd71c66039301a689b5a65b4068d704a3f31b91666c0df03b
sourceRevisionDigest: sha256:55ae25143686ab2932be31cf92c1554a5a79646c739274d4600b449cc5206cce
sourceBlobDigest: sha256:3d8f629c40a46ffe8c1284434daf4e7dded2357d015c6f89f0e8ed8179c96d28
codeSamplesNamespace: code-samples-typescript-livepeer-ts
codeSamplesRevisionDigest: sha256:022be69bfb60ba8471e0c9c73eb59a38827f90384ba8493989e5ef3a11a6c3f4
codeSamplesRevisionDigest: sha256:c06ade29f551f339be714da92fb09857889be9d6ce3b742795d2d79aad1e924b
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,26 +235,16 @@ run();
<!-- Start Error Handling [errors] -->
## Error Handling

All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.

If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:

| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |

In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `textToImage` method may throw the following errors:
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `textToImage` method may throw the following errors:

| Error Type | Status Code | Content Type |
| -------------------------- | ------------- | ---------------- |
| errors.HTTPError | 400, 401, 500 | application/json |
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4XX, 5XX | \*/\* |

If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.

```typescript
import { Livepeer } from "@livepeer/ai";
import {
Expand All @@ -278,8 +268,9 @@ async function run() {
console.log(result);
} catch (err) {
switch (true) {
// The server response does not match the expected SDK schema
case (err instanceof SDKValidationError): {
// Validation errors can be pretty-printed
// Pretty-print will provide a human-readable multi-line error message
console.error(err.pretty());
// Raw value may also be inspected
console.error(err.rawValue);
Expand All @@ -296,6 +287,7 @@ async function run() {
return;
}
default: {
// Other errors such as network errors, see HTTPClientErrors for more details
throw err;
}
}
Expand All @@ -306,7 +298,17 @@ run();

```

Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.

In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:

| HTTP Client Error | Description |
| ---------------------------------------------------- | ---------------------------------------------------- |
| RequestAbortedError | HTTP request was aborted by the client |
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
| ConnectionError | HTTP client was unable to make a request to a server |
| InvalidRequestError | Any input used to create a request is invalid |
| UnexpectedClientError | Unrecognised or unexpected error |
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,14 @@ Based on:
### Generated
- [typescript v0.6.0] .
### Releases
- [NPM v0.6.0] https://www.npmjs.com/package/@livepeer/ai/v/0.6.0 - .
- [NPM v0.6.0] https://www.npmjs.com/package/@livepeer/ai/v/0.6.0 - .

## 2024-12-31 00:01:18
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.460.3 (2.484.0) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.6.1] .
### Releases
- [NPM v0.6.1] https://www.npmjs.com/package/@livepeer/ai/v/0.6.1 - .
28 changes: 27 additions & 1 deletion RUNTIMES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Supported JavaScript runtimes

This SDK is intended to be used in JavaScript runtimes that support the following features:
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:

* [Web Fetch API][web-fetch]
* [Web Streams API][web-streams] and in particular `ReadableStream`
Expand All @@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])

[deno-file-streaming]: https://github.com/denoland/deno/issues/11018

## Recommended TypeScript compiler options

The following `tsconfig.json` options are recommended for projects using this
SDK in order to get static type support for features like async iterables,
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
so on):

[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response

```jsonc
{
"compilerOptions": {
"target": "es2020", // or higher
"lib": ["es2020", "dom", "dom.iterable"],
}
}
```

While `target` can be set to older ECMAScript versions, it may result in extra,
unnecessary compatibility code being generated if you are not targeting old
runtimes.
7 changes: 6 additions & 1 deletion codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ actions:
async function run() {
const result = await livepeer.generate.llm({
prompt: "<value>",
messages: [
{
role: "<value>",
content: "<value>",
},
],
});
// Handle the result
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/audioresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AudioResponse } from "@livepeer/ai/models/components";

let value: AudioResponse = {
audio: {
url: "https://quarrelsome-disappointment.info/",
url: "https://lighthearted-developing.com/",
},
};
```
Expand Down
23 changes: 0 additions & 23 deletions docs/models/components/bodygenllm.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/models/components/livevideotovideoparams.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import { LiveVideoToVideoParams } from "@livepeer/ai/models/components";

let value: LiveVideoToVideoParams = {
subscribeUrl: "https://gigantic-freezing.name/",
publishUrl: "https://writhing-brochure.biz/",
subscribeUrl: "https://oily-hundred.org/",
publishUrl: "https://dual-cod.name/",
};
```

Expand Down
4 changes: 2 additions & 2 deletions docs/models/components/livevideotovideoresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Response model for live video-to-video generation.
import { LiveVideoToVideoResponse } from "@livepeer/ai/models/components";

let value: LiveVideoToVideoResponse = {
subscribeUrl: "https://hateful-humor.net",
publishUrl: "https://rare-pillbox.biz/",
subscribeUrl: "https://ruddy-bandwidth.net/",
publishUrl: "https://dutiful-cellar.biz",
};
```

Expand Down
Loading

0 comments on commit 65cb4e3

Please sign in to comment.