@wix/auto_sdk_ai-gateway_prompts 1.0.0 → 1.0.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/build/cjs/index.d.ts +484 -1
- package/build/cjs/index.js +196 -3
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -1
- package/build/cjs/index.typings.js +188 -3
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +466 -2
- package/build/cjs/meta.js +167 -3
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +484 -1
- package/build/es/index.mjs +194 -2
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -1
- package/build/es/index.typings.mjs +186 -2
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +466 -2
- package/build/es/meta.mjs +165 -2
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +15 -3
- package/build/internal/cjs/index.js +196 -3
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +494 -1
- package/build/internal/cjs/index.typings.js +188 -3
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +466 -2
- package/build/internal/cjs/meta.js +167 -3
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +15 -3
- package/build/internal/es/index.mjs +194 -2
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +494 -1
- package/build/internal/es/index.typings.mjs +186 -2
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +466 -2
- package/build/internal/es/meta.mjs +165 -2
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/meta.js
CHANGED
|
@@ -92,7 +92,8 @@ __export(meta_exports, {
|
|
|
92
92
|
V1ToolChoiceTypeOriginal: () => V1ToolChoiceType,
|
|
93
93
|
VideoGenModelOriginal: () => VideoGenModel,
|
|
94
94
|
VideoModelOriginal: () => VideoModel,
|
|
95
|
-
generateContentByPromptObject: () => generateContentByPromptObject2
|
|
95
|
+
generateContentByPromptObject: () => generateContentByPromptObject2,
|
|
96
|
+
generateTextByPromptObjectStreamed: () => generateTextByPromptObjectStreamed2
|
|
96
97
|
});
|
|
97
98
|
module.exports = __toCommonJS(meta_exports);
|
|
98
99
|
|
|
@@ -103,7 +104,14 @@ var import_bytes = require("@wix/sdk-runtime/transformations/bytes");
|
|
|
103
104
|
var import_transform_paths = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
104
105
|
var import_rest_modules = require("@wix/sdk-runtime/rest-modules");
|
|
105
106
|
function resolveWixApiInfraV1WixAiExternalGatewayUrl(opts) {
|
|
106
|
-
const domainToMappings = {
|
|
107
|
+
const domainToMappings = {
|
|
108
|
+
"www.wixapis.com": [
|
|
109
|
+
{
|
|
110
|
+
srcPath: "/ai-external-gateway-poc",
|
|
111
|
+
destPath: ""
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
};
|
|
107
115
|
return (0, import_rest_modules.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
108
116
|
}
|
|
109
117
|
var PACKAGE_NAME = "@wix/auto_sdk_ai-gateway_prompts";
|
|
@@ -403,6 +411,141 @@ function generateContentByPromptObject(payload) {
|
|
|
403
411
|
}
|
|
404
412
|
return __generateContentByPromptObject;
|
|
405
413
|
}
|
|
414
|
+
function generateTextByPromptObjectStreamed(payload) {
|
|
415
|
+
function __generateTextByPromptObjectStreamed({ host }) {
|
|
416
|
+
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
417
|
+
{
|
|
418
|
+
transformFn: import_float.transformSDKFloatToRESTFloat,
|
|
419
|
+
paths: [
|
|
420
|
+
{ path: "prompt.openAiChatCompletionRequest.temperature" },
|
|
421
|
+
{ path: "prompt.openAiChatCompletionRequest.topP" },
|
|
422
|
+
{ path: "prompt.openAiChatCompletionRequest.presencePenalty" },
|
|
423
|
+
{ path: "prompt.openAiChatCompletionRequest.frequencyPenalty" },
|
|
424
|
+
{ path: "prompt.googleTextBisonRequest.parameters.temperature" },
|
|
425
|
+
{ path: "prompt.googleTextBisonRequest.parameters.topP" },
|
|
426
|
+
{ path: "prompt.googleChatBisonRequest.parameters.temperature" },
|
|
427
|
+
{ path: "prompt.googleChatBisonRequest.parameters.topP" },
|
|
428
|
+
{ path: "prompt.azureChatCompletionRequest.temperature" },
|
|
429
|
+
{ path: "prompt.azureChatCompletionRequest.topP" },
|
|
430
|
+
{ path: "prompt.azureChatCompletionRequest.presencePenalty" },
|
|
431
|
+
{ path: "prompt.azureChatCompletionRequest.frequencyPenalty" },
|
|
432
|
+
{
|
|
433
|
+
path: "prompt.googleGeminiGenerateContentRequest.generationConfig.temperature"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
path: "prompt.googleGeminiGenerateContentRequest.generationConfig.topP"
|
|
437
|
+
},
|
|
438
|
+
{ path: "prompt.anthropicClaudeRequest.temperature" },
|
|
439
|
+
{ path: "prompt.anthropicClaudeRequest.topP" },
|
|
440
|
+
{ path: "prompt.googleAnthropicClaudeRequest.temperature" },
|
|
441
|
+
{ path: "prompt.googleAnthropicClaudeRequest.topP" },
|
|
442
|
+
{ path: "prompt.invokeAnthropicModelRequest.temperature" },
|
|
443
|
+
{ path: "prompt.invokeAnthropicModelRequest.topP" },
|
|
444
|
+
{ path: "prompt.stabilityAiTextToImageRequest.textPrompts.weight" },
|
|
445
|
+
{ path: "prompt.stabilityAiStableDiffusionRequest.strength" },
|
|
446
|
+
{
|
|
447
|
+
path: "prompt.blackForestLabsGenerateImageRequest.imagePromptStrength"
|
|
448
|
+
},
|
|
449
|
+
{ path: "prompt.replicateCreatePredictionRequest.fluxPulid.trueCfg" },
|
|
450
|
+
{
|
|
451
|
+
path: "prompt.replicateCreatePredictionRequest.fluxPulid.idWeight"
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
path: "prompt.replicateCreatePredictionRequest.fluxPulid.guidanceScale"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.loraStrength"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.guidanceScale"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.controlStrength"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
path: "prompt.replicateCreatePredictionRequest.fluxDevControlnet.imageToImageStrength"
|
|
467
|
+
},
|
|
468
|
+
{ path: "prompt.stabilityAiEditWithPromptRequest.creativity" },
|
|
469
|
+
{ path: "prompt.runwareTextToImageRequest.strength" },
|
|
470
|
+
{ path: "prompt.mlPlatformGenerateImageRequest.fluxPulid.trueCfg" },
|
|
471
|
+
{ path: "prompt.mlPlatformGenerateImageRequest.fluxPulid.idWeight" },
|
|
472
|
+
{
|
|
473
|
+
path: "prompt.mlPlatformGenerateImageRequest.fluxPulid.guidanceScale"
|
|
474
|
+
},
|
|
475
|
+
{ path: "prompt.googleCreateChatCompletionRequest.temperature" },
|
|
476
|
+
{ path: "prompt.googleCreateChatCompletionRequest.topP" },
|
|
477
|
+
{ path: "prompt.googleCreateChatCompletionRequest.presencePenalty" },
|
|
478
|
+
{ path: "prompt.googleCreateChatCompletionRequest.frequencyPenalty" },
|
|
479
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.temperature" },
|
|
480
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.topP" },
|
|
481
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.presencePenalty" },
|
|
482
|
+
{ path: "prompt.mlPlatformOpenAiRawRequest.frequencyPenalty" },
|
|
483
|
+
{ path: "prompt.openAiResponsesRequest.temperature" },
|
|
484
|
+
{ path: "prompt.openAiResponsesRequest.topP" },
|
|
485
|
+
{ path: "prompt.azureOpenAiResponsesRequest.temperature" },
|
|
486
|
+
{ path: "prompt.azureOpenAiResponsesRequest.topP" },
|
|
487
|
+
{ path: "prompt.llamaModelRequest.temperature" },
|
|
488
|
+
{ path: "prompt.llamaModelRequest.topP" },
|
|
489
|
+
{ path: "prompt.runwareTextToImageRequest.cfgScale" },
|
|
490
|
+
{ path: "prompt.runwareTextToImageRequest.loraModels.weight" },
|
|
491
|
+
{ path: "prompt.mlPlatformLlamaModelRequest.temperature" },
|
|
492
|
+
{ path: "prompt.mlPlatformLlamaModelRequest.topP" },
|
|
493
|
+
{ path: "prompt.perplexityChatCompletionRequest.temperature" },
|
|
494
|
+
{ path: "prompt.perplexityChatCompletionRequest.topP" },
|
|
495
|
+
{ path: "prompt.perplexityChatCompletionRequest.topK" },
|
|
496
|
+
{ path: "prompt.perplexityChatCompletionRequest.presencePenalty" },
|
|
497
|
+
{ path: "prompt.perplexityChatCompletionRequest.frequencyPenalty" },
|
|
498
|
+
{ path: "prompt.runwareVideoInferenceRequest.cfgScale" }
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
]);
|
|
502
|
+
const metadata = {
|
|
503
|
+
entityFqdn: "wix.api_infra.v1.prompt_proxy",
|
|
504
|
+
method: "POST",
|
|
505
|
+
methodFqn: "wix.api_infra.v1.WixAiExternalGateway.GenerateTextByPromptObjectStreamed",
|
|
506
|
+
packageName: PACKAGE_NAME,
|
|
507
|
+
migrationOptions: {
|
|
508
|
+
optInTransformResponse: true
|
|
509
|
+
},
|
|
510
|
+
url: resolveWixApiInfraV1WixAiExternalGatewayUrl({
|
|
511
|
+
protoPath: "/v1/generate-by-prompt-object-streamed",
|
|
512
|
+
data: serializedData,
|
|
513
|
+
host
|
|
514
|
+
}),
|
|
515
|
+
data: serializedData,
|
|
516
|
+
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
517
|
+
{
|
|
518
|
+
transformFn: import_float2.transformRESTFloatToSDKFloat,
|
|
519
|
+
paths: [
|
|
520
|
+
{
|
|
521
|
+
path: "googleGeminiStreamChunk.candidates.safetyRatings.probabilityScore"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
path: "googleGeminiStreamChunk.candidates.safetyRatings.severityScore"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
path: "googleGeminiStreamChunk.candidates.groundingMetadata.groundingSupports.confidenceScores",
|
|
528
|
+
isRepeated: true
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
path: "googleGeminiStreamChunk.candidates.groundingMetadata.retrievalMetadata.googleSearchDynamicRetrievalScore"
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
537
|
+
paths: [
|
|
538
|
+
{
|
|
539
|
+
path: "googleGeminiStreamChunk.candidates.groundingMetadata.searchEntryPoint.sdkBlob"
|
|
540
|
+
}
|
|
541
|
+
]
|
|
542
|
+
}
|
|
543
|
+
])
|
|
544
|
+
};
|
|
545
|
+
return metadata;
|
|
546
|
+
}
|
|
547
|
+
return __generateTextByPromptObjectStreamed;
|
|
548
|
+
}
|
|
406
549
|
|
|
407
550
|
// src/api-infra-v1-prompt-proxy-prompts.types.ts
|
|
408
551
|
var OpenaiproxyV1Model = /* @__PURE__ */ ((OpenaiproxyV1Model2) => {
|
|
@@ -1055,6 +1198,26 @@ function generateContentByPromptObject2() {
|
|
|
1055
1198
|
__originalResponseType: null
|
|
1056
1199
|
};
|
|
1057
1200
|
}
|
|
1201
|
+
function generateTextByPromptObjectStreamed2() {
|
|
1202
|
+
const payload = {};
|
|
1203
|
+
const getRequestOptions = generateTextByPromptObjectStreamed(
|
|
1204
|
+
payload
|
|
1205
|
+
);
|
|
1206
|
+
const getUrl = (context) => {
|
|
1207
|
+
const { url } = getRequestOptions(context);
|
|
1208
|
+
return url;
|
|
1209
|
+
};
|
|
1210
|
+
return {
|
|
1211
|
+
getUrl,
|
|
1212
|
+
httpMethod: "POST",
|
|
1213
|
+
path: "/v1/generate-by-prompt-object-streamed",
|
|
1214
|
+
pathParams: {},
|
|
1215
|
+
__requestType: null,
|
|
1216
|
+
__originalRequestType: null,
|
|
1217
|
+
__responseType: null,
|
|
1218
|
+
__originalResponseType: null
|
|
1219
|
+
};
|
|
1220
|
+
}
|
|
1058
1221
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1059
1222
|
0 && (module.exports = {
|
|
1060
1223
|
AnthropicModelOriginal,
|
|
@@ -1129,6 +1292,7 @@ function generateContentByPromptObject2() {
|
|
|
1129
1292
|
V1ToolChoiceTypeOriginal,
|
|
1130
1293
|
VideoGenModelOriginal,
|
|
1131
1294
|
VideoModelOriginal,
|
|
1132
|
-
generateContentByPromptObject
|
|
1295
|
+
generateContentByPromptObject,
|
|
1296
|
+
generateTextByPromptObjectStreamed
|
|
1133
1297
|
});
|
|
1134
1298
|
//# sourceMappingURL=meta.js.map
|