Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.9 (#11)
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 Sep 14, 2024
1 parent 6f9516a commit 952057e
Show file tree
Hide file tree
Showing 42 changed files with 98 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mkdir samples
npm install
npm install -g ts-node
npm link
npm link livepeer-ai
npm link @livepeer/ai
TS_CONFIG_CONTENT=$(cat <<EOL
{
"compilerOptions": {
Expand Down
4 changes: 2 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ management:
docVersion: v0.5.0
speakeasyVersion: 1.396.9
generationVersion: 2.415.7
releaseVersion: 0.3.0
configChecksum: c8aa17308629ebd7735417f6e6f6e9ed
releaseVersion: 0.3.1
configChecksum: 55e9bab6bcb0c20f712039a3dc9fd310
repoURL: https://github.com/livepeer/livepeer-ai-js.git
installationURL: https://github.com/livepeer/livepeer-ai-js
published: true
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ generation:
auth:
oAuth2ClientCredentialsEnabled: false
typescript:
version: 0.3.0
version: 0.3.1
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
6 changes: 3 additions & 3 deletions FUNCTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ specific category of applications.
## Example

```typescript
import { LivepeerAICore } from "livepeer-ai/core.js";
import { generateTextToImage } from "livepeer-ai/funcs/generateTextToImage.js";
import { SDKValidationError } from "livepeer-ai/models/errors/sdkvalidationerror.js";
import { LivepeerAICore } from "@livepeer/ai/core.js";
import { generateTextToImage } from "@livepeer/ai/funcs/generateTextToImage.js";
import { SDKValidationError } from "@livepeer/ai/models/errors/sdkvalidationerror.js";

// Use `LivepeerAICore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https
### NPM

```bash
npm add livepeer-ai
npm add @livepeer/ai
```

### PNPM

```bash
pnpm add livepeer-ai
pnpm add @livepeer/ai
```

### Bun

```bash
bun add livepeer-ai
bun add @livepeer/ai
```

### Yarn

```bash
yarn add livepeer-ai zod
yarn add @livepeer/ai zod

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

```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";

const livepeerAI = new LivepeerAI({
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
Expand Down Expand Up @@ -134,7 +134,7 @@ Certain SDK methods accept files as part of a multi-part request. It is possible
> - **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).
```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";
import { openAsBlob } from "node:fs";

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

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

const livepeerAI = new LivepeerAI({
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
Expand Down Expand Up @@ -195,7 +195,7 @@ run();

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

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


```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";
import {
HTTPError,
HTTPValidationError,
SDKValidationError,
} from "livepeer-ai/models/errors";
} from "@livepeer/ai/models/errors";

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

```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";

const livepeerAI = new LivepeerAI({
serverIdx: 1,
Expand All @@ -330,7 +330,7 @@ run();
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:

```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";

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

```typescript
import { LivepeerAI } from "livepeer-ai";
import { HTTPClient } from "livepeer-ai/lib/http";
import { LivepeerAI } from "@livepeer/ai";
import { HTTPClient } from "@livepeer/ai/lib/http";

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

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

const livepeerAI = new LivepeerAI({
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
Expand Down Expand Up @@ -444,7 +444,7 @@ You can pass a logger that matches `console`'s interface as an SDK option.
> 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.
```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";

const sdk = new LivepeerAI({ debugLogger: console });
```
Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,14 @@ Based on:
### Generated
- [typescript v0.3.0] .
### Releases
- [NPM v0.3.0] https://www.npmjs.com/package/livepeer-ai/v/0.3.0 - .
- [NPM v0.3.0] https://www.npmjs.com/package/livepeer-ai/v/0.3.0 - .

## 2024-09-14 00:40:20
### Changes
Based on:
- OpenAPI Doc
- Speakeasy CLI 1.396.9 (2.415.7) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v0.3.1] .
### Releases
- [NPM v0.3.1] https://www.npmjs.com/package/@livepeer/ai/v/0.3.1 - .
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Start SDK Example Usage [usage] -->
```typescript
import { LivepeerAI } from "livepeer-ai";
import { LivepeerAI } from "@livepeer/ai";

const livepeerAI = new LivepeerAI({
httpBearer: "<YOUR_BEARER_TOKEN_HERE>",
Expand Down
12 changes: 6 additions & 6 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ actions:
x-codeSamples:
- lang: typescript
label: genAudioToText
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();"
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();"
- target: $["paths"]["/image-to-image"]["post"]
update:
x-codeSamples:
- lang: typescript
label: genImageToImage
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();"
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();"
- target: $["paths"]["/image-to-video"]["post"]
update:
x-codeSamples:
- lang: typescript
label: genImageToVideo
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();"
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();"
- target: $["paths"]["/segment-anything-2"]["post"]
update:
x-codeSamples:
- lang: typescript
label: genSegmentAnything2
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();"
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();"
- target: $["paths"]["/text-to-image"]["post"]
update:
x-codeSamples:
- lang: typescript
label: genTextToImage
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();"
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();"
- target: $["paths"]["/upscale"]["post"]
update:
x-codeSamples:
- lang: typescript
label: genUpscale
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();"
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();"
2 changes: 1 addition & 1 deletion docs/models/components/apierror.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ API error response model.
## Example Usage

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

let value: APIError = {
msg: "<value>",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygenaudiototext.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygenimagetoimage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygenimagetovideo.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygenimagetovideoimage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygensegmentanything2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygensegmentanything2image.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygenupscale.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/bodygenupscaleimage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/chunk.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A chunk of text with a timestamp.
## Example Usage

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

let value: Chunk = {
timestamp: [
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

// No examples available for this model
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/imageresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Response model for image generation.
## Example Usage

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

let value: ImageResponse = {
images: [
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/loc.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

let value: Loc = 272656;
```
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/masksresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Response model for object segmentation.
## Example Usage

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

let value: MasksResponse = {
masks: "<value>",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/media.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A media object containing information about the generated media.
## Example Usage

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

let value: Media = {
url: "http://innocent-effect.org",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Example Usage

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

let value: Security = {
httpBearer: "<value>",
Expand Down
2 changes: 1 addition & 1 deletion docs/models/components/textresponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Response model for text generation.
## Example Usage

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

let value: TextResponse = {
text: "<value>",
Expand Down
Loading

0 comments on commit 952057e

Please sign in to comment.