@hautechai/sdk 0.1.5 → 0.2.0

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.
@@ -4,7 +4,9 @@ import { useAutogeneratedAPI } from '../api';
4
4
  const pipelines = (options) => {
5
5
  const api = useAutogeneratedAPI({ API: PipelinesApi, options });
6
6
  const callAPI = useAutogeneratedAPI({ API: CallApi, options });
7
- const callMethod = (method) => (params) => callAPI.call({
7
+ const callMethod = (method) =>
8
+ // Type intersection is used as a type check assistance to prevent accidental passing of raw TaskOutput.
9
+ (params) => callAPI.call({
8
10
  run: (methods) => method(methods)(params),
9
11
  });
10
12
  const createPipeline = () => new Pipeline({
@@ -50,6 +52,61 @@ const pipelines = (options) => {
50
52
  get: callMethod((methods) => methods.callControllerCallOperationsGetV1),
51
53
  list: callMethod((methods) => methods.callControllerCallOperationsListV1),
52
54
  updateMetadata: callMethod((methods) => methods.callControllerCallOperationsMetadataUpdateV1),
55
+ run: {
56
+ haute: {
57
+ linda: {
58
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunHauteLindaV1V1)
59
+ },
60
+ naomi: {
61
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunHauteNaomiV1V1)
62
+ },
63
+ },
64
+ inpaint: {
65
+ kate: {
66
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunInpaintKateV1V1),
67
+ }
68
+ },
69
+ gpt: {
70
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunGptV1V1)
71
+ },
72
+ imagine: {
73
+ kate: {
74
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunImagineKateV1V1)
75
+ },
76
+ },
77
+ upscale: {
78
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunUpscaleV1V1),
79
+ },
80
+ objectDetection: {
81
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunObjectDetectionV1V1),
82
+ },
83
+ segmentAnything: {
84
+ embeddings: {
85
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunSegmentAnythingEmbeddingsV1V1),
86
+ },
87
+ mask: {
88
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunSegmentAnythingMaskV1V1),
89
+ }
90
+ },
91
+ poseEstimation: {
92
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunPoseEstimationV1V1),
93
+ },
94
+ cut: {
95
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunCutV1V1),
96
+ },
97
+ composite: {
98
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunCompositeV1V1),
99
+ },
100
+ vton: {
101
+ gisele: {
102
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunVtonGiseleV1V1),
103
+ }
104
+ },
105
+ negateImage: {
106
+ v1: callMethod((methods) => methods.callControllerCallOperationsRunNegateImageV1V1),
107
+ },
108
+ },
109
+ wait: callMethod((methods) => methods.callControllerCallOperationsWaitV1),
53
110
  },
54
111
  poses: {
55
112
  get: callMethod((methods) => methods.callControllerCallPosesGetV1),
@@ -90,7 +147,7 @@ const pipelines = (options) => {
90
147
  if (pipeline.status === 'completed')
91
148
  return resolve(pipeline);
92
149
  if (pipeline.status === 'failed')
93
- return reject(pipeline);
150
+ return resolve(pipeline);
94
151
  timeoutId = setTimeout(poll, delay);
95
152
  };
96
153
  timeoutId = setTimeout(poll, initialDelay);
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hautechai/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -10,7 +10,7 @@
10
10
  "main": "dist/index.js",
11
11
  "description": "Hautech SDK",
12
12
  "dependencies": {
13
- "@hautechai/pipelines": "0.1.0",
13
+ "@hautechai/pipelines": "0.3.2",
14
14
  "axios": "1.6.1",
15
15
  "jose": "5.9.6",
16
16
  "ws": "^8.18.0"