Skip to content

Commit

Permalink
refactor: rename target (#3)
Browse files Browse the repository at this point in the history
This commit renames the target to prevent naming conflicts with the
regular JS/TS library.
  • Loading branch information
rickstaa authored Aug 21, 2024
1 parent 4bc1d57 commit 40c3796
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 48 deletions.
8 changes: 4 additions & 4 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: 8766970f-4397-4dff-8082-81333329536d
management:
docChecksum: c222ffbf28e5f62770dc8cbd99010f96
docVersion: v0.1.2
speakeasyVersion: 1.376.1
generationVersion: 2.402.5
releaseVersion: 0.1.2
configChecksum: b0d2f710722fbf4899c5f3e77fcbd33f
speakeasyVersion: 1.377.0
generationVersion: 2.404.0
releaseVersion: 0.1.3
configChecksum: eefe057d141baa2c05728e0706976ccb
repoURL: https://github.com/livepeer/livepeer-ai-js.git
installationURL: https://github.com/livepeer/livepeer-ai-js
features:
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.1.2
version: 0.1.3
additionalDependencies:
dependencies: {}
devDependencies: {}
Expand Down
18 changes: 6 additions & 12 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
speakeasyVersion: 1.376.1
speakeasyVersion: 1.377.0
sources:
livepeer-ai-OAS:
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:c3a8dccb8a3f822b82931d3d9e3cb7f4eb6d164d3f289a3c0c7b3dd98de913d3
sourceRevisionDigest: sha256:8e8a89195aea8aa7f8c0c2674946515904ddca346b557a631cf5a4c6c81529d6
sourceBlobDigest: sha256:e2549433c2d09c42e52916d511a18269d4ce6e728cd487f043ab8e82991b4d36
tags:
- latest
targets:
livepeer-ai:
livepeer-ai-ts:
source: livepeer-ai-OAS
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:d9dab0807effddb874fd488be2aa51ce7ff20cf0e2fc832d8aff9cee8f5eb9a8
sourceBlobDigest: sha256:81af44ae23c4192a9493c755662ebeafd4293968b1ff919f0acccefbb9a1bd3f
outLocation: /home/ricks/development/livepeer/ai/livepeer-ai-js
livepeer-ts:
source: livepeer-ai-OAS
sourceNamespace: livepeer-ai-oas
sourceRevisionDigest: sha256:c3a8dccb8a3f822b82931d3d9e3cb7f4eb6d164d3f289a3c0c7b3dd98de913d3
sourceRevisionDigest: sha256:8e8a89195aea8aa7f8c0c2674946515904ddca346b557a631cf5a4c6c81529d6
sourceBlobDigest: sha256:e2549433c2d09c42e52916d511a18269d4ce6e728cd487f043ab8e82991b4d36
codeSamplesNamespace: code-samples-typescript-livepeer-ts
codeSamplesRevisionDigest: sha256:f5f04f8efc644b6e81cd50641403c143e83a31d4136e8a7b99d62473c78ce7fb
codeSamplesRevisionDigest: sha256:182828739e43b7d566a95d4d25cec1db4cfede926d44f4f080defb317f99f553
outLocation: /home/ricks/development/livepeer/ai/livepeer-ai-js
workflow:
workflowVersion: 1.0.0
Expand All @@ -31,7 +25,7 @@ workflow:
registry:
location: registry.speakeasyapi.dev/livepeer-8mq/livepeer-ai/livepeer-ai-oas
targets:
livepeer-ts:
livepeer-ai-ts:
target: typescript
source: livepeer-ai-OAS
codeSamples:
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sources:
registry:
location: registry.speakeasyapi.dev/livepeer-8mq/livepeer-ai/livepeer-ai-oas
targets:
livepeer-ts:
livepeer-ai-ts:
target: typescript
source: livepeer-ai-OAS
codeSamples:
Expand Down
24 changes: 12 additions & 12 deletions codeSamples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ info:
title: CodeSamples overlay for typescript target
version: 0.0.0
actions:
- target: $["paths"]["/upscale"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "upscale"
"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.upscale({\n prompt: \"<value>\",\n image: await openAsBlob(\"./sample-file\"),\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
- target: $["paths"]["/audio-to-text"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "audio_to_text"
"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.audioToText({\n audio: await openAsBlob(\"./sample-file\"),\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
- target: $["paths"]["/text-to-image"]["post"]
update:
"x-codeSamples":
Expand All @@ -21,15 +33,3 @@ actions:
- "lang": "typescript"
"label": "image_to_video"
"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.imageToVideo({\n image: await openAsBlob(\"./sample-file\"),\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
- target: $["paths"]["/upscale"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "upscale"
"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.upscale({\n prompt: \"<value>\",\n image: await openAsBlob(\"./sample-file\"),\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
- target: $["paths"]["/audio-to-text"]["post"]
update:
"x-codeSamples":
- "lang": "typescript"
"label": "audio_to_text"
"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.audioToText({\n audio: await openAsBlob(\"./sample-file\"),\n });\n\n // Handle the result\n console.log(result)\n}\n\nrun();"
20 changes: 9 additions & 11 deletions docs/sdks/livepeerai/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# LivepeerAI SDK


## Overview

Livepeer AI Runner: An application to run AI pipelines
Expand Down Expand Up @@ -38,7 +37,6 @@ async function run() {
run();
```


### Standalone function

The standalone function version of this method:
Expand Down Expand Up @@ -80,10 +78,10 @@ run();
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response

**Promise\<[operations.TextToImageResponse](../../models/operations/texttoimageresponse.md)\>**

### Errors

| Error Object | Status Code | Content Type |
Expand All @@ -92,6 +90,7 @@ run();
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4xx-5xx | */* |


## imageToImage

Image To Image
Expand Down Expand Up @@ -119,7 +118,6 @@ async function run() {
run();
```


### Standalone function

The standalone function version of this method:
Expand Down Expand Up @@ -163,10 +161,10 @@ run();
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response

**Promise\<[operations.ImageToImageResponse](../../models/operations/imagetoimageresponse.md)\>**

### Errors

| Error Object | Status Code | Content Type |
Expand All @@ -175,6 +173,7 @@ run();
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4xx-5xx | */* |


## imageToVideo

Image To Video
Expand All @@ -201,7 +200,6 @@ async function run() {
run();
```


### Standalone function

The standalone function version of this method:
Expand Down Expand Up @@ -244,10 +242,10 @@ run();
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response

**Promise\<[operations.ImageToVideoResponse](../../models/operations/imagetovideoresponse.md)\>**

### Errors

| Error Object | Status Code | Content Type |
Expand All @@ -256,6 +254,7 @@ run();
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4xx-5xx | */* |


## upscale

Upscale
Expand Down Expand Up @@ -283,7 +282,6 @@ async function run() {
run();
```


### Standalone function

The standalone function version of this method:
Expand Down Expand Up @@ -327,10 +325,10 @@ run();
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response

**Promise\<[operations.UpscaleResponse](../../models/operations/upscaleresponse.md)\>**

### Errors

| Error Object | Status Code | Content Type |
Expand All @@ -339,6 +337,7 @@ run();
| errors.HTTPValidationError | 422 | application/json |
| errors.SDKError | 4xx-5xx | */* |


## audioToText

Audio To Text
Expand All @@ -365,7 +364,6 @@ async function run() {
run();
```


### Standalone function

The standalone function version of this method:
Expand Down Expand Up @@ -408,10 +406,10 @@ run();
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |


### Response

**Promise\<[operations.AudioToTextResponse](../../models/operations/audiototextresponse.md)\>**

### Errors

| Error Object | Status Code | Content Type |
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{
"name": "livepeer-ai",
"version": "0.1.2",
"version": "0.1.3",
"exports": {
".": "./src/index.ts",
"./models/errors": "./src/models/errors/index.ts",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "livepeer-ai",
"version": "0.1.2",
"version": "0.1.3",
"author": "Livepeer",
"main": "./index.js",
"sideEffects": false,
Expand Down
6 changes: 3 additions & 3 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
export const SDK_METADATA = {
language: "typescript",
openapiDocVersion: "v0.1.2",
sdkVersion: "0.1.2",
genVersion: "2.402.5",
userAgent: "speakeasy-sdk/typescript 0.1.2 2.402.5 v0.1.2 livepeer-ai",
sdkVersion: "0.1.3",
genVersion: "2.404.0",
userAgent: "speakeasy-sdk/typescript 0.1.3 2.404.0 v0.1.2 livepeer-ai",
} as const;

0 comments on commit 40c3796

Please sign in to comment.