Skip to content

Commit 952057e

Browse files
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.9 (#11)
Co-authored-by: speakeasybot <[email protected]>
1 parent 6f9516a commit 952057e

Some content is hidden

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

42 files changed

+98
-88
lines changed

.devcontainer/setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mkdir samples
1010
npm install
1111
npm install -g ts-node
1212
npm link
13-
npm link livepeer-ai
13+
npm link @livepeer/ai
1414
TS_CONFIG_CONTENT=$(cat <<EOL
1515
{
1616
"compilerOptions": {

.speakeasy/gen.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ management:
55
docVersion: v0.5.0
66
speakeasyVersion: 1.396.9
77
generationVersion: 2.415.7
8-
releaseVersion: 0.3.0
9-
configChecksum: c8aa17308629ebd7735417f6e6f6e9ed
8+
releaseVersion: 0.3.1
9+
configChecksum: 55e9bab6bcb0c20f712039a3dc9fd310
1010
repoURL: https://github.com/livepeer/livepeer-ai-js.git
1111
installationURL: https://github.com/livepeer/livepeer-ai-js
1212
published: true

.speakeasy/gen.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ generation:
1515
auth:
1616
oAuth2ClientCredentialsEnabled: false
1717
typescript:
18-
version: 0.3.0
18+
version: 0.3.1
1919
additionalDependencies:
2020
dependencies: {}
2121
devDependencies: {}

FUNCTIONS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ specific category of applications.
1919
## Example
2020

2121
```typescript
22-
import { LivepeerAICore } from "livepeer-ai/core.js";
23-
import { generateTextToImage } from "livepeer-ai/funcs/generateTextToImage.js";
24-
import { SDKValidationError } from "livepeer-ai/models/errors/sdkvalidationerror.js";
22+
import { LivepeerAICore } from "@livepeer/ai/core.js";
23+
import { generateTextToImage } from "@livepeer/ai/funcs/generateTextToImage.js";
24+
import { SDKValidationError } from "@livepeer/ai/models/errors/sdkvalidationerror.js";
2525

2626
// Use `LivepeerAICore` for best tree-shaking performance.
2727
// You can create one instance of it to use across an application.

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https
1717
### NPM
1818

1919
```bash
20-
npm add livepeer-ai
20+
npm add @livepeer/ai
2121
```
2222

2323
### PNPM
2424

2525
```bash
26-
pnpm add livepeer-ai
26+
pnpm add @livepeer/ai
2727
```
2828

2929
### Bun
3030

3131
```bash
32-
bun add livepeer-ai
32+
bun add @livepeer/ai
3333
```
3434

3535
### Yarn
3636

3737
```bash
38-
yarn add livepeer-ai zod
38+
yarn add @livepeer/ai zod
3939

4040
# Note that Yarn does not install peer dependencies automatically. You will need
4141
# to install zod as shown above.
@@ -54,7 +54,7 @@ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
5454
### Example
5555

5656
```typescript
57-
import { LivepeerAI } from "livepeer-ai";
57+
import { LivepeerAI } from "@livepeer/ai";
5858

5959
const livepeerAI = new LivepeerAI({
6060
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
@@ -134,7 +134,7 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
134134
> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob).
135135
136136
```typescript
137-
import { LivepeerAI } from "livepeer-ai";
137+
import { LivepeerAI } from "@livepeer/ai";
138138
import { openAsBlob } from "node:fs";
139139

140140
const livepeerAI = new LivepeerAI({
@@ -163,7 +163,7 @@ Some of the endpoints in this SDK support retries. If you use the SDK without a
163163

164164
To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
165165
```typescript
166-
import { LivepeerAI } from "livepeer-ai";
166+
import { LivepeerAI } from "@livepeer/ai";
167167

168168
const livepeerAI = new LivepeerAI({
169169
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
@@ -195,7 +195,7 @@ run();
195195

196196
If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
197197
```typescript
198-
import { LivepeerAI } from "livepeer-ai";
198+
import { LivepeerAI } from "@livepeer/ai";
199199

200200
const livepeerAI = new LivepeerAI({
201201
retryConfig: {
@@ -240,12 +240,12 @@ Validation errors can also occur when either method arguments or data returned f
240240

241241

242242
```typescript
243-
import { LivepeerAI } from "livepeer-ai";
243+
import { LivepeerAI } from "@livepeer/ai";
244244
import {
245245
HTTPError,
246246
HTTPValidationError,
247247
SDKValidationError,
248-
} from "livepeer-ai/models/errors";
248+
} from "@livepeer/ai/models/errors";
249249

250250
const livepeerAI = new LivepeerAI({
251251
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
@@ -304,7 +304,7 @@ You can override the default server globally by passing a server index to the `s
304304
| 1 | `https://livepeer.studio/api/beta/generate` | None |
305305

306306
```typescript
307-
import { LivepeerAI } from "livepeer-ai";
307+
import { LivepeerAI } from "@livepeer/ai";
308308

309309
const livepeerAI = new LivepeerAI({
310310
serverIdx: 1,
@@ -330,7 +330,7 @@ run();
330330
The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
331331

332332
```typescript
333-
import { LivepeerAI } from "livepeer-ai";
333+
import { LivepeerAI } from "@livepeer/ai";
334334

335335
const livepeerAI = new LivepeerAI({
336336
serverURL: "https://dream-gateway.livepeer.cloud",
@@ -369,8 +369,8 @@ custom header and a timeout to requests and how to use the `"requestError"` hook
369369
to log errors:
370370

371371
```typescript
372-
import { LivepeerAI } from "livepeer-ai";
373-
import { HTTPClient } from "livepeer-ai/lib/http";
372+
import { LivepeerAI } from "@livepeer/ai";
373+
import { HTTPClient } from "@livepeer/ai/lib/http";
374374

375375
const httpClient = new HTTPClient({
376376
// fetcher takes a function that has the same signature as native `fetch`.
@@ -413,7 +413,7 @@ This SDK supports the following security scheme globally:
413413

414414
To authenticate with the API the `httpBearer` parameter must be set when initializing the SDK client instance. For example:
415415
```typescript
416-
import { LivepeerAI } from "livepeer-ai";
416+
import { LivepeerAI } from "@livepeer/ai";
417417

418418
const livepeerAI = new LivepeerAI({
419419
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
@@ -444,7 +444,7 @@ You can pass a logger that matches `console`'s interface as an SDK option.
444444
> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production.
445445
446446
```typescript
447-
import { LivepeerAI } from "livepeer-ai";
447+
import { LivepeerAI } from "@livepeer/ai";
448448

449449
const sdk = new LivepeerAI({ debugLogger: console });
450450
```

RELEASES.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,14 @@ Based on:
4040
### Generated
4141
- [typescript v0.3.0] .
4242
### Releases
43-
- [NPM v0.3.0] https://www.npmjs.com/package/livepeer-ai/v/0.3.0 - .
43+
- [NPM v0.3.0] https://www.npmjs.com/package/livepeer-ai/v/0.3.0 - .
44+
45+
## 2024-09-14 00:40:20
46+
### Changes
47+
Based on:
48+
- OpenAPI Doc
49+
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
50+
### Generated
51+
- [typescript v0.3.1] .
52+
### Releases
53+
- [NPM v0.3.1] https://www.npmjs.com/package/@livepeer/ai/v/0.3.1 - .

USAGE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- Start SDK Example Usage [usage] -->
22
```typescript
3-
import { LivepeerAI } from "livepeer-ai";
3+
import { LivepeerAI } from "@livepeer/ai";
44

55
const livepeerAI = new LivepeerAI({
66
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",

codeSamples.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,34 @@ actions:
88
x-codeSamples:
99
- lang: typescript
1010
label: genAudioToText
11-
source: "import { LivepeerAI } from \"livepeer-ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.audioToText({\n audio: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
11+
source: "import { LivepeerAI } from \"@livepeer/ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.audioToText({\n audio: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
1212
- target: $["paths"]["/image-to-image"]["post"]
1313
update:
1414
x-codeSamples:
1515
- lang: typescript
1616
label: genImageToImage
17-
source: "import { LivepeerAI } from \"livepeer-ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.imageToImage({\n prompt: \"<value>\",\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
17+
source: "import { LivepeerAI } from \"@livepeer/ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.imageToImage({\n prompt: \"<value>\",\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
1818
- target: $["paths"]["/image-to-video"]["post"]
1919
update:
2020
x-codeSamples:
2121
- lang: typescript
2222
label: genImageToVideo
23-
source: "import { LivepeerAI } from \"livepeer-ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.imageToVideo({\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
23+
source: "import { LivepeerAI } from \"@livepeer/ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.imageToVideo({\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
2424
- target: $["paths"]["/segment-anything-2"]["post"]
2525
update:
2626
x-codeSamples:
2727
- lang: typescript
2828
label: genSegmentAnything2
29-
source: "import { LivepeerAI } from \"livepeer-ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.segmentAnything2({\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
29+
source: "import { LivepeerAI } from \"@livepeer/ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.segmentAnything2({\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
3030
- target: $["paths"]["/text-to-image"]["post"]
3131
update:
3232
x-codeSamples:
3333
- lang: typescript
3434
label: genTextToImage
35-
source: "import { LivepeerAI } from \"livepeer-ai\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.textToImage({\n prompt: \"<value>\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
35+
source: "import { LivepeerAI } from \"@livepeer/ai\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.textToImage({\n prompt: \"<value>\",\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
3636
- target: $["paths"]["/upscale"]["post"]
3737
update:
3838
x-codeSamples:
3939
- lang: typescript
4040
label: genUpscale
41-
source: "import { LivepeerAI } from \"livepeer-ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.upscale({\n prompt: \"<value>\",\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"
41+
source: "import { LivepeerAI } from \"@livepeer/ai\";\nimport { openAsBlob } from \"node:fs\";\n\nconst livepeerAI = new LivepeerAI({\n httpBearer: \"<YOUR_BEARER_TOKEN_HERE>\",\n});\n\nasync function run() {\n const result = await livepeerAI.generate.upscale({\n prompt: \"<value>\",\n image: await openAsBlob(\"example.file\"),\n });\n \n // Handle the result\n console.log(result)\n}\n\nrun();"

docs/models/components/apierror.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ API error response model.
55
## Example Usage
66

77
```typescript
8-
import { APIError } from "livepeer-ai/models/components";
8+
import { APIError } from "@livepeer/ai/models/components";
99

1010
let value: APIError = {
1111
msg: "<value>",

docs/models/components/audio.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { Audio } from "livepeer-ai/models/components";
6+
import { Audio } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygenaudiototext.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenAudioToText } from "livepeer-ai/models/components";
6+
import { BodyGenAudioToText } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygenimagetoimage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenImageToImage } from "livepeer-ai/models/components";
6+
import { BodyGenImageToImage } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygenimagetovideo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenImageToVideo } from "livepeer-ai/models/components";
6+
import { BodyGenImageToVideo } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygenimagetovideoimage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenImageToVideoImage } from "livepeer-ai/models/components";
6+
import { BodyGenImageToVideoImage } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygensegmentanything2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenSegmentAnything2 } from "livepeer-ai/models/components";
6+
import { BodyGenSegmentAnything2 } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygensegmentanything2image.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenSegmentAnything2Image } from "livepeer-ai/models/components";
6+
import { BodyGenSegmentAnything2Image } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygenupscale.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenUpscale } from "livepeer-ai/models/components";
6+
import { BodyGenUpscale } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/bodygenupscaleimage.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { BodyGenUpscaleImage } from "livepeer-ai/models/components";
6+
import { BodyGenUpscaleImage } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/chunk.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A chunk of text with a timestamp.
55
## Example Usage
66

77
```typescript
8-
import { Chunk } from "livepeer-ai/models/components";
8+
import { Chunk } from "@livepeer/ai/models/components";
99

1010
let value: Chunk = {
1111
timestamp: [

docs/models/components/image.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { Image } from "livepeer-ai/models/components";
6+
import { Image } from "@livepeer/ai/models/components";
77

88
// No examples available for this model
99
```

docs/models/components/imageresponse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Response model for image generation.
55
## Example Usage
66

77
```typescript
8-
import { ImageResponse } from "livepeer-ai/models/components";
8+
import { ImageResponse } from "@livepeer/ai/models/components";
99

1010
let value: ImageResponse = {
1111
images: [

docs/models/components/loc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { Loc } from "livepeer-ai/models/components";
6+
import { Loc } from "@livepeer/ai/models/components";
77

88
let value: Loc = 272656;
99
```

docs/models/components/masksresponse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Response model for object segmentation.
55
## Example Usage
66

77
```typescript
8-
import { MasksResponse } from "livepeer-ai/models/components";
8+
import { MasksResponse } from "@livepeer/ai/models/components";
99

1010
let value: MasksResponse = {
1111
masks: "<value>",

docs/models/components/media.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A media object containing information about the generated media.
55
## Example Usage
66

77
```typescript
8-
import { Media } from "livepeer-ai/models/components";
8+
import { Media } from "@livepeer/ai/models/components";
99

1010
let value: Media = {
1111
url: "http://innocent-effect.org",

docs/models/components/security.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Example Usage
44

55
```typescript
6-
import { Security } from "livepeer-ai/models/components";
6+
import { Security } from "@livepeer/ai/models/components";
77

88
let value: Security = {
99
httpBearer: "<value>",

docs/models/components/textresponse.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Response model for text generation.
55
## Example Usage
66

77
```typescript
8-
import { TextResponse } from "livepeer-ai/models/components";
8+
import { TextResponse } from "@livepeer/ai/models/components";
99

1010
let value: TextResponse = {
1111
text: "<value>",

0 commit comments

Comments
 (0)