Skip to content

Commit 30c86c8

Browse files
committed
## Typescript SDK Changes Detected:
* `livepeer.generate.liveVideoToVideo()`: * `request` **Changed** * `response` **Changed**
1 parent 5c83de4 commit 30c86c8

File tree

120 files changed

+2401
-3365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+2401
-3365
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/examples/node_modules
2+
/mcp-server
3+
/bin
4+
.DS_Store
5+
**/.speakeasy/temp/
6+
**/.speakeasy/logs/
7+
.DS_Store
8+
.env
9+
.env.local
10+
.env.*.local
111
/.eslintcache
212
/.speakeasy/reports
313
/react-query

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
!/REACT_QUERY.md
55
!/**/*.ts
66
!/**/*.js
7+
!/**/*.mjs
78
!/**/*.json
89
!/**/*.map
910

.speakeasy/gen.lock

Lines changed: 37 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
lockVersion: 2.0.0
22
id: 8bd6d3b6-cae6-4e55-b72f-6fdc1dbce9a1
33
management:
4-
docChecksum: 6657dd3e876a909472f364dc1fe34d72
5-
docVersion: 0.0.0
6-
speakeasyVersion: 1.480.0
7-
generationVersion: 2.499.0
8-
releaseVersion: 0.6.2
9-
configChecksum: f41c806c90a2fadee46578cb5e358e89
4+
docChecksum: ccf6085748e452cf3e6a2d9f287f99de
5+
docVersion: 0.13.11
6+
speakeasyVersion: 1.650.0
7+
generationVersion: 2.743.2
8+
releaseVersion: 0.7.0
9+
configChecksum: 77e18e39d429123fa81c49824cb19573
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
16-
constsAndDefaults: 0.1.11
17-
core: 3.18.20
16+
constsAndDefaults: 0.1.12
17+
core: 3.26.3
1818
defaultEnabledRetries: 0.1.0
1919
envVarSecurityUsage: 0.1.2
20-
globalSecurity: 2.82.12
20+
globalSecurity: 2.82.14
2121
globalSecurityCallbacks: 0.1.0
2222
globalSecurityFlattening: 0.1.0
23-
globalServerURLs: 2.82.4
23+
globalServerURLs: 2.83.0
2424
nameOverrides: 2.81.2
2525
responseFormat: 0.2.3
2626
retries: 2.83.0
27-
sdkHooks: 0.2.0
28-
unions: 2.85.8
27+
sdkHooks: 0.3.0
28+
unions: 2.86.0
2929
uploadStreams: 0.1.0
3030
generatedFiles:
3131
- .gitattributes
@@ -82,8 +82,11 @@ generatedFiles:
8282
- docs/models/operations/gentexttospeechresponse.md
8383
- docs/models/operations/genupscaleresponse.md
8484
- docs/sdks/generate/README.md
85-
- docs/sdks/livepeer/README.md
8685
- eslint.config.mjs
86+
- examples/.env.template
87+
- examples/README.md
88+
- examples/generateTextToImage.example.ts
89+
- examples/package.json
8790
- jsr.json
8891
- package.json
8992
- src/core.ts
@@ -148,6 +151,8 @@ generatedFiles:
148151
- src/models/errors/httperror.ts
149152
- src/models/errors/httpvalidationerror.ts
150153
- src/models/errors/index.ts
154+
- src/models/errors/livepeererror.ts
155+
- src/models/errors/responsevalidationerror.ts
151156
- src/models/errors/sdkerror.ts
152157
- src/models/errors/sdkvalidationerror.ts
153158
- src/models/operations/genaudiototext.ts
@@ -164,6 +169,7 @@ generatedFiles:
164169
- src/sdk/generate.ts
165170
- src/sdk/index.ts
166171
- src/sdk/sdk.ts
172+
- src/types/async.ts
167173
- src/types/blobs.ts
168174
- src/types/constdatetime.ts
169175
- src/types/enums.ts
@@ -180,7 +186,7 @@ examples:
180186
application/json: {"model_id": "", "loras": "", "prompt": "<value>", "height": 576, "width": 1024, "guidance_scale": 7.5, "negative_prompt": "", "safety_check": true, "num_inference_steps": 50, "num_images_per_prompt": 1}
181187
responses:
182188
"200":
183-
application/json: {"images": [{"url": "https://hateful-cruelty.name", "seed": 857392, "nsfw": true}]}
189+
application/json: {"images": []}
184190
"400":
185191
application/json: {"detail": {"msg": "<value>"}}
186192
"422":
@@ -190,10 +196,10 @@ examples:
190196
genImageToImage:
191197
speakeasy-default-gen-image-to-image:
192198
requestBody:
193-
multipart/form-data: {"prompt": "<value>", "image": {"": "x-file: example.file"}, "model_id": "", "loras": "", "strength": 0.8, "guidance_scale": 7.5, "image_guidance_scale": 1.5, "negative_prompt": "", "safety_check": true, "num_inference_steps": 100, "num_images_per_prompt": 1}
199+
multipart/form-data: {"prompt": "<value>", "image": "x-file: example.file", "model_id": "", "loras": "", "strength": 0.8, "guidance_scale": 7.5, "image_guidance_scale": 1.5, "negative_prompt": "", "safety_check": true, "num_inference_steps": 100, "num_images_per_prompt": 1}
194200
responses:
195201
"200":
196-
application/json: {"images": [{"url": "https://selfish-operating.name/", "seed": 976514, "nsfw": false}]}
202+
application/json: {"images": []}
197203
"400":
198204
application/json: {"detail": {"msg": "<value>"}}
199205
"422":
@@ -203,10 +209,10 @@ examples:
203209
genImageToVideo:
204210
speakeasy-default-gen-image-to-video:
205211
requestBody:
206-
multipart/form-data: {"image": {"": "x-file: example.file"}, "model_id": "", "height": 576, "width": 1024, "fps": 6, "motion_bucket_id": 127, "noise_aug_strength": 0.02, "safety_check": true, "num_inference_steps": 25}
212+
multipart/form-data: {"image": "x-file: example.file", "model_id": "", "height": 576, "width": 1024, "fps": 6, "motion_bucket_id": 127, "noise_aug_strength": 0.02, "safety_check": true, "num_inference_steps": 25}
207213
responses:
208214
"200":
209-
application/json: {"images": [{"url": "https://low-handover.name/", "seed": 87160, "nsfw": true}]}
215+
application/json: {"images": []}
210216
"400":
211217
application/json: {"detail": {"msg": "<value>"}}
212218
"422":
@@ -216,10 +222,10 @@ examples:
216222
genUpscale:
217223
speakeasy-default-gen-upscale:
218224
requestBody:
219-
multipart/form-data: {"prompt": "<value>", "image": {"": "x-file: example.file"}, "model_id": "", "safety_check": true, "num_inference_steps": 75}
225+
multipart/form-data: {"prompt": "<value>", "image": "x-file: example.file", "model_id": "", "safety_check": true, "num_inference_steps": 75}
220226
responses:
221227
"200":
222-
application/json: {"images": [{"url": "https://bogus-typewriter.net", "seed": 311567, "nsfw": false}]}
228+
application/json: {"images": []}
223229
"400":
224230
application/json: {"detail": {"msg": "<value>"}}
225231
"422":
@@ -229,10 +235,10 @@ examples:
229235
genAudioToText:
230236
speakeasy-default-gen-audio-to-text:
231237
requestBody:
232-
multipart/form-data: {"audio": {"": "x-file: example.file"}, "model_id": "", "return_timestamps": "true"}
238+
multipart/form-data: {"audio": "x-file: example.file", "model_id": "", "return_timestamps": "true"}
233239
responses:
234240
"200":
235-
application/json: {"text": "<value>", "chunks": [{"timestamp": ["<value>", "<value>"], "text": "<value>"}, {"timestamp": [], "text": "<value>"}]}
241+
application/json: {"text": "<value>", "chunks": []}
236242
"400":
237243
application/json: {"detail": {"msg": "<value>"}}
238244
"422":
@@ -242,7 +248,7 @@ examples:
242248
genSegmentAnything2:
243249
speakeasy-default-gen-segment-anything2:
244250
requestBody:
245-
multipart/form-data: {"image": {"": "x-file: example.file"}, "model_id": "", "multimask_output": true, "return_logits": true, "normalize_coords": true}
251+
multipart/form-data: {"image": "x-file: example.file", "model_id": "", "multimask_output": true, "return_logits": true, "normalize_coords": true}
246252
responses:
247253
"200":
248254
application/json: {"masks": "<value>", "scores": "<value>", "logits": "<value>"}
@@ -255,10 +261,10 @@ examples:
255261
genLLM:
256262
speakeasy-default-gen-LLM:
257263
requestBody:
258-
application/json: {"messages": [], "model": "", "temperature": 0.7, "max_tokens": 256, "top_p": 1, "top_k": -1, "stream": false}
264+
application/json: {"messages": [{"role": "<value>", "content": "<value>"}], "model": "", "temperature": 0.7, "max_tokens": 256, "top_p": 1, "top_k": -1, "stream": false}
259265
responses:
260266
"200":
261-
application/json: {"id": "<id>", "model": "Expedition", "created": 755586, "usage": {"prompt_tokens": 348799, "completion_tokens": 332397, "total_tokens": 528534}, "choices": []}
267+
application/json: {"id": "<id>", "model": "Explorer", "created": 166063, "usage": {"prompt_tokens": 213097, "completion_tokens": 185693, "total_tokens": 530500}, "choices": []}
262268
"400":
263269
application/json: {"detail": {"msg": "<value>"}}
264270
"422":
@@ -268,7 +274,7 @@ examples:
268274
genImageToText:
269275
speakeasy-default-gen-image-to-text:
270276
requestBody:
271-
multipart/form-data: {"image": {"": "x-file: example.file"}, "prompt": "", "model_id": ""}
277+
multipart/form-data: {"image": "x-file: example.file", "prompt": "", "model_id": ""}
272278
responses:
273279
"200":
274280
application/json: {"text": "<value>"}
@@ -281,10 +287,10 @@ examples:
281287
genLiveVideoToVideo:
282288
speakeasy-default-gen-live-video-to-video:
283289
requestBody:
284-
application/json: {"subscribe_url": "https://soulful-lava.org/", "publish_url": "https://vain-tabletop.biz", "control_url": "", "events_url": "", "model_id": ""}
290+
application/json: {"subscribe_url": "https://soulful-finding.biz", "publish_url": "https://monumental-representation.biz/", "control_url": "", "events_url": "", "model_id": "", "gateway_request_id": "", "manifest_id": "", "stream_id": ""}
285291
responses:
286292
"200":
287-
application/json: {"subscribe_url": "https://vain-kiss.name", "publish_url": "https://frail-duffel.com", "control_url": "", "events_url": ""}
293+
application/json: {"subscribe_url": "https://any-expense.com/", "publish_url": "https://early-abacus.org", "control_url": "", "events_url": "", "request_id": "", "manifest_id": ""}
288294
"400":
289295
application/json: {"detail": {"msg": "<value>"}}
290296
"422":
@@ -297,12 +303,13 @@ examples:
297303
application/json: {"model_id": "", "text": "", "description": "A male speaker delivers a slightly expressive and animated speech with a moderate speed and pitch."}
298304
responses:
299305
"200":
300-
application/json: {"audio": {"url": "https://accurate-parsnip.net/"}}
306+
application/json: {"audio": {"url": "https://slushy-elevation.net/"}}
301307
"400":
302308
application/json: {"detail": {"msg": "<value>"}}
303309
"422":
304310
application/json: {}
305311
"500":
306312
application/json: {"detail": {"msg": "<value>"}}
307-
examplesVersion: 1.0.0
313+
examplesVersion: 1.0.2
308314
generatedTests: {}
315+
releaseNotes: "## Typescript SDK Changes Detected:\n* `livepeer.generate.liveVideoToVideo()`: \n * `request` **Changed**\n * `response` **Changed**\n"

.speakeasy/gen.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,27 @@ generation:
44
maintainOpenAPIOrder: true
55
usageSnippets:
66
optionalPropertyRendering: withExample
7+
sdkInitStyle: constructor
78
fixes:
8-
nameResolutionDec2023: false
9+
nameResolutionFeb2025: false
910
parameterOrderingFeb2024: false
1011
requestResponseComponentNamesFeb2024: false
12+
securityFeb2025: false
13+
sharedErrorComponentsApr2025: false
1114
auth:
1215
oAuth2ClientCredentialsEnabled: false
1316
oAuth2PasswordEnabled: false
17+
hoistGlobalSecurity: true
18+
schemas:
19+
allOfMergeStrategy: shallowMerge
20+
requestBodyFieldName: ""
21+
tests:
22+
generateTests: true
23+
generateNewTests: false
24+
skipResponseBodyAssertions: false
1425
typescript:
15-
version: 0.6.2
26+
version: 0.7.0
27+
acceptHeaderEnum: true
1628
additionalDependencies:
1729
dependencies:
1830
jest: ^29.7.0
@@ -22,14 +34,21 @@ typescript:
2234
'@types/jest': ^29.5.12
2335
peerDependencies: {}
2436
additionalPackageJSON: {}
37+
additionalScripts: {}
38+
alwaysIncludeInboundAndOutbound: false
2539
author: Livepeer
40+
baseErrorName: LivepeerError
2641
clientServerStatusCodesAsErrors: true
42+
constFieldsAlwaysOptional: true
2743
defaultErrorName: SDKError
2844
enableCustomCodeRegions: false
45+
enableMCPServer: false
2946
enableReactQuery: false
3047
enumFormat: enum
48+
exportZodModelNamespace: false
3149
flattenGlobalSecurity: true
3250
flatteningOrder: body-first
51+
generateExamples: true
3352
imports:
3453
option: openapi
3554
paths:
@@ -39,11 +58,16 @@ typescript:
3958
shared: models/components
4059
webhooks: models/webhooks
4160
inputModelSuffix: input
61+
jsonpath: legacy
4262
maxMethodParams: 4
4363
methodArguments: require-security-and-request
64+
modelPropertyCasing: camel
4465
moduleFormat: commonjs
4566
outputModelSuffix: output
4667
packageName: '@livepeer/ai'
4768
responseFormat: envelope
69+
sseFlatResponse: false
4870
templateVersion: v2
71+
usageSDKInitImports: []
4972
useIndexModules: true
73+
zodVersion: v3

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
speakeasyVersion: 1.480.0
1+
speakeasyVersion: 1.650.0
22
sources:
33
livepeer-ai-OAS:
44
sourceNamespace: livepeer-ai-oas
5-
sourceRevisionDigest: sha256:3f780bb89b27b717229bf3fb0cc8eafe6ca754e3da17e0f65d6cf8deabcb95e8
6-
sourceBlobDigest: sha256:7c0df39c1c5f0ffe580b63f5dc6cb0f81181f5361a80f63f41314cf81d0f3bf4
5+
sourceRevisionDigest: sha256:8e99fdc55b750db963079293d391dec5168c325a849ee9a52ef1dda1952b8917
6+
sourceBlobDigest: sha256:3268e3640001fb0f0582a9328448f3235d0fe88448fa7a1249a4524ebdd452c8
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1736899286
10-
- 0.0.0
9+
- speakeasy-sdk-regen-1739404875
10+
- 0.13.11
1111
targets:
1212
livepeer-ai-ts:
1313
source: livepeer-ai-OAS
1414
sourceNamespace: livepeer-ai-oas
15-
sourceRevisionDigest: sha256:3f780bb89b27b717229bf3fb0cc8eafe6ca754e3da17e0f65d6cf8deabcb95e8
16-
sourceBlobDigest: sha256:7c0df39c1c5f0ffe580b63f5dc6cb0f81181f5361a80f63f41314cf81d0f3bf4
15+
sourceRevisionDigest: sha256:8e99fdc55b750db963079293d391dec5168c325a849ee9a52ef1dda1952b8917
16+
sourceBlobDigest: sha256:3268e3640001fb0f0582a9328448f3235d0fe88448fa7a1249a4524ebdd452c8
1717
codeSamplesNamespace: code-samples-typescript-livepeer-ts
18-
codeSamplesRevisionDigest: sha256:b095b4fd79d259a27df817458a7f17eb84321fad3599de4460aa913719fae2b6
18+
codeSamplesRevisionDigest: sha256:b4d86a2571a91ffbc1bcf9ba9037ff3dba6725f3e3d993a1b7b2ba153e4c3e36
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

FUNCTIONS.md

Lines changed: 5 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ specific category of applications.
2121
```typescript
2222
import { LivepeerCore } from "@livepeer/ai/core.js";
2323
import { generateTextToImage } from "@livepeer/ai/funcs/generateTextToImage.js";
24-
import { SDKValidationError } from "@livepeer/ai/models/errors/sdkvalidationerror.js";
2524

2625
// Use `LivepeerCore` for best tree-shaking performance.
2726
// You can create one instance of it to use across an application.
@@ -31,39 +30,14 @@ const livepeer = new LivepeerCore({
3130

3231
async function run() {
3332
const res = await generateTextToImage(livepeer, {
34-
modelId: "",
35-
loras: "",
3633
prompt: "<value>",
37-
height: 576,
38-
width: 1024,
39-
guidanceScale: 7.5,
40-
negativePrompt: "",
41-
safetyCheck: true,
42-
numInferenceSteps: 50,
43-
numImagesPerPrompt: 1,
4434
});
45-
46-
switch (true) {
47-
case res.ok:
48-
// The success case will be handled outside of the switch block
49-
break;
50-
case res.error instanceof SDKValidationError:
51-
// Pretty-print validation errors.
52-
return console.log(res.error.pretty());
53-
case res.error instanceof Error:
54-
return console.log(res.error);
55-
default:
56-
// TypeScript's type checking will fail on the following line if the above
57-
// cases were not exhaustive.
58-
res.error satisfies never;
59-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
35+
if (res.ok) {
36+
const { value: result } = res;
37+
console.log(result);
38+
} else {
39+
console.log("generateTextToImage failed:", res.error);
6040
}
61-
62-
63-
const { value: result } = res;
64-
65-
// Handle the result
66-
console.log(result);
6741
}
6842

6943
run();

0 commit comments

Comments
 (0)