@leonardo-ai/sdk 2.30.1 → 2.30.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk/model.d.ts +1 -1
- package/dist/sdk/model.js +3 -8
- package/dist/sdk/models/operations/creategeneration.d.ts +1 -1
- package/dist/sdk/models/operations/getplatformmodels.d.ts +0 -4
- package/dist/sdk/models/operations/getplatformmodels.js +1 -17
- package/dist/sdk/sdk.js +3 -3
- package/docs/sdk/models/operations/creategenerationrequestbody.md +1 -1
- package/docs/sdks/model/README.md +1 -6
- package/package.json +1 -1
- package/docs/sdk/models/operations/getplatformmodelsrequest.md +0 -9
package/dist/sdk/model.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export declare class Model {
|
|
|
38
38
|
* @remarks
|
|
39
39
|
* Get a list of public Platform Models available for use with generations.
|
|
40
40
|
*/
|
|
41
|
-
getPlatformModels(
|
|
41
|
+
getPlatformModels(config?: AxiosRequestConfig): Promise<operations.GetPlatformModelsResponse>;
|
|
42
42
|
/**
|
|
43
43
|
* Upload 3D Model
|
|
44
44
|
*
|
package/dist/sdk/model.js
CHANGED
|
@@ -371,17 +371,13 @@ var Model = /** @class */ (function () {
|
|
|
371
371
|
* @remarks
|
|
372
372
|
* Get a list of public Platform Models available for use with generations.
|
|
373
373
|
*/
|
|
374
|
-
Model.prototype.getPlatformModels = function (
|
|
374
|
+
Model.prototype.getPlatformModels = function (config) {
|
|
375
375
|
var _a, _b;
|
|
376
376
|
return __awaiter(this, void 0, void 0, function () {
|
|
377
|
-
var
|
|
377
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
378
378
|
return __generator(this, function (_c) {
|
|
379
379
|
switch (_c.label) {
|
|
380
380
|
case 0:
|
|
381
|
-
req = new operations.GetPlatformModelsRequest({
|
|
382
|
-
limit: limit,
|
|
383
|
-
offset: offset,
|
|
384
|
-
});
|
|
385
381
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
386
382
|
operationUrl = baseURL.replace(/\/$/, "") + "/platformModels";
|
|
387
383
|
client = this.sdkConfiguration.defaultClient;
|
|
@@ -397,10 +393,9 @@ var Model = /** @class */ (function () {
|
|
|
397
393
|
}
|
|
398
394
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
399
395
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
400
|
-
queryParams = utils.serializeQueryParams(req);
|
|
401
396
|
headers["Accept"] = "application/json";
|
|
402
397
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
403
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl
|
|
398
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
404
399
|
case 3:
|
|
405
400
|
httpRes = _c.sent();
|
|
406
401
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
@@ -10,7 +10,7 @@ export declare class CreateGenerationRequestBody extends SpeakeasyBase {
|
|
|
10
10
|
*/
|
|
11
11
|
alchemy?: boolean;
|
|
12
12
|
/**
|
|
13
|
-
* Contrast Ratio to use with Alchemy.
|
|
13
|
+
* Contrast Ratio to use with Alchemy. Must be a float between 0 and 1 inclusive.
|
|
14
14
|
*/
|
|
15
15
|
contrastRatio?: number;
|
|
16
16
|
/**
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
2
|
import { AxiosResponse } from "axios";
|
|
3
|
-
export declare class GetPlatformModelsRequest extends SpeakeasyBase {
|
|
4
|
-
limit?: number;
|
|
5
|
-
offset?: number;
|
|
6
|
-
}
|
|
7
3
|
/**
|
|
8
4
|
* columns and relationships of "generated_images"
|
|
9
5
|
*/
|
|
@@ -27,25 +27,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
27
27
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.GetPlatformModelsResponse = exports.GetPlatformModelsResponseBody = exports.GetPlatformModelsCustomModels = exports.GetPlatformModelsGeneratedImages =
|
|
30
|
+
exports.GetPlatformModelsResponse = exports.GetPlatformModelsResponseBody = exports.GetPlatformModelsCustomModels = exports.GetPlatformModelsGeneratedImages = void 0;
|
|
31
31
|
var utils_1 = require("../../../internal/utils");
|
|
32
32
|
var class_transformer_1 = require("class-transformer");
|
|
33
|
-
var GetPlatformModelsRequest = /** @class */ (function (_super) {
|
|
34
|
-
__extends(GetPlatformModelsRequest, _super);
|
|
35
|
-
function GetPlatformModelsRequest() {
|
|
36
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
37
|
-
}
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=limit" }),
|
|
40
|
-
__metadata("design:type", Number)
|
|
41
|
-
], GetPlatformModelsRequest.prototype, "limit", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=offset" }),
|
|
44
|
-
__metadata("design:type", Number)
|
|
45
|
-
], GetPlatformModelsRequest.prototype, "offset", void 0);
|
|
46
|
-
return GetPlatformModelsRequest;
|
|
47
|
-
}(utils_1.SpeakeasyBase));
|
|
48
|
-
exports.GetPlatformModelsRequest = GetPlatformModelsRequest;
|
|
49
33
|
/**
|
|
50
34
|
* columns and relationships of "generated_images"
|
|
51
35
|
*/
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -52,9 +52,9 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
52
52
|
function SDKConfiguration(init) {
|
|
53
53
|
this.language = "typescript";
|
|
54
54
|
this.openapiDocVersion = "v1.0.0";
|
|
55
|
-
this.sdkVersion = "2.30.
|
|
56
|
-
this.genVersion = "2.237.
|
|
57
|
-
this.userAgent = "speakeasy-sdk/typescript 2.30.
|
|
55
|
+
this.sdkVersion = "2.30.3";
|
|
56
|
+
this.genVersion = "2.237.3";
|
|
57
|
+
this.userAgent = "speakeasy-sdk/typescript 2.30.3 2.237.3 v1.0.0 @leonardo-ai/sdk";
|
|
58
58
|
Object.assign(this, init);
|
|
59
59
|
}
|
|
60
60
|
return SDKConfiguration;
|
|
@@ -8,7 +8,7 @@ Query parameters to be provided in the request body as a JSON object
|
|
|
8
8
|
| Field | Type | Required | Description |
|
|
9
9
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
10
|
| `alchemy` | *boolean* | :heavy_minus_sign: | Enable to use Alchemy. |
|
|
11
|
-
| `contrastRatio` | *number* | :heavy_minus_sign: | Contrast Ratio to use with Alchemy.
|
|
11
|
+
| `contrastRatio` | *number* | :heavy_minus_sign: | Contrast Ratio to use with Alchemy. Must be a float between 0 and 1 inclusive. |
|
|
12
12
|
| `controlNet` | *boolean* | :heavy_minus_sign: | Enable to use ControlNet. Requires an init image to be provided. Requires a model based on SD v1.5 |
|
|
13
13
|
| `controlNetType` | [shared.ControlnetType](../../../sdk/models/shared/controlnettype.md) | :heavy_minus_sign: | The type of ControlNet to use. |
|
|
14
14
|
| `elements` | [shared.ElementInput](../../../sdk/models/shared/elementinput.md)[] | :heavy_minus_sign: | N/A |
|
|
@@ -195,16 +195,13 @@ Get a list of public Platform Models available for use with generations.
|
|
|
195
195
|
|
|
196
196
|
```typescript
|
|
197
197
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
198
|
-
import { GetPlatformModelsRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
199
198
|
|
|
200
199
|
async function run() {
|
|
201
200
|
const sdk = new Leonardo({
|
|
202
201
|
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
203
202
|
});
|
|
204
|
-
const limit: number = 419487;
|
|
205
|
-
const offset: number = 472174;
|
|
206
203
|
|
|
207
|
-
const res = await sdk.model.getPlatformModels(
|
|
204
|
+
const res = await sdk.model.getPlatformModels();
|
|
208
205
|
|
|
209
206
|
if (res.statusCode == 200) {
|
|
210
207
|
// handle response
|
|
@@ -218,8 +215,6 @@ run();
|
|
|
218
215
|
|
|
219
216
|
| Parameter | Type | Required | Description |
|
|
220
217
|
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
|
221
|
-
| `limit` | *number* | :heavy_minus_sign: | N/A |
|
|
222
|
-
| `offset` | *number* | :heavy_minus_sign: | N/A |
|
|
223
218
|
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
224
219
|
|
|
225
220
|
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# GetPlatformModelsRequest
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
## Fields
|
|
5
|
-
|
|
6
|
-
| Field | Type | Required | Description |
|
|
7
|
-
| ------------------ | ------------------ | ------------------ | ------------------ |
|
|
8
|
-
| `limit` | *number* | :heavy_minus_sign: | N/A |
|
|
9
|
-
| `offset` | *number* | :heavy_minus_sign: | N/A |
|