Skip to content

Commit

Permalink
ci: regenerated with OpenAPI Doc v1.0.0, Speakeay CLI 1.108.1
Browse files Browse the repository at this point in the history
  • Loading branch information
speakeasybot committed Oct 27, 2023
1 parent ead9483 commit f9fb038
Show file tree
Hide file tree
Showing 19 changed files with 119 additions and 24 deletions.
65 changes: 62 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ Here's an example of one such pagination call:
# Error Handling

Handling errors in your SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.


<!-- End Error Handling -->


Expand All @@ -159,9 +157,70 @@ const httpClient = axios.create({

const sdk = new Leonardo({defaultClient: httpClient});
```
<!-- End Custom HTTP Client -->
<!-- End Custom HTTP Client -->
<!-- Start Server Selection -->
# Server Selection
## Select Server by Index
You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
| # | Server | Variables |
| - | ------ | --------- |
| 0 | `https://cloud.leonardo.ai/api/rest/v1` | None |

For example:


```typescript
import { Leonardo } from "@leonardo-ai/sdk";
(async () => {
const sdk = new Leonardo({
bearerAuth: "",
serverIdx: 0,
});
const res = await sdk.dataset.createDataset({
name: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
```


## Override Server URL Per-Client

The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example:


```typescript
import { Leonardo } from "@leonardo-ai/sdk";
(async () => {
const sdk = new Leonardo({
bearerAuth: "",
serverURL: "https://cloud.leonardo.ai/api/rest/v1",
});
const res = await sdk.dataset.createDataset({
name: "string",
});
if (res.statusCode == 200) {
// handle response
}
})();
```
<!-- End Server Selection -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

Expand Down
12 changes: 11 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1359,4 +1359,14 @@ Based on:
### Generated
- [typescript v1.64.2] .
### Releases
- [NPM v1.64.2] https://www.npmjs.com/package/@leonardo-ai/sdk/v/1.64.2 - .
- [NPM v1.64.2] https://www.npmjs.com/package/@leonardo-ai/sdk/v/1.64.2 - .

## 2023-10-27 06:01:19
### Changes
Based on:
- OpenAPI Doc v1.0.0 https://api-docs-nine-delta.vercel.app/cloud/openapi.json
- Speakeasy CLI 1.108.1 (2.172.4) https://github.com/speakeasy-api/speakeasy
### Generated
- [typescript v1.64.3] .
### Releases
- [NPM v1.64.3] https://www.npmjs.com/package/@leonardo-ai/sdk/v/1.64.3 - .
6 changes: 3 additions & 3 deletions docs/models/operations/creategenerationrequestbody.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ columns and relationships of "generations"
| `modelId` | *string* | :heavy_minus_sign: | N/A |
| `negativePrompt` | *string* | :heavy_minus_sign: | N/A |
| `photoReal` | *boolean* | :heavy_minus_sign: | If photoReal feature was used. |
| `photoRealStrength` | *number* | :heavy_minus_sign: | Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. |
| `photoRealStrength` | *number* | :heavy_minus_sign: | Depth of field of photoReal used. 0.55 is low, 0.5 is medium, and 0.45 is high. Default is 0.55. |
| `presetStyle` | [shared.SdGenerationStyle](../../models/shared/sdgenerationstyle.md) | :heavy_minus_sign: | The style to generate images with. When photoReal is enabled, use CINEMATIC, CREATIVE, VIBRANT, or NONE. When alchemy is disabled, use LEONARDO or NONE. When alchemy is enabled, use ANIME, CREATIVE, DYNAMIC, ENVIRONMENT, GENERAL, ILLUSTRATION, PHOTOGRAPHY, RAYTRACED, RENDER_3D, SKETCH_BW, SKETCH_COLOR, or NONE. |
| `prompt` | *string* | :heavy_minus_sign: | N/A |
| `promptMagic` | *boolean* | :heavy_minus_sign: | If prompt magic was used. |
Expand Down
Loading

0 comments on commit f9fb038

Please sign in to comment.