hume 0.5.17 → 0.6.1
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/.mock/definition/api.yml +12 -0
- package/.mock/definition/custom-models/__package__.yml +1392 -0
- package/.mock/definition/custom-models/datasets.yml +406 -0
- package/.mock/definition/custom-models/files.yml +263 -0
- package/.mock/definition/custom-models/jobs.yml +44 -0
- package/.mock/definition/custom-models/models.yml +303 -0
- package/.mock/definition/empathic-voice/__package__.yml +896 -0
- package/.mock/definition/empathic-voice/chat.yml +59 -0
- package/.mock/definition/empathic-voice/chatGroups.yml +80 -0
- package/.mock/definition/empathic-voice/chats.yml +86 -0
- package/.mock/definition/empathic-voice/configs.yml +413 -0
- package/.mock/definition/empathic-voice/prompts.yml +265 -0
- package/.mock/definition/empathic-voice/tools.yml +398 -0
- package/.mock/definition/expression-measurement/__package__.yml +1122 -0
- package/.mock/definition/expression-measurement/batch.yml +352 -0
- package/.mock/definition/expression-measurement/stream.yml +362 -0
- package/.mock/fern.config.json +4 -0
- package/Client.d.ts +1 -0
- package/api/resources/customModels/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/datasets/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/datasets/client/Client.js +38 -30
- package/api/resources/customModels/resources/files/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/files/client/Client.js +26 -20
- package/api/resources/customModels/resources/jobs/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/jobs/client/Client.js +6 -4
- package/api/resources/customModels/resources/models/client/Client.d.ts +1 -0
- package/api/resources/customModels/resources/models/client/Client.js +18 -12
- package/api/resources/empathicVoice/client/Client.d.ts +4 -0
- package/api/resources/empathicVoice/client/Client.js +5 -0
- package/api/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +1 -1
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +42 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +178 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/index.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/index.js +17 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +21 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.js +5 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +17 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.js +5 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/index.d.ts +2 -0
- package/api/resources/empathicVoice/resources/chatGroups/client/requests/index.js +2 -0
- package/api/resources/empathicVoice/resources/chatGroups/index.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chatGroups/index.js +17 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/chats/client/Client.js +6 -4
- package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/configs/client/Client.js +27 -18
- package/api/resources/empathicVoice/resources/index.d.ts +2 -0
- package/api/resources/empathicVoice/resources/index.js +3 -1
- package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/prompts/client/Client.js +27 -18
- package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
- package/api/resources/empathicVoice/resources/tools/client/Client.js +27 -18
- package/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
- package/api/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
- package/api/resources/empathicVoice/types/ChatMetadata.js +5 -0
- package/api/resources/empathicVoice/types/ReturnChat.d.ts +2 -0
- package/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +2 -0
- package/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +19 -0
- package/api/resources/empathicVoice/types/ReturnChatGroup.js +5 -0
- package/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +24 -0
- package/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +5 -0
- package/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +19 -0
- package/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +5 -0
- package/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +2 -0
- package/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
- package/api/resources/empathicVoice/types/ReturnPagedChatGroups.js +5 -0
- package/api/resources/empathicVoice/types/index.d.ts +5 -0
- package/api/resources/empathicVoice/types/index.js +5 -0
- package/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
- package/api/resources/expressionMeasurement/resources/batch/client/Client.js +17 -12
- package/core/fetcher/Fetcher.d.ts +1 -0
- package/core/fetcher/Fetcher.js +106 -20
- package/core/form-data-utils/FormDataWrapper.d.ts +24 -0
- package/core/form-data-utils/FormDataWrapper.js +106 -0
- package/core/form-data-utils/index.d.ts +1 -0
- package/core/form-data-utils/index.js +17 -0
- package/core/index.d.ts +1 -0
- package/core/index.js +1 -0
- package/dist/Client.d.ts +1 -0
- package/dist/api/resources/customModels/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/datasets/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/datasets/client/Client.js +38 -30
- package/dist/api/resources/customModels/resources/files/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/files/client/Client.js +26 -20
- package/dist/api/resources/customModels/resources/jobs/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/jobs/client/Client.js +6 -4
- package/dist/api/resources/customModels/resources/models/client/Client.d.ts +1 -0
- package/dist/api/resources/customModels/resources/models/client/Client.js +18 -12
- package/dist/api/resources/empathicVoice/client/Client.d.ts +4 -0
- package/dist/api/resources/empathicVoice/client/Client.js +5 -0
- package/dist/api/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +1 -1
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +42 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +178 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/index.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/index.js +17 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.d.ts +21 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupEventsRequest.js +5 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.d.ts +17 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/ChatGroupsListChatGroupsRequest.js +5 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/index.d.ts +2 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/client/requests/index.js +2 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/index.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chatGroups/index.js +17 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +6 -4
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +27 -18
- package/dist/api/resources/empathicVoice/resources/index.d.ts +2 -0
- package/dist/api/resources/empathicVoice/resources/index.js +3 -1
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +27 -18
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +1 -0
- package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +27 -18
- package/dist/api/resources/empathicVoice/types/AssistantMessage.d.ts +1 -1
- package/dist/api/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
- package/dist/api/resources/empathicVoice/types/ChatMetadata.js +5 -0
- package/dist/api/resources/empathicVoice/types/ReturnChat.d.ts +2 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatEvent.d.ts +2 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatGroup.d.ts +19 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatGroup.js +5 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +24 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +5 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +19 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +5 -0
- package/dist/api/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +2 -0
- package/dist/api/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
- package/dist/api/resources/empathicVoice/types/ReturnPagedChatGroups.js +5 -0
- package/dist/api/resources/empathicVoice/types/index.d.ts +5 -0
- package/dist/api/resources/empathicVoice/types/index.js +5 -0
- package/dist/api/resources/expressionMeasurement/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +1 -0
- package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +17 -12
- package/dist/core/fetcher/Fetcher.d.ts +1 -0
- package/dist/core/fetcher/Fetcher.js +106 -20
- package/dist/core/form-data-utils/FormDataWrapper.d.ts +24 -0
- package/dist/core/form-data-utils/FormDataWrapper.js +106 -0
- package/dist/core/form-data-utils/index.d.ts +1 -0
- package/dist/core/form-data-utils/index.js +17 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +1 -0
- package/dist/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +2 -1
- package/dist/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.js +2 -0
- package/dist/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
- package/dist/serialization/resources/empathicVoice/types/ChatMetadata.js +36 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChat.d.ts +1 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChat.js +1 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatEvent.d.ts +1 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatEvent.js +1 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatGroup.d.ts +17 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatGroup.js +38 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +20 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +41 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +17 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +38 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +1 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.js +1 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
- package/dist/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.js +36 -0
- package/dist/serialization/resources/empathicVoice/types/index.d.ts +5 -0
- package/dist/serialization/resources/empathicVoice/types/index.js +5 -0
- package/package.json +3 -1
- package/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.d.ts +2 -1
- package/serialization/resources/empathicVoice/resources/chat/types/SubscribeEvent.js +2 -0
- package/serialization/resources/empathicVoice/types/ChatMetadata.d.ts +15 -0
- package/serialization/resources/empathicVoice/types/ChatMetadata.js +36 -0
- package/serialization/resources/empathicVoice/types/ReturnChat.d.ts +1 -0
- package/serialization/resources/empathicVoice/types/ReturnChat.js +1 -0
- package/serialization/resources/empathicVoice/types/ReturnChatEvent.d.ts +1 -0
- package/serialization/resources/empathicVoice/types/ReturnChatEvent.js +1 -0
- package/serialization/resources/empathicVoice/types/ReturnChatGroup.d.ts +17 -0
- package/serialization/resources/empathicVoice/types/ReturnChatGroup.js +38 -0
- package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.d.ts +20 -0
- package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedChats.js +41 -0
- package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.d.ts +17 -0
- package/serialization/resources/empathicVoice/types/ReturnChatGroupPagedEvents.js +38 -0
- package/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.d.ts +1 -0
- package/serialization/resources/empathicVoice/types/ReturnChatPagedEvents.js +1 -0
- package/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.d.ts +15 -0
- package/serialization/resources/empathicVoice/types/ReturnPagedChatGroups.js +36 -0
- package/serialization/resources/empathicVoice/types/index.d.ts +5 -0
- package/serialization/resources/empathicVoice/types/index.js +5 -0
|
@@ -73,13 +73,14 @@ class Tools {
|
|
|
73
73
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
74
74
|
}
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "tools"),
|
|
76
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/tools"),
|
|
77
77
|
method: "GET",
|
|
78
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
78
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
queryParameters: _queryParams,
|
|
81
81
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
82
82
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
83
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
83
84
|
});
|
|
84
85
|
if (_response.ok) {
|
|
85
86
|
return yield serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
|
|
@@ -128,15 +129,16 @@ class Tools {
|
|
|
128
129
|
var _a, _b;
|
|
129
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
131
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
131
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "tools"),
|
|
132
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/evi/tools"),
|
|
132
133
|
method: "POST",
|
|
133
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
134
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
134
135
|
contentType: "application/json",
|
|
135
136
|
body: yield serializers.empathicVoice.PostedUserDefinedTool.jsonOrThrow(request, {
|
|
136
137
|
unrecognizedObjectKeys: "strip",
|
|
137
138
|
}),
|
|
138
139
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
139
140
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
141
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
140
142
|
});
|
|
141
143
|
if (_response.ok) {
|
|
142
144
|
return yield serializers.empathicVoice.tools.createTool.Response.parseOrThrow(_response.body, {
|
|
@@ -191,13 +193,14 @@ class Tools {
|
|
|
191
193
|
_queryParams["restrict_to_most_recent"] = restrictToMostRecent.toString();
|
|
192
194
|
}
|
|
193
195
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
194
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
196
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
195
197
|
method: "GET",
|
|
196
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
198
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
197
199
|
contentType: "application/json",
|
|
198
200
|
queryParameters: _queryParams,
|
|
199
201
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
200
202
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
203
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
204
|
});
|
|
202
205
|
if (_response.ok) {
|
|
203
206
|
return yield serializers.empathicVoice.ReturnPagedUserDefinedTools.parseOrThrow(_response.body, {
|
|
@@ -246,15 +249,16 @@ class Tools {
|
|
|
246
249
|
var _a, _b;
|
|
247
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
251
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
249
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
252
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
250
253
|
method: "POST",
|
|
251
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
254
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
252
255
|
contentType: "application/json",
|
|
253
256
|
body: yield serializers.empathicVoice.PostedUserDefinedToolVersion.jsonOrThrow(request, {
|
|
254
257
|
unrecognizedObjectKeys: "strip",
|
|
255
258
|
}),
|
|
256
259
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
257
260
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
261
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
262
|
});
|
|
259
263
|
if (_response.ok) {
|
|
260
264
|
return yield serializers.empathicVoice.tools.createToolVersion.Response.parseOrThrow(_response.body, {
|
|
@@ -297,12 +301,13 @@ class Tools {
|
|
|
297
301
|
var _a, _b;
|
|
298
302
|
return __awaiter(this, void 0, void 0, function* () {
|
|
299
303
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
300
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
304
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
301
305
|
method: "DELETE",
|
|
302
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
306
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
303
307
|
contentType: "application/json",
|
|
304
308
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
305
309
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
310
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
306
311
|
});
|
|
307
312
|
if (_response.ok) {
|
|
308
313
|
return;
|
|
@@ -342,9 +347,9 @@ class Tools {
|
|
|
342
347
|
var _a, _b;
|
|
343
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
349
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
345
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}`),
|
|
350
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}`),
|
|
346
351
|
method: "PATCH",
|
|
347
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
352
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
348
353
|
contentType: "application/json",
|
|
349
354
|
body: yield serializers.empathicVoice.PostedUserDefinedToolName.jsonOrThrow(request, {
|
|
350
355
|
unrecognizedObjectKeys: "strip",
|
|
@@ -352,6 +357,7 @@ class Tools {
|
|
|
352
357
|
responseType: "text",
|
|
353
358
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
354
359
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
360
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
355
361
|
});
|
|
356
362
|
if (_response.ok) {
|
|
357
363
|
return _response.body;
|
|
@@ -389,12 +395,13 @@ class Tools {
|
|
|
389
395
|
var _a, _b;
|
|
390
396
|
return __awaiter(this, void 0, void 0, function* () {
|
|
391
397
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
392
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
398
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
393
399
|
method: "GET",
|
|
394
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
400
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
395
401
|
contentType: "application/json",
|
|
396
402
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
397
403
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
404
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
398
405
|
});
|
|
399
406
|
if (_response.ok) {
|
|
400
407
|
return yield serializers.empathicVoice.tools.getToolVersion.Response.parseOrThrow(_response.body, {
|
|
@@ -438,12 +445,13 @@ class Tools {
|
|
|
438
445
|
var _a, _b;
|
|
439
446
|
return __awaiter(this, void 0, void 0, function* () {
|
|
440
447
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
441
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
448
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
442
449
|
method: "DELETE",
|
|
443
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
450
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
444
451
|
contentType: "application/json",
|
|
445
452
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
446
453
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
454
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
447
455
|
});
|
|
448
456
|
if (_response.ok) {
|
|
449
457
|
return;
|
|
@@ -484,15 +492,16 @@ class Tools {
|
|
|
484
492
|
var _a, _b;
|
|
485
493
|
return __awaiter(this, void 0, void 0, function* () {
|
|
486
494
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
487
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
495
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/evi/tools/${encodeURIComponent(id)}/version/${encodeURIComponent(version)}`),
|
|
488
496
|
method: "PATCH",
|
|
489
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
497
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
490
498
|
contentType: "application/json",
|
|
491
499
|
body: yield serializers.empathicVoice.PostedUserDefinedToolVersionDescription.jsonOrThrow(request, {
|
|
492
500
|
unrecognizedObjectKeys: "strip",
|
|
493
501
|
}),
|
|
494
502
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
495
503
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
504
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
496
505
|
});
|
|
497
506
|
if (_response.ok) {
|
|
498
507
|
return yield serializers.empathicVoice.tools.updateToolDescription.Response.parseOrThrow(_response.body, {
|
|
@@ -15,6 +15,6 @@ export interface AssistantMessage {
|
|
|
15
15
|
message: Hume.empathicVoice.ChatMessage;
|
|
16
16
|
/** Inference model results. */
|
|
17
17
|
models: Hume.empathicVoice.Inference;
|
|
18
|
-
/** The type of message sent through the socket; for an Assistant Message
|
|
18
|
+
/** The type of message sent through the socket; for an Assistant Message, this must be 'assistant_message'. */
|
|
19
19
|
type: "assistant_message";
|
|
20
20
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* When provided, the output is a chat metadata message.
|
|
6
|
+
*/
|
|
7
|
+
export interface ChatMetadata {
|
|
8
|
+
/** ID of the chat group. Used to resume a chat. */
|
|
9
|
+
chatGroupId: string;
|
|
10
|
+
/** ID of the chat. */
|
|
11
|
+
chatId: string;
|
|
12
|
+
customSessionId?: string;
|
|
13
|
+
/** The type of message sent through the socket; for a Chat Metadata message, this must be 'chat_metadata'. */
|
|
14
|
+
type: "chat_metadata";
|
|
15
|
+
}
|
|
@@ -8,6 +8,8 @@ import * as Hume from "../../../index";
|
|
|
8
8
|
export interface ReturnChat {
|
|
9
9
|
/** Identifier for a chat. Formatted as a UUID. */
|
|
10
10
|
id: string;
|
|
11
|
+
/** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */
|
|
12
|
+
chatGroupId: string;
|
|
11
13
|
/** Optional tag applied to this chat used to group chats by user, application, etc. */
|
|
12
14
|
tag?: string;
|
|
13
15
|
/** The status of the chat. Values from the ChatStatus enum. */
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
export interface ReturnChatEvent {
|
|
8
8
|
/** Identifier for a chat event. Formatted as a UUID. */
|
|
9
9
|
id: string;
|
|
10
|
+
/** Identifier for the chat this event occurred in. Formatted as a UUID. */
|
|
11
|
+
chatId: string;
|
|
10
12
|
/** The timestamp when the chat event occurred, formatted as a Unix epoch milliseconds. */
|
|
11
13
|
timestamp: number;
|
|
12
14
|
/** The role of the user who generated the chat event. Values from the Role enum. */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* A description of chat_group and its status
|
|
6
|
+
*/
|
|
7
|
+
export interface ReturnChatGroup {
|
|
8
|
+
/** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The timestamp when the first chat in this chat group started, formatted as a Unix epoch milliseconds. */
|
|
11
|
+
firstStartTimestamp: number;
|
|
12
|
+
/** The timestamp when the most recent chat in this chat group started, formatted as a Unix epoch milliseconds. */
|
|
13
|
+
mostRecentStartTimestamp: number;
|
|
14
|
+
/** The chat_id of the most recent chat in this chat group. Formatted as a UUID. */
|
|
15
|
+
mostRecentChatId?: string;
|
|
16
|
+
/** The total number of chats in this chat group. */
|
|
17
|
+
numChats: number;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Hume from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* A description of chat_group and its status with a paginated list of each chat in the chat_group
|
|
7
|
+
*/
|
|
8
|
+
export interface ReturnChatGroupPagedChats {
|
|
9
|
+
/** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The timestamp when the first chat in this chat group started, formatted as a Unix epoch milliseconds. */
|
|
12
|
+
firstStartTimestamp: number;
|
|
13
|
+
/** The timestamp when the most recent chat in this chat group started, formatted as a Unix epoch milliseconds. */
|
|
14
|
+
mostRecentStartTimestamp: number;
|
|
15
|
+
/** The total number of chats in this chat group. */
|
|
16
|
+
numChats: number;
|
|
17
|
+
/** The page number of the returned results. */
|
|
18
|
+
pageNumber: number;
|
|
19
|
+
/** The number of results returned per page. */
|
|
20
|
+
pageSize: number;
|
|
21
|
+
/** List of chats and their metadata returned for the specified page number and page size. */
|
|
22
|
+
chatsPage: Hume.empathicVoice.ReturnChat[];
|
|
23
|
+
active?: boolean;
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Hume from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* A paginated list of chat events that occurred across chats in this chat_group from the server
|
|
7
|
+
*/
|
|
8
|
+
export interface ReturnChatGroupPagedEvents {
|
|
9
|
+
/** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The page number of the returned results. */
|
|
12
|
+
pageNumber: number;
|
|
13
|
+
/** The number of results returned per page. */
|
|
14
|
+
pageSize: number;
|
|
15
|
+
/** The direction of the pagination (ASC or DESC). */
|
|
16
|
+
paginationDirection: string;
|
|
17
|
+
/** List of chat_events returned for the specified page number and page size. */
|
|
18
|
+
eventsPage: Hume.empathicVoice.ReturnChatEvent[];
|
|
19
|
+
}
|
|
@@ -8,6 +8,8 @@ import * as Hume from "../../../index";
|
|
|
8
8
|
export interface ReturnChatPagedEvents {
|
|
9
9
|
/** Identifier for a chat. Formatted as a UUID. */
|
|
10
10
|
id: string;
|
|
11
|
+
/** Identifier for the chat group. Any chat resumed from this chat will have the same chat_group_id. Formatted as a UUID. */
|
|
12
|
+
chatGroupId: string;
|
|
11
13
|
/** Optional tag applied to this chat used to group chats by user, application, etc. */
|
|
12
14
|
tag?: string;
|
|
13
15
|
/** The status of the chat. Values from the ChatStatus enum. */
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Hume from "../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* A paginated list of chat_groups returned from the server
|
|
7
|
+
*/
|
|
8
|
+
export interface ReturnPagedChatGroups {
|
|
9
|
+
/** The page number of the returned results. */
|
|
10
|
+
pageNumber: number;
|
|
11
|
+
/** The number of results returned per page. */
|
|
12
|
+
pageSize: number;
|
|
13
|
+
/** List of chat_groups and their metadata returned for the specified page number and page size. */
|
|
14
|
+
chatGroupsPage: Hume.empathicVoice.ReturnChatGroup[];
|
|
15
|
+
}
|
|
@@ -21,6 +21,10 @@ export * from "./ReturnChatEvent";
|
|
|
21
21
|
export * from "./ReturnChatPagedEvents";
|
|
22
22
|
export * from "./ReturnActiveChatCount";
|
|
23
23
|
export * from "./ReturnActiveChatCountPerTag";
|
|
24
|
+
export * from "./ReturnChatGroupPagedEvents";
|
|
25
|
+
export * from "./ReturnChatGroupPagedChats";
|
|
26
|
+
export * from "./ReturnChatGroup";
|
|
27
|
+
export * from "./ReturnPagedChatGroups";
|
|
24
28
|
export * from "./AssistantEnd";
|
|
25
29
|
export * from "./AssistantInput";
|
|
26
30
|
export * from "./AssistantMessage";
|
|
@@ -31,6 +35,7 @@ export * from "./BuiltInTool";
|
|
|
31
35
|
export * from "./BuiltinToolConfig";
|
|
32
36
|
export * from "./ChatMessageToolResult";
|
|
33
37
|
export * from "./ChatMessage";
|
|
38
|
+
export * from "./ChatMetadata";
|
|
34
39
|
export * from "./Context";
|
|
35
40
|
export * from "./ContextType";
|
|
36
41
|
export * from "./EmotionScores";
|
|
@@ -37,6 +37,10 @@ __exportStar(require("./ReturnChatEvent"), exports);
|
|
|
37
37
|
__exportStar(require("./ReturnChatPagedEvents"), exports);
|
|
38
38
|
__exportStar(require("./ReturnActiveChatCount"), exports);
|
|
39
39
|
__exportStar(require("./ReturnActiveChatCountPerTag"), exports);
|
|
40
|
+
__exportStar(require("./ReturnChatGroupPagedEvents"), exports);
|
|
41
|
+
__exportStar(require("./ReturnChatGroupPagedChats"), exports);
|
|
42
|
+
__exportStar(require("./ReturnChatGroup"), exports);
|
|
43
|
+
__exportStar(require("./ReturnPagedChatGroups"), exports);
|
|
40
44
|
__exportStar(require("./AssistantEnd"), exports);
|
|
41
45
|
__exportStar(require("./AssistantInput"), exports);
|
|
42
46
|
__exportStar(require("./AssistantMessage"), exports);
|
|
@@ -47,6 +51,7 @@ __exportStar(require("./BuiltInTool"), exports);
|
|
|
47
51
|
__exportStar(require("./BuiltinToolConfig"), exports);
|
|
48
52
|
__exportStar(require("./ChatMessageToolResult"), exports);
|
|
49
53
|
__exportStar(require("./ChatMessage"), exports);
|
|
54
|
+
__exportStar(require("./ChatMetadata"), exports);
|
|
50
55
|
__exportStar(require("./Context"), exports);
|
|
51
56
|
__exportStar(require("./ContextType"), exports);
|
|
52
57
|
__exportStar(require("./EmotionScores"), exports);
|
|
@@ -44,7 +44,6 @@ const core = __importStar(require("../../../../../../core"));
|
|
|
44
44
|
const url_join_1 = __importDefault(require("url-join"));
|
|
45
45
|
const serializers = __importStar(require("../../../../../../serialization/index"));
|
|
46
46
|
const errors = __importStar(require("../../../../../../errors/index"));
|
|
47
|
-
const form_data_1 = __importDefault(require("form-data"));
|
|
48
47
|
class Batch {
|
|
49
48
|
constructor(_options = {}) {
|
|
50
49
|
this._options = _options;
|
|
@@ -97,11 +96,12 @@ class Batch {
|
|
|
97
96
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
98
97
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs"),
|
|
99
98
|
method: "GET",
|
|
100
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
99
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
101
100
|
contentType: "application/json",
|
|
102
101
|
queryParameters: _queryParams,
|
|
103
102
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
104
103
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
104
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
105
105
|
});
|
|
106
106
|
if (_response.ok) {
|
|
107
107
|
return yield serializers.expressionMeasurement.batch.listJobs.Response.parseOrThrow(_response.body, {
|
|
@@ -151,13 +151,14 @@ class Batch {
|
|
|
151
151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
152
152
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs"),
|
|
153
153
|
method: "POST",
|
|
154
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
154
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
155
155
|
contentType: "application/json",
|
|
156
156
|
body: yield serializers.expressionMeasurement.InferenceBaseRequest.jsonOrThrow(request, {
|
|
157
157
|
unrecognizedObjectKeys: "strip",
|
|
158
158
|
}),
|
|
159
159
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
160
160
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
161
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
161
162
|
});
|
|
162
163
|
if (_response.ok) {
|
|
163
164
|
return yield serializers.expressionMeasurement.JobId.parseOrThrow(_response.body, {
|
|
@@ -204,10 +205,11 @@ class Batch {
|
|
|
204
205
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
205
206
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/batch/jobs/${encodeURIComponent(id)}`),
|
|
206
207
|
method: "GET",
|
|
207
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
208
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
208
209
|
contentType: "application/json",
|
|
209
210
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
210
211
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
212
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
213
|
});
|
|
212
214
|
if (_response.ok) {
|
|
213
215
|
return yield serializers.expressionMeasurement.UnionJob.parseOrThrow(_response.body, {
|
|
@@ -254,10 +256,11 @@ class Batch {
|
|
|
254
256
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
255
257
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/batch/jobs/${encodeURIComponent(id)}/predictions`),
|
|
256
258
|
method: "GET",
|
|
257
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
259
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
258
260
|
contentType: "application/json",
|
|
259
261
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
260
262
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
263
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
261
264
|
});
|
|
262
265
|
if (_response.ok) {
|
|
263
266
|
return yield serializers.expressionMeasurement.batch.getJobPredictions.Response.parseOrThrow(_response.body, {
|
|
@@ -298,11 +301,12 @@ class Batch {
|
|
|
298
301
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
299
302
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, `v0/batch/jobs/${encodeURIComponent(id)}/artifacts`),
|
|
300
303
|
method: "GET",
|
|
301
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
304
|
+
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
|
|
302
305
|
contentType: "application/json",
|
|
303
306
|
responseType: "streaming",
|
|
304
307
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
305
308
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
309
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
306
310
|
});
|
|
307
311
|
if (_response.ok) {
|
|
308
312
|
return _response.body;
|
|
@@ -341,21 +345,22 @@ class Batch {
|
|
|
341
345
|
startInferenceJobFromLocalFile(file, request, requestOptions) {
|
|
342
346
|
var _a, _b;
|
|
343
347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
344
|
-
const _request = new
|
|
348
|
+
const _request = new core.FormDataWrapper();
|
|
345
349
|
if (request.json != null) {
|
|
346
|
-
_request.append("json", JSON.stringify(request.json));
|
|
350
|
+
yield _request.append("json", JSON.stringify(request.json));
|
|
347
351
|
}
|
|
348
352
|
for (const _file of file) {
|
|
349
|
-
_request.append("file", _file);
|
|
353
|
+
yield _request.append("file", _file);
|
|
350
354
|
}
|
|
355
|
+
const _maybeEncodedRequest = _request.getRequest();
|
|
351
356
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
352
357
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.HumeEnvironment.Production, "v0/batch/jobs"),
|
|
353
358
|
method: "POST",
|
|
354
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.
|
|
355
|
-
|
|
356
|
-
body: _request,
|
|
359
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.6.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), (yield _maybeEncodedRequest.getHeaders())),
|
|
360
|
+
body: yield _maybeEncodedRequest.getBody(),
|
|
357
361
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
358
362
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
363
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
359
364
|
});
|
|
360
365
|
if (_response.ok) {
|
|
361
366
|
return yield serializers.expressionMeasurement.JobId.parseOrThrow(_response.body, {
|
|
@@ -11,6 +11,7 @@ export declare namespace Fetcher {
|
|
|
11
11
|
timeoutMs?: number;
|
|
12
12
|
maxRetries?: number;
|
|
13
13
|
withCredentials?: boolean;
|
|
14
|
+
abortSignal?: AbortSignal;
|
|
14
15
|
responseType?: "json" | "blob" | "streaming" | "text";
|
|
15
16
|
}
|
|
16
17
|
type Error = FailedStatusCodeError | NonJsonError | TimeoutError | UnknownError;
|