@wix/auto_sdk_ai-gateway_prompts 1.0.0 → 1.0.2
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/build/cjs/index.d.ts +525 -4
- package/build/cjs/index.js +211 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +203 -8
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +507 -5
- package/build/cjs/meta.js +182 -8
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +525 -4
- package/build/es/index.mjs +208 -7
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +200 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +507 -5
- package/build/es/meta.mjs +179 -7
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +16 -4
- package/build/internal/cjs/index.js +211 -8
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +536 -5
- package/build/internal/cjs/index.typings.js +203 -8
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +507 -5
- package/build/internal/cjs/meta.js +182 -8
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +16 -4
- package/build/internal/es/index.mjs +208 -7
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +536 -5
- package/build/internal/es/index.typings.mjs +200 -7
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +507 -5
- package/build/internal/es/meta.mjs +179 -7
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/es/meta.mjs
CHANGED
|
@@ -5,7 +5,14 @@ import { transformRESTBytesToSDKBytes } from "@wix/sdk-runtime/transformations/b
|
|
|
5
5
|
import { transformPaths } from "@wix/sdk-runtime/transformations/transform-paths";
|
|
6
6
|
import { resolveUrl } from "@wix/sdk-runtime/rest-modules";
|
|
7
7
|
function resolveWixApiInfraV1WixAiExternalGatewayUrl(opts) {
|
|
8
|
-
const domainToMappings = {
|
|
8
|
+
const domainToMappings = {
|
|
9
|
+
"www.wixapis.com": [
|
|
10
|
+
{
|
|
11
|
+
srcPath: "/ai-external-gateway-poc",
|
|
12
|
+
destPath: ""
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
};
|
|
9
16
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
10
17
|
}
|
|
11
18
|
var PACKAGE_NAME = "@wix/auto_sdk_ai-gateway_prompts";
|
|
@@ -305,6 +312,141 @@ function generateContentByPromptObject(payload) {
|
|
|
305
312
|
}
|
|
306
313
|
return __generateContentByPromptObject;
|
|
307
314
|
}
|
|
315
|
+
function generateTextByPromptObjectStreamed(payload) {
|
|
316
|
+
function __generateTextByPromptObjectStreamed({ host }) {
|
|
317
|
+
const serializedData = transformPaths(payload, [
|
|
318
|
+
{
|
|
319
|
+
transformFn: transformSDKFloatToRESTFloat,
|
|
320
|
+
paths: [
|
|
321
|
+
{ path: "prompt.openAiChatCompletionRequest.temperature" },
|
|
322
|
+
{ path: "prompt.openAiChatCompletionRequest.topP" },
|
|
323
|
+
{ path: "prompt.openAiChatCompletionRequest.presencePenalty" },
|
|
324
|
+
{ path: "prompt.openAiChatCompletionRequest.frequencyPenalty" },
|
|
325
|
+
{ path: "prompt.googleTextBisonRequest.parameters.temperature" },
|
|
326
|
+
{ path: "prompt.googleTextBisonRequest.parameters.topP" },
|
|
327
|
+
{ path: "prompt.googleChatBisonRequest.parameters.temperature" },
|
|
328
|
+
{ path: "prompt.googleChatBisonRequest.parameters.topP" },
|
|
329
|
+
{ path: "prompt.azureChatCompletionRequest.temperature" },
|
|
330
|
+
{ path: "prompt.azureChatCompletionRequest.topP" },
|
|
331
|
+
{ path: "prompt.azureChatCompletionRequest.presencePenalty" },
|
|
332
|
+
{ path: "prompt.azureChatCompletionRequest.frequencyPenalty" },
|
|
333
|
+
{
|
|
334
|
+
path: "prompt.googleGeminiGenerateContentRequest.generationConfig.temperature"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
path: "prompt.googleGeminiGenerateContentRequest.generationConfig.topP"
|
|
338
|
+
},
|
|
339
|
+
{ path: "prompt.anthropicClaudeRequest.temperature" },
|
|
340
|
+
{ path: "prompt.anthropicClaudeRequest.topP" },
|
|
341
|
+
{ path: "prompt.googleAnthropicClaudeRequest.temperature" },
|
|
342
|
+
{ path: "prompt.googleAnthropicClaudeRequest.topP" },
|
|
343
|
+
{ path: "prompt.invokeAnthropicModelRequest.temperature" },
|
|
344
|
+
{ path: "prompt.invokeAnthropicModelRequest.topP" },
|
|
345
|
+
{ path: "prompt.stabilityAiTextToImageRequest.textPrompts.weight" },
|
|
346
|
+
{ path: "prompt.stabilityAiStableDiffusionRequest.strength" },
|
|
347
|
+
{
|
|
348
|
+
path: "prompt.blackForestLabsGenerateImageRequest.imagePromptStrength"
|
|
349
|
+
},
|
|
350
|
+
{ path: "prompt.replicateCreatePredictionRequest.fluxPulid.trueCfg" },
|
|
351
|
+
{
|
|
352
|
+
path: "prompt.replicateCreatePredictionRequest.fluxPulid.idWeight"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
path: "prompt.replicateCreatePredictionRequest.fluxPulid.guidanceScale"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.loraStrength"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.guidanceScale"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.controlStrength"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.imageToImageStrength"
|
|
368
|
+
},
|
|
369
|
+
{ path: "prompt.stabilityAiEditWithPromptRequest.creativity" },
|
|
370
|
+
{ path: "prompt.runwareTextToImageRequest.strength" },
|
|
371
|
+
{ path: "prompt.mlPlatformGenerateImageRequest.fluxPulid.trueCfg" },
|
|
372
|
+
{ path: "prompt.mlPlatformGenerateImageRequest.fluxPulid.idWeight" },
|
|
373
|
+
{
|
|
374
|
+
path: "prompt.mlPlatformGenerateImageRequest.fluxPulid.guidanceScale"
|
|
375
|
+
},
|
|
376
|
+
{ path: "prompt.googleCreateChatCompletionRequest.temperature" },
|
|
377
|
+
{ path: "prompt.googleCreateChatCompletionRequest.topP" },
|
|
378
|
+
{ path: "prompt.googleCreateChatCompletionRequest.presencePenalty" },
|
|
379
|
+
{ path: "prompt.googleCreateChatCompletionRequest.frequencyPenalty" },
|
|
380
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.temperature" },
|
|
381
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.topP" },
|
|
382
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.presencePenalty" },
|
|
383
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.frequencyPenalty" },
|
|
384
|
+
{ path: "prompt.openAiResponsesRequest.temperature" },
|
|
385
|
+
{ path: "prompt.openAiResponsesRequest.topP" },
|
|
386
|
+
{ path: "prompt.azureOpenAiResponsesRequest.temperature" },
|
|
387
|
+
{ path: "prompt.azureOpenAiResponsesRequest.topP" },
|
|
388
|
+
{ path: "prompt.llamaModelRequest.temperature" },
|
|
389
|
+
{ path: "prompt.llamaModelRequest.topP" },
|
|
390
|
+
{ path: "prompt.runwareTextToImageRequest.cfgScale" },
|
|
391
|
+
{ path: "prompt.runwareTextToImageRequest.loraModels.weight" },
|
|
392
|
+
{ path: "prompt.mlPlatformLlamaModelRequest.temperature" },
|
|
393
|
+
{ path: "prompt.mlPlatformLlamaModelRequest.topP" },
|
|
394
|
+
{ path: "prompt.perplexityChatCompletionRequest.temperature" },
|
|
395
|
+
{ path: "prompt.perplexityChatCompletionRequest.topP" },
|
|
396
|
+
{ path: "prompt.perplexityChatCompletionRequest.topK" },
|
|
397
|
+
{ path: "prompt.perplexityChatCompletionRequest.presencePenalty" },
|
|
398
|
+
{ path: "prompt.perplexityChatCompletionRequest.frequencyPenalty" },
|
|
399
|
+
{ path: "prompt.runwareVideoInferenceRequest.cfgScale" }
|
|
400
|
+
]
|
|
401
|
+
}
|
|
402
|
+
]);
|
|
403
|
+
const metadata = {
|
|
404
|
+
entityFqdn: "wix.api_infra.v1.prompt_proxy",
|
|
405
|
+
method: "POST",
|
|
406
|
+
methodFqn: "wix.api_infra.v1.WixAiExternalGateway.GenerateTextByPromptObjectStreamed",
|
|
407
|
+
packageName: PACKAGE_NAME,
|
|
408
|
+
migrationOptions: {
|
|
409
|
+
optInTransformResponse: true
|
|
410
|
+
},
|
|
411
|
+
url: resolveWixApiInfraV1WixAiExternalGatewayUrl({
|
|
412
|
+
protoPath: "/v1/generate-by-prompt-object-streamed",
|
|
413
|
+
data: serializedData,
|
|
414
|
+
host
|
|
415
|
+
}),
|
|
416
|
+
data: serializedData,
|
|
417
|
+
transformResponse: (payload2) => transformPaths(payload2, [
|
|
418
|
+
{
|
|
419
|
+
transformFn: transformRESTFloatToSDKFloat,
|
|
420
|
+
paths: [
|
|
421
|
+
{
|
|
422
|
+
path: "googleGeminiStreamChunk.candidates.safetyRatings.probabilityScore"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
path: "googleGeminiStreamChunk.candidates.safetyRatings.severityScore"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
path: "googleGeminiStreamChunk.candidates.groundingMetadata.groundingSupports.confidenceScores",
|
|
429
|
+
isRepeated: true
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
path: "googleGeminiStreamChunk.candidates.groundingMetadata.retrievalMetadata.googleSearchDynamicRetrievalScore"
|
|
433
|
+
}
|
|
434
|
+
]
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
transformFn: transformRESTBytesToSDKBytes,
|
|
438
|
+
paths: [
|
|
439
|
+
{
|
|
440
|
+
path: "googleGeminiStreamChunk.candidates.groundingMetadata.searchEntryPoint.sdkBlob"
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
])
|
|
445
|
+
};
|
|
446
|
+
return metadata;
|
|
447
|
+
}
|
|
448
|
+
return __generateTextByPromptObjectStreamed;
|
|
449
|
+
}
|
|
308
450
|
|
|
309
451
|
// src/api-infra-v1-prompt-proxy-prompts.types.ts
|
|
310
452
|
var OpenaiproxyV1Model = /* @__PURE__ */ ((OpenaiproxyV1Model2) => {
|
|
@@ -435,11 +577,11 @@ var Outcome = /* @__PURE__ */ ((Outcome2) => {
|
|
|
435
577
|
Outcome2["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
|
|
436
578
|
return Outcome2;
|
|
437
579
|
})(Outcome || {});
|
|
438
|
-
var
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
return
|
|
442
|
-
})(
|
|
580
|
+
var DynamicRetrievalConfigMode = /* @__PURE__ */ ((DynamicRetrievalConfigMode2) => {
|
|
581
|
+
DynamicRetrievalConfigMode2["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
582
|
+
DynamicRetrievalConfigMode2["MODE_DYNAMIC"] = "MODE_DYNAMIC";
|
|
583
|
+
return DynamicRetrievalConfigMode2;
|
|
584
|
+
})(DynamicRetrievalConfigMode || {});
|
|
443
585
|
var HarmCategory = /* @__PURE__ */ ((HarmCategory2) => {
|
|
444
586
|
HarmCategory2["UNKNOWN_CATEGORY"] = "UNKNOWN_CATEGORY";
|
|
445
587
|
HarmCategory2["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
@@ -463,6 +605,14 @@ var Modality = /* @__PURE__ */ ((Modality2) => {
|
|
|
463
605
|
Modality2["AUDIO"] = "AUDIO";
|
|
464
606
|
return Modality2;
|
|
465
607
|
})(Modality || {});
|
|
608
|
+
var Mode = /* @__PURE__ */ ((Mode2) => {
|
|
609
|
+
Mode2["UNKNOWN"] = "UNKNOWN";
|
|
610
|
+
Mode2["AUTO"] = "AUTO";
|
|
611
|
+
Mode2["ANY"] = "ANY";
|
|
612
|
+
Mode2["NONE"] = "NONE";
|
|
613
|
+
Mode2["VALIDATED"] = "VALIDATED";
|
|
614
|
+
return Mode2;
|
|
615
|
+
})(Mode || {});
|
|
466
616
|
var Type = /* @__PURE__ */ ((Type2) => {
|
|
467
617
|
Type2["UNKNOWN"] = "UNKNOWN";
|
|
468
618
|
Type2["EPHEMERAL"] = "EPHEMERAL";
|
|
@@ -957,6 +1107,26 @@ function generateContentByPromptObject2() {
|
|
|
957
1107
|
__originalResponseType: null
|
|
958
1108
|
};
|
|
959
1109
|
}
|
|
1110
|
+
function generateTextByPromptObjectStreamed2() {
|
|
1111
|
+
const payload = {};
|
|
1112
|
+
const getRequestOptions = generateTextByPromptObjectStreamed(
|
|
1113
|
+
payload
|
|
1114
|
+
);
|
|
1115
|
+
const getUrl = (context) => {
|
|
1116
|
+
const { url } = getRequestOptions(context);
|
|
1117
|
+
return url;
|
|
1118
|
+
};
|
|
1119
|
+
return {
|
|
1120
|
+
getUrl,
|
|
1121
|
+
httpMethod: "POST",
|
|
1122
|
+
path: "/v1/generate-by-prompt-object-streamed",
|
|
1123
|
+
pathParams: {},
|
|
1124
|
+
__requestType: null,
|
|
1125
|
+
__originalRequestType: null,
|
|
1126
|
+
__responseType: null,
|
|
1127
|
+
__originalResponseType: null
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
960
1130
|
export {
|
|
961
1131
|
AnthropicModel as AnthropicModelOriginal,
|
|
962
1132
|
CacheControlType as CacheControlTypeOriginal,
|
|
@@ -967,6 +1137,7 @@ export {
|
|
|
967
1137
|
ClipGuidancePreset as ClipGuidancePresetOriginal,
|
|
968
1138
|
ContentRole as ContentRoleOriginal,
|
|
969
1139
|
CreatePredictionModel as CreatePredictionModelOriginal,
|
|
1140
|
+
DynamicRetrievalConfigMode as DynamicRetrievalConfigModeOriginal,
|
|
970
1141
|
EditImageWithPromptRequestModel as EditImageWithPromptRequestModelOriginal,
|
|
971
1142
|
FinishReason as FinishReasonOriginal,
|
|
972
1143
|
GatewayMessageDefinitionRole as GatewayMessageDefinitionRoleOriginal,
|
|
@@ -1030,6 +1201,7 @@ export {
|
|
|
1030
1201
|
V1ToolChoiceType as V1ToolChoiceTypeOriginal,
|
|
1031
1202
|
VideoGenModel as VideoGenModelOriginal,
|
|
1032
1203
|
VideoModel as VideoModelOriginal,
|
|
1033
|
-
generateContentByPromptObject2 as generateContentByPromptObject
|
|
1204
|
+
generateContentByPromptObject2 as generateContentByPromptObject,
|
|
1205
|
+
generateTextByPromptObjectStreamed2 as generateTextByPromptObjectStreamed
|
|
1034
1206
|
};
|
|
1035
1207
|
//# sourceMappingURL=meta.mjs.map
|