@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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +484 -1
  2. package/build/cjs/index.js +196 -3
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +1 -1
  5. package/build/cjs/index.typings.js +188 -3
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +466 -2
  8. package/build/cjs/meta.js +167 -3
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +484 -1
  11. package/build/es/index.mjs +194 -2
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +1 -1
  14. package/build/es/index.typings.mjs +186 -2
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +466 -2
  17. package/build/es/meta.mjs +165 -2
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +15 -3
  20. package/build/internal/cjs/index.js +196 -3
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +494 -1
  23. package/build/internal/cjs/index.typings.js +188 -3
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +466 -2
  26. package/build/internal/cjs/meta.js +167 -3
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +15 -3
  29. package/build/internal/es/index.mjs +194 -2
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +494 -1
  32. package/build/internal/es/index.typings.mjs +186 -2
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +466 -2
  35. package/build/internal/es/meta.mjs +165 -2
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +2 -2
@@ -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) => {
@@ -957,6 +1099,26 @@ function generateContentByPromptObject2() {
957
1099
  __originalResponseType: null
958
1100
  };
959
1101
  }
1102
+ function generateTextByPromptObjectStreamed2() {
1103
+ const payload = {};
1104
+ const getRequestOptions = generateTextByPromptObjectStreamed(
1105
+ payload
1106
+ );
1107
+ const getUrl = (context) => {
1108
+ const { url } = getRequestOptions(context);
1109
+ return url;
1110
+ };
1111
+ return {
1112
+ getUrl,
1113
+ httpMethod: "POST",
1114
+ path: "/v1/generate-by-prompt-object-streamed",
1115
+ pathParams: {},
1116
+ __requestType: null,
1117
+ __originalRequestType: null,
1118
+ __responseType: null,
1119
+ __originalResponseType: null
1120
+ };
1121
+ }
960
1122
  export {
961
1123
  AnthropicModel as AnthropicModelOriginal,
962
1124
  CacheControlType as CacheControlTypeOriginal,
@@ -1030,6 +1192,7 @@ export {
1030
1192
  V1ToolChoiceType as V1ToolChoiceTypeOriginal,
1031
1193
  VideoGenModel as VideoGenModelOriginal,
1032
1194
  VideoModel as VideoModelOriginal,
1033
- generateContentByPromptObject2 as generateContentByPromptObject
1195
+ generateContentByPromptObject2 as generateContentByPromptObject,
1196
+ generateTextByPromptObjectStreamed2 as generateTextByPromptObjectStreamed
1034
1197
  };
1035
1198
  //# sourceMappingURL=meta.mjs.map