Skip to content

Commit 65cb4e3

Browse files
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.460.3 (#24)
Co-authored-by: speakeasybot <[email protected]>
1 parent bb89520 commit 65cb4e3

39 files changed

+391
-198
lines changed

.speakeasy/gen.lock

+33-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
lockVersion: 2.0.0
22
id: 8bd6d3b6-cae6-4e55-b72f-6fdc1dbce9a1
33
management:
4-
docChecksum: a690daf53c97c95bb6c912a2c59f804d
4+
docChecksum: 5162ce13f49e729b6efa20dd5cdf32be
55
docVersion: 0.0.0
6-
speakeasyVersion: 1.454.0
7-
generationVersion: 2.477.0
8-
releaseVersion: 0.6.0
9-
configChecksum: 46257babca85eed2675780b7015dc1c1
6+
speakeasyVersion: 1.460.3
7+
generationVersion: 2.484.0
8+
releaseVersion: 0.6.1
9+
configChecksum: 3f7609e2eb7caeb1f44841b4805ed0c4
1010
repoURL: https://github.com/livepeer/livepeer-ai-js.git
1111
installationURL: https://github.com/livepeer/livepeer-ai-js
1212
published: true
1313
features:
1414
typescript:
1515
additionalDependencies: 0.1.0
1616
constsAndDefaults: 0.1.11
17-
core: 3.18.9
17+
core: 3.18.12
1818
defaultEnabledRetries: 0.1.0
1919
envVarSecurityUsage: 0.1.2
20-
globalSecurity: 2.82.11
20+
globalSecurity: 2.82.12
2121
globalSecurityCallbacks: 0.1.0
2222
globalSecurityFlattening: 0.1.0
2323
globalServerURLs: 2.82.4
@@ -44,7 +44,6 @@ generatedFiles:
4444
- docs/models/components/bodygenimagetotextimage.md
4545
- docs/models/components/bodygenimagetovideo.md
4646
- docs/models/components/bodygenimagetovideoimage.md
47-
- docs/models/components/bodygenllm.md
4847
- docs/models/components/bodygensegmentanything2.md
4948
- docs/models/components/bodygensegmentanything2image.md
5049
- docs/models/components/bodygenupscale.md
@@ -55,6 +54,8 @@ generatedFiles:
5554
- docs/models/components/imagetotextresponse.md
5655
- docs/models/components/livevideotovideoparams.md
5756
- docs/models/components/livevideotovideoresponse.md
57+
- docs/models/components/llmmessage.md
58+
- docs/models/components/llmrequest.md
5859
- docs/models/components/llmresponse.md
5960
- docs/models/components/loc.md
6061
- docs/models/components/masksresponse.md
@@ -119,7 +120,6 @@ generatedFiles:
119120
- src/models/components/bodygenimagetoimage.ts
120121
- src/models/components/bodygenimagetotext.ts
121122
- src/models/components/bodygenimagetovideo.ts
122-
- src/models/components/bodygenllm.ts
123123
- src/models/components/bodygensegmentanything2.ts
124124
- src/models/components/bodygenupscale.ts
125125
- src/models/components/chunk.ts
@@ -128,6 +128,8 @@ generatedFiles:
128128
- src/models/components/index.ts
129129
- src/models/components/livevideotovideoparams.ts
130130
- src/models/components/livevideotovideoresponse.ts
131+
- src/models/components/llmmessage.ts
132+
- src/models/components/llmrequest.ts
131133
- src/models/components/llmresponse.ts
132134
- src/models/components/masksresponse.ts
133135
- src/models/components/media.ts
@@ -177,7 +179,8 @@ examples:
177179
application/json: {"images": []}
178180
"400":
179181
application/json: {"detail": {"msg": "<value>"}}
180-
"422": {}
182+
"422":
183+
application/json: {}
181184
genImageToImage:
182185
speakeasy-default-gen-image-to-image:
183186
requestBody:
@@ -187,7 +190,8 @@ examples:
187190
application/json: {"images": []}
188191
"400":
189192
application/json: {"detail": {"msg": "<value>"}}
190-
"422": {}
193+
"422":
194+
application/json: {}
191195
genImageToVideo:
192196
speakeasy-default-gen-image-to-video:
193197
requestBody:
@@ -197,7 +201,8 @@ examples:
197201
application/json: {"images": []}
198202
"400":
199203
application/json: {"detail": {"msg": "<value>"}}
200-
"422": {}
204+
"422":
205+
application/json: {}
201206
genUpscale:
202207
speakeasy-default-gen-upscale:
203208
requestBody:
@@ -207,7 +212,8 @@ examples:
207212
application/json: {"images": []}
208213
"400":
209214
application/json: {"detail": {"msg": "<value>"}}
210-
"422": {}
215+
"422":
216+
application/json: {}
211217
genAudioToText:
212218
speakeasy-default-gen-audio-to-text:
213219
requestBody:
@@ -217,7 +223,8 @@ examples:
217223
application/json: {"text": "<value>", "chunks": []}
218224
"400":
219225
application/json: {"detail": {"msg": "<value>"}}
220-
"422": {}
226+
"422":
227+
application/json: {}
221228
genSegmentAnything2:
222229
speakeasy-default-gen-segment-anything2:
223230
requestBody:
@@ -227,17 +234,20 @@ examples:
227234
application/json: {"masks": "<value>", "scores": "<value>", "logits": "<value>"}
228235
"400":
229236
application/json: {"detail": {"msg": "<value>"}}
230-
"422": {}
237+
"422":
238+
application/json: {}
231239
genLLM:
232240
speakeasy-default-gen-LLM:
233241
requestBody:
234242
application/x-www-form-urlencoded: {"prompt": "<value>"}
243+
application/json: {"messages": []}
235244
responses:
236245
"200":
237-
application/json: {"response": "<value>", "tokens_used": 60712}
246+
application/json: {"response": "<value>", "tokens_used": 60712, "id": "<id>", "model": "Expedition", "created": 755586}
238247
"400":
239248
application/json: {"detail": {"msg": "<value>"}}
240-
"422": {}
249+
"422":
250+
application/json: {}
241251
genImageToText:
242252
speakeasy-default-gen-image-to-text:
243253
requestBody:
@@ -247,7 +257,8 @@ examples:
247257
application/json: {"text": "<value>"}
248258
"400":
249259
application/json: {"detail": {"msg": "<value>"}}
250-
"422": {}
260+
"422":
261+
application/json: {}
251262
genLiveVideoToVideo:
252263
speakeasy-default-gen-live-video-to-video:
253264
requestBody:
@@ -257,13 +268,15 @@ examples:
257268
application/json: {"subscribe_url": "https://vain-kiss.name", "publish_url": "https://frail-duffel.com"}
258269
"400":
259270
application/json: {"detail": {"msg": "<value>"}}
260-
"422": {}
271+
"422":
272+
application/json: {}
261273
genTextToSpeech:
262274
speakeasy-default-gen-text-to-speech:
263275
responses:
264276
"200":
265277
application/json: {"audio": {"url": "https://accurate-parsnip.net/"}}
266278
"400":
267279
application/json: {"detail": {"msg": "<value>"}}
268-
"422": {}
280+
"422":
281+
application/json: {}
269282
generatedTests: {}

.speakeasy/gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ generation:
1212
oAuth2ClientCredentialsEnabled: false
1313
oAuth2PasswordEnabled: false
1414
typescript:
15-
version: 0.6.0
15+
version: 0.6.1
1616
additionalDependencies:
1717
dependencies:
1818
jest: ^29.7.0

.speakeasy/workflow.lock

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.454.0
1+
speakeasyVersion: 1.460.3
22
sources:
33
livepeer-ai-OAS:
44
sourceNamespace: livepeer-ai-oas
5-
sourceRevisionDigest: sha256:26819ab7f27b32612a3068222ed66a3115c07d562aa7afa6ca5b9ce28c3baec9
6-
sourceBlobDigest: sha256:96965175cd37993dd71c66039301a689b5a65b4068d704a3f31b91666c0df03b
5+
sourceRevisionDigest: sha256:55ae25143686ab2932be31cf92c1554a5a79646c739274d4600b449cc5206cce
6+
sourceBlobDigest: sha256:3d8f629c40a46ffe8c1284434daf4e7dded2357d015c6f89f0e8ed8179c96d28
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1732060880
9+
- speakeasy-sdk-regen-1735257676
1010
- 0.0.0
1111
targets:
1212
livepeer-ai-ts:
1313
source: livepeer-ai-OAS
1414
sourceNamespace: livepeer-ai-oas
15-
sourceRevisionDigest: sha256:26819ab7f27b32612a3068222ed66a3115c07d562aa7afa6ca5b9ce28c3baec9
16-
sourceBlobDigest: sha256:96965175cd37993dd71c66039301a689b5a65b4068d704a3f31b91666c0df03b
15+
sourceRevisionDigest: sha256:55ae25143686ab2932be31cf92c1554a5a79646c739274d4600b449cc5206cce
16+
sourceBlobDigest: sha256:3d8f629c40a46ffe8c1284434daf4e7dded2357d015c6f89f0e8ed8179c96d28
1717
codeSamplesNamespace: code-samples-typescript-livepeer-ts
18-
codeSamplesRevisionDigest: sha256:022be69bfb60ba8471e0c9c73eb59a38827f90384ba8493989e5ef3a11a6c3f4
18+
codeSamplesRevisionDigest: sha256:c06ade29f551f339be714da92fb09857889be9d6ce3b742795d2d79aad1e924b
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

README.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -235,26 +235,16 @@ run();
235235
<!-- Start Error Handling [errors] -->
236236
## Error Handling
237237

238-
All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.
239-
240-
If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:
241-
242-
| HTTP Client Error | Description |
243-
| ---------------------------------------------------- | ---------------------------------------------------- |
244-
| RequestAbortedError | HTTP request was aborted by the client |
245-
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
246-
| ConnectionError | HTTP client was unable to make a request to a server |
247-
| InvalidRequestError | Any input used to create a request is invalid |
248-
| UnexpectedClientError | Unrecognised or unexpected error |
249-
250-
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:
238+
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:
251239

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

246+
If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.
247+
258248
```typescript
259249
import { Livepeer } from "@livepeer/ai";
260250
import {
@@ -278,8 +268,9 @@ async function run() {
278268
console.log(result);
279269
} catch (err) {
280270
switch (true) {
271+
// The server response does not match the expected SDK schema
281272
case (err instanceof SDKValidationError): {
282-
// Validation errors can be pretty-printed
273+
// Pretty-print will provide a human-readable multi-line error message
283274
console.error(err.pretty());
284275
// Raw value may also be inspected
285276
console.error(err.rawValue);
@@ -296,6 +287,7 @@ async function run() {
296287
return;
297288
}
298289
default: {
290+
// Other errors such as network errors, see HTTPClientErrors for more details
299291
throw err;
300292
}
301293
}
@@ -306,7 +298,17 @@ run();
306298

307299
```
308300

309-
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.
301+
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.
302+
303+
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:
304+
305+
| HTTP Client Error | Description |
306+
| ---------------------------------------------------- | ---------------------------------------------------- |
307+
| RequestAbortedError | HTTP request was aborted by the client |
308+
| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
309+
| ConnectionError | HTTP client was unable to make a request to a server |
310+
| InvalidRequestError | Any input used to create a request is invalid |
311+
| UnexpectedClientError | Unrecognised or unexpected error |
310312
<!-- End Error Handling [errors] -->
311313

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

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,14 @@ Based on:
120120
### Generated
121121
- [typescript v0.6.0] .
122122
### Releases
123-
- [NPM v0.6.0] https://www.npmjs.com/package/@livepeer/ai/v/0.6.0 - .
123+
- [NPM v0.6.0] https://www.npmjs.com/package/@livepeer/ai/v/0.6.0 - .
124+
125+
## 2024-12-31 00:01:18
126+
### Changes
127+
Based on:
128+
- OpenAPI Doc
129+
- Speakeasy CLI 1.460.3 (2.484.0) https://github.com/speakeasy-api/speakeasy
130+
### Generated
131+
- [typescript v0.6.1] .
132+
### Releases
133+
- [NPM v0.6.1] https://www.npmjs.com/package/@livepeer/ai/v/0.6.1 - .

RUNTIMES.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Supported JavaScript runtimes
22

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

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

2222
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
23+
24+
## Recommended TypeScript compiler options
25+
26+
The following `tsconfig.json` options are recommended for projects using this
27+
SDK in order to get static type support for features like async iterables,
28+
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
29+
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
30+
so on):
31+
32+
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
33+
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
34+
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
35+
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
36+
37+
```jsonc
38+
{
39+
"compilerOptions": {
40+
"target": "es2020", // or higher
41+
"lib": ["es2020", "dom", "dom.iterable"],
42+
}
43+
}
44+
```
45+
46+
While `target` can be set to older ECMAScript versions, it may result in extra,
47+
unnecessary compatibility code being generated if you are not targeting old
48+
runtimes.

codeSamples.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,12 @@ actions:
133133
134134
async function run() {
135135
const result = await livepeer.generate.llm({
136-
prompt: "<value>",
136+
messages: [
137+
{
138+
role: "<value>",
139+
content: "<value>",
140+
},
141+
],
137142
});
138143
139144
// Handle the result

docs/models/components/audioresponse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { AudioResponse } from "@livepeer/ai/models/components";
99

1010
let value: AudioResponse = {
1111
audio: {
12-
url: "https://quarrelsome-disappointment.info/",
12+
url: "https://lighthearted-developing.com/",
1313
},
1414
};
1515
```

docs/models/components/bodygenllm.md

-23
This file was deleted.

docs/models/components/livevideotovideoparams.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import { LiveVideoToVideoParams } from "@livepeer/ai/models/components";
77

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

docs/models/components/livevideotovideoresponse.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Response model for live video-to-video generation.
88
import { LiveVideoToVideoResponse } from "@livepeer/ai/models/components";
99

1010
let value: LiveVideoToVideoResponse = {
11-
subscribeUrl: "https://hateful-humor.net",
12-
publishUrl: "https://rare-pillbox.biz/",
11+
subscribeUrl: "https://ruddy-bandwidth.net/",
12+
publishUrl: "https://dutiful-cellar.biz",
1313
};
1414
```
1515

0 commit comments

Comments
 (0)