@azure-rest/ai-inference 1.0.0-beta.1 → 1.0.0-beta.3

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 (181) hide show
  1. package/README.md +123 -4
  2. package/dist/browser/clientDefinitions.d.ts +20 -2
  3. package/dist/browser/clientDefinitions.d.ts.map +1 -1
  4. package/dist/browser/clientDefinitions.js +1 -1
  5. package/dist/browser/clientDefinitions.js.map +1 -1
  6. package/dist/browser/constants.d.ts +2 -0
  7. package/dist/browser/constants.d.ts.map +1 -0
  8. package/dist/browser/constants.js +4 -0
  9. package/dist/browser/constants.js.map +1 -0
  10. package/dist/browser/index.js +1 -1
  11. package/dist/browser/index.js.map +1 -1
  12. package/dist/browser/isUnexpected.d.ts +3 -1
  13. package/dist/browser/isUnexpected.d.ts.map +1 -1
  14. package/dist/browser/isUnexpected.js +4 -3
  15. package/dist/browser/isUnexpected.js.map +1 -1
  16. package/dist/browser/logger.js +1 -1
  17. package/dist/browser/logger.js.map +1 -1
  18. package/dist/browser/modelClient.d.ts +6 -1
  19. package/dist/browser/modelClient.d.ts.map +1 -1
  20. package/dist/browser/modelClient.js +28 -7
  21. package/dist/browser/modelClient.js.map +1 -1
  22. package/dist/browser/models.d.ts +54 -39
  23. package/dist/browser/models.d.ts.map +1 -1
  24. package/dist/browser/models.js +1 -1
  25. package/dist/browser/models.js.map +1 -1
  26. package/dist/browser/outputModels.d.ts +48 -22
  27. package/dist/browser/outputModels.d.ts.map +1 -1
  28. package/dist/browser/outputModels.js +1 -1
  29. package/dist/browser/outputModels.js.map +1 -1
  30. package/dist/browser/parameters.d.ts +53 -4
  31. package/dist/browser/parameters.d.ts.map +1 -1
  32. package/dist/browser/parameters.js +1 -1
  33. package/dist/browser/parameters.js.map +1 -1
  34. package/dist/browser/responses.d.ts +29 -1
  35. package/dist/browser/responses.d.ts.map +1 -1
  36. package/dist/browser/responses.js +1 -1
  37. package/dist/browser/responses.js.map +1 -1
  38. package/dist/browser/tracingHelper.d.ts +9 -0
  39. package/dist/browser/tracingHelper.d.ts.map +1 -0
  40. package/dist/browser/tracingHelper.js +198 -0
  41. package/dist/browser/tracingHelper.js.map +1 -0
  42. package/dist/browser/tracingPolicy.d.ts +12 -0
  43. package/dist/browser/tracingPolicy.d.ts.map +1 -0
  44. package/dist/browser/tracingPolicy.js +68 -0
  45. package/dist/browser/tracingPolicy.js.map +1 -0
  46. package/dist/commonjs/clientDefinitions.d.ts +20 -2
  47. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  48. package/dist/commonjs/clientDefinitions.js +1 -1
  49. package/dist/commonjs/clientDefinitions.js.map +1 -1
  50. package/dist/commonjs/constants.d.ts +2 -0
  51. package/dist/commonjs/constants.d.ts.map +1 -0
  52. package/dist/commonjs/constants.js +7 -0
  53. package/dist/commonjs/constants.js.map +1 -0
  54. package/dist/commonjs/index.js +1 -1
  55. package/dist/commonjs/index.js.map +1 -1
  56. package/dist/commonjs/isUnexpected.d.ts +3 -1
  57. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  58. package/dist/commonjs/isUnexpected.js +5 -5
  59. package/dist/commonjs/isUnexpected.js.map +1 -1
  60. package/dist/commonjs/logger.js +1 -1
  61. package/dist/commonjs/logger.js.map +1 -1
  62. package/dist/commonjs/modelClient.d.ts +6 -1
  63. package/dist/commonjs/modelClient.d.ts.map +1 -1
  64. package/dist/commonjs/modelClient.js +28 -7
  65. package/dist/commonjs/modelClient.js.map +1 -1
  66. package/dist/commonjs/models.d.ts +54 -39
  67. package/dist/commonjs/models.d.ts.map +1 -1
  68. package/dist/commonjs/models.js +1 -1
  69. package/dist/commonjs/models.js.map +1 -1
  70. package/dist/commonjs/outputModels.d.ts +48 -22
  71. package/dist/commonjs/outputModels.d.ts.map +1 -1
  72. package/dist/commonjs/outputModels.js +1 -1
  73. package/dist/commonjs/outputModels.js.map +1 -1
  74. package/dist/commonjs/parameters.d.ts +53 -4
  75. package/dist/commonjs/parameters.d.ts.map +1 -1
  76. package/dist/commonjs/parameters.js +1 -1
  77. package/dist/commonjs/parameters.js.map +1 -1
  78. package/dist/commonjs/responses.d.ts +29 -1
  79. package/dist/commonjs/responses.d.ts.map +1 -1
  80. package/dist/commonjs/responses.js +1 -1
  81. package/dist/commonjs/responses.js.map +1 -1
  82. package/dist/commonjs/tracingHelper.d.ts +9 -0
  83. package/dist/commonjs/tracingHelper.d.ts.map +1 -0
  84. package/dist/commonjs/tracingHelper.js +205 -0
  85. package/dist/commonjs/tracingHelper.js.map +1 -0
  86. package/dist/commonjs/tracingPolicy.d.ts +12 -0
  87. package/dist/commonjs/tracingPolicy.d.ts.map +1 -0
  88. package/dist/commonjs/tracingPolicy.js +72 -0
  89. package/dist/commonjs/tracingPolicy.js.map +1 -0
  90. package/dist/commonjs/tsdoc-metadata.json +1 -1
  91. package/dist/esm/clientDefinitions.d.ts +20 -2
  92. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  93. package/dist/esm/clientDefinitions.js +1 -1
  94. package/dist/esm/clientDefinitions.js.map +1 -1
  95. package/dist/esm/constants.d.ts +2 -0
  96. package/dist/esm/constants.d.ts.map +1 -0
  97. package/dist/esm/constants.js +4 -0
  98. package/dist/esm/constants.js.map +1 -0
  99. package/dist/esm/index.js +1 -1
  100. package/dist/esm/index.js.map +1 -1
  101. package/dist/esm/isUnexpected.d.ts +3 -1
  102. package/dist/esm/isUnexpected.d.ts.map +1 -1
  103. package/dist/esm/isUnexpected.js +4 -3
  104. package/dist/esm/isUnexpected.js.map +1 -1
  105. package/dist/esm/logger.js +1 -1
  106. package/dist/esm/logger.js.map +1 -1
  107. package/dist/esm/modelClient.d.ts +6 -1
  108. package/dist/esm/modelClient.d.ts.map +1 -1
  109. package/dist/esm/modelClient.js +28 -7
  110. package/dist/esm/modelClient.js.map +1 -1
  111. package/dist/esm/models.d.ts +54 -39
  112. package/dist/esm/models.d.ts.map +1 -1
  113. package/dist/esm/models.js +1 -1
  114. package/dist/esm/models.js.map +1 -1
  115. package/dist/esm/outputModels.d.ts +48 -22
  116. package/dist/esm/outputModels.d.ts.map +1 -1
  117. package/dist/esm/outputModels.js +1 -1
  118. package/dist/esm/outputModels.js.map +1 -1
  119. package/dist/esm/parameters.d.ts +53 -4
  120. package/dist/esm/parameters.d.ts.map +1 -1
  121. package/dist/esm/parameters.js +1 -1
  122. package/dist/esm/parameters.js.map +1 -1
  123. package/dist/esm/responses.d.ts +29 -1
  124. package/dist/esm/responses.d.ts.map +1 -1
  125. package/dist/esm/responses.js +1 -1
  126. package/dist/esm/responses.js.map +1 -1
  127. package/dist/esm/tracingHelper.d.ts +9 -0
  128. package/dist/esm/tracingHelper.d.ts.map +1 -0
  129. package/dist/esm/tracingHelper.js +198 -0
  130. package/dist/esm/tracingHelper.js.map +1 -0
  131. package/dist/esm/tracingPolicy.d.ts +12 -0
  132. package/dist/esm/tracingPolicy.d.ts.map +1 -0
  133. package/dist/esm/tracingPolicy.js +68 -0
  134. package/dist/esm/tracingPolicy.js.map +1 -0
  135. package/dist/react-native/clientDefinitions.d.ts +20 -2
  136. package/dist/react-native/clientDefinitions.d.ts.map +1 -1
  137. package/dist/react-native/clientDefinitions.js +1 -1
  138. package/dist/react-native/clientDefinitions.js.map +1 -1
  139. package/dist/react-native/constants.d.ts +2 -0
  140. package/dist/react-native/constants.d.ts.map +1 -0
  141. package/dist/react-native/constants.js +4 -0
  142. package/dist/react-native/constants.js.map +1 -0
  143. package/dist/react-native/index.js +1 -1
  144. package/dist/react-native/index.js.map +1 -1
  145. package/dist/react-native/isUnexpected.d.ts +3 -1
  146. package/dist/react-native/isUnexpected.d.ts.map +1 -1
  147. package/dist/react-native/isUnexpected.js +4 -3
  148. package/dist/react-native/isUnexpected.js.map +1 -1
  149. package/dist/react-native/logger.js +1 -1
  150. package/dist/react-native/logger.js.map +1 -1
  151. package/dist/react-native/modelClient.d.ts +6 -1
  152. package/dist/react-native/modelClient.d.ts.map +1 -1
  153. package/dist/react-native/modelClient.js +28 -7
  154. package/dist/react-native/modelClient.js.map +1 -1
  155. package/dist/react-native/models.d.ts +54 -39
  156. package/dist/react-native/models.d.ts.map +1 -1
  157. package/dist/react-native/models.js +1 -1
  158. package/dist/react-native/models.js.map +1 -1
  159. package/dist/react-native/outputModels.d.ts +48 -22
  160. package/dist/react-native/outputModels.d.ts.map +1 -1
  161. package/dist/react-native/outputModels.js +1 -1
  162. package/dist/react-native/outputModels.js.map +1 -1
  163. package/dist/react-native/parameters.d.ts +53 -4
  164. package/dist/react-native/parameters.d.ts.map +1 -1
  165. package/dist/react-native/parameters.js +1 -1
  166. package/dist/react-native/parameters.js.map +1 -1
  167. package/dist/react-native/responses.d.ts +29 -1
  168. package/dist/react-native/responses.d.ts.map +1 -1
  169. package/dist/react-native/responses.js +1 -1
  170. package/dist/react-native/responses.js.map +1 -1
  171. package/dist/react-native/tracingHelper.d.ts +9 -0
  172. package/dist/react-native/tracingHelper.d.ts.map +1 -0
  173. package/dist/react-native/tracingHelper.js +198 -0
  174. package/dist/react-native/tracingHelper.js.map +1 -0
  175. package/dist/react-native/tracingPolicy.d.ts +12 -0
  176. package/dist/react-native/tracingPolicy.d.ts.map +1 -0
  177. package/dist/react-native/tracingPolicy.js +68 -0
  178. package/dist/react-native/tracingPolicy.js.map +1 -0
  179. package/package.json +26 -28
  180. package/CHANGELOG.md +0 -6
  181. package/review/ai-inference.api.md +0 -343
package/README.md CHANGED
@@ -223,7 +223,7 @@ async function main(){
223
223
  }
224
224
  for (const choice of response.body.choices) {
225
225
  const completion = choice.message.content;
226
- console.log(`Input: ${examplePrompts[promptIndex++]}`);
226
+ console.log(`Input: ${messages[promptIndex++].content}`);
227
227
  console.log(`Chatbot: ${completion}`);
228
228
  }
229
229
  }
@@ -251,7 +251,7 @@ async function main(){
251
251
  ""As a layman I would say: 'I think we have it'. Would you agree?"" Rolf-Dieter Heuer, CERN's director-general, asked the packed auditorium. The physicists assembled there burst into applause.
252
252
  :`;
253
253
 
254
- const summarizationPrompt = [`
254
+ const summarizationPrompt = `
255
255
  Summarize the following text.
256
256
 
257
257
  Text:
@@ -260,7 +260,7 @@ async function main(){
260
260
  """"""
261
261
 
262
262
  Summary:
263
- `];
263
+ `;
264
264
 
265
265
  console.log(`Input: ${summarizationPrompt}`);
266
266
 
@@ -354,7 +354,7 @@ context -- including the original system and user messages, the response from th
354
354
  calls, and the tool messages that resolved each of those tools -- when making a subsequent request.
355
355
 
356
356
  ```js
357
- const choice = result.choices[0];
357
+ const choice = result.body.choices[0];
358
358
  const responseMessage = choice.message;
359
359
  if (responseMessage?.role === "assistant") {
360
360
  const requestedToolCalls = responseMessage?.toolCalls;
@@ -404,6 +404,125 @@ const response = await client.path("/chat/completions").post({
404
404
  console.log(`Chatbot: ${response.choices[0].message?.content}`);
405
405
  ```
406
406
 
407
+ ### Text Embeddings example
408
+
409
+ This example demonstrates how to get text embeddings with Entra ID authentication.
410
+
411
+ ```javascript
412
+ import ModelClient, { isUnexpected } from "@azure-rest/ai-inference";
413
+ import { DefaultAzureCredential } from "@azure/identity";
414
+
415
+ const endpoint = "<your_model_endpoint>";
416
+ const credential = new DefaultAzureCredential();
417
+
418
+ async function main(){
419
+ const client = ModelClient(endpoint, credential);
420
+ const response = await client.path("/embeddings").post({
421
+ body: {
422
+ input: ["first phrase", "second phrase", "third phrase"]
423
+ }
424
+ });
425
+
426
+ if (isUnexpected(response)) {
427
+ throw response.body.error;
428
+ }
429
+ for (const data of response.body.data) {
430
+ console.log(`data length: ${data.length}, [${data[0]}, ${data[1]}, ..., ${data[data.length - 2]}, ${data[data.length - 1]}]`);
431
+ }
432
+ }
433
+
434
+ main().catch((err) => {
435
+ console.error("The sample encountered an error:", err);
436
+ });
437
+ ```
438
+
439
+ The length of the embedding vector depends on the model, but you should see something like this:
440
+
441
+ ```text
442
+ data: length=1024, [0.0013399124, -0.01576233, ..., 0.007843018, 0.000238657]
443
+ data: length=1024, [0.036590576, -0.0059547424, ..., 0.011405945, 0.004863739]
444
+ data: length=1024, [0.04196167, 0.029083252, ..., -0.0027484894, 0.0073127747]
445
+ ```
446
+
447
+ To generate embeddings for additional phrases, simply call `client.path("/embeddings").post` multiple times using the same `client`.
448
+
449
+ ### Instrumentation
450
+ Currently instrumentation is only supported for `Chat Completion without streaming`.
451
+ To enable instrumentation, it is required to register exporter(s).
452
+
453
+ Here is an example to add console as a exporter:
454
+ ```js
455
+ import { ConsoleSpanExporter, NodeTracerProvider, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";
456
+
457
+ const provider = new NodeTracerProvider();
458
+ provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
459
+ provider.register();
460
+
461
+ ```
462
+
463
+ Here is an example to add application insight to be a exporter:
464
+
465
+ ```js
466
+ import { NodeTracerProvider, SimpleSpanProcessor } from "@opentelemetry/sdk-trace-node";
467
+ import { AzureMonitorTraceExporter } from "@azure/monitor-opentelemetry-exporter";
468
+
469
+ // provide a connection string
470
+ const connectionString = "<connection string>";
471
+
472
+ const provider = new NodeTracerProvider();
473
+ if (connectionString) {
474
+ const exporter = new AzureMonitorTraceExporter({ connectionString });
475
+ provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
476
+ }
477
+ provider.register();
478
+ ```
479
+
480
+ In addition, you need to register to use instrumentation for Azure SDK. You must do this before you import any dependency of `@azure-core-tracing`
481
+
482
+ ```js
483
+ import { registerInstrumentations } from "@opentelemetry/instrumentation";
484
+ import { createAzureSdkInstrumentation } from "@azure/opentelemetry-instrumentation-azure-sdk";
485
+
486
+ registerInstrumentations({
487
+ instrumentations: [createAzureSdkInstrumentation()],
488
+ });
489
+ ```
490
+
491
+ Finally when you are making a call for chat completion, you need to include
492
+ ```js
493
+ tracingOptions: { tracingContext: context.active() }
494
+ ```
495
+ Here is an example:
496
+
497
+ ```js
498
+ import { context } from "@opentelemetry/api";
499
+ client.path("/chat/completions").post({
500
+ body: {...},
501
+ tracingOptions: { tracingContext: context.active() }
502
+ });
503
+ ```
504
+
505
+ ### Tracing Your Own Functions
506
+ Open Telemetry provides `startActiveSpan` to instrument you own code. Here is an example:
507
+
508
+ ```js
509
+ import { trace } from "@opentelemetry/api";
510
+ const tracer = trace.getTracer("sample", "0.1.0");
511
+
512
+ const getWeatherFunc = (location: string, unit: string): string => {
513
+ return tracer.startActiveSpan("getWeatherFunc", span => {
514
+ if (unit !== "celsius") {
515
+ unit = "fahrenheit";
516
+ }
517
+ const result = `The temperature in ${location} is 72 degrees ${unit}`;
518
+ span.setAttribute("result", result);
519
+ span.end();
520
+ return result;
521
+ });
522
+ }
523
+ ```
524
+
525
+
407
526
  ## Troubleshooting
408
527
 
409
528
  ### Logging
@@ -1,5 +1,5 @@
1
- import { GetChatCompletionsParameters, GetModelInfoParameters } from "./parameters.js";
2
- import { GetChatCompletions200Response, GetChatCompletionsDefaultResponse, GetModelInfo200Response, GetModelInfoDefaultResponse } from "./responses.js";
1
+ import { GetChatCompletionsParameters, GetModelInfoParameters, GetEmbeddingsParameters, GetImageEmbeddingsParameters } from "./parameters.js";
2
+ import { GetChatCompletions200Response, GetChatCompletionsDefaultResponse, GetModelInfo200Response, GetModelInfoDefaultResponse, GetEmbeddings200Response, GetEmbeddingsDefaultResponse, GetImageEmbeddings200Response, GetImageEmbeddingsDefaultResponse } from "./responses.js";
3
3
  import { Client, StreamableMethod } from "@azure-rest/core-client";
4
4
  export interface GetChatCompletions {
5
5
  /**
@@ -17,11 +17,29 @@ export interface GetModelInfo {
17
17
  */
18
18
  get(options?: GetModelInfoParameters): StreamableMethod<GetModelInfo200Response | GetModelInfoDefaultResponse>;
19
19
  }
20
+ export interface GetEmbeddings {
21
+ /**
22
+ * Return the embedding vectors for given text prompts.
23
+ * The method makes a REST API call to the `/embeddings` route on the given endpoint.
24
+ */
25
+ post(options?: GetEmbeddingsParameters): StreamableMethod<GetEmbeddings200Response | GetEmbeddingsDefaultResponse>;
26
+ }
27
+ export interface GetImageEmbeddings {
28
+ /**
29
+ * Return the embedding vectors for given images.
30
+ * The method makes a REST API call to the `/images/embeddings` route on the given endpoint.
31
+ */
32
+ post(options?: GetImageEmbeddingsParameters): StreamableMethod<GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse>;
33
+ }
20
34
  export interface Routes {
21
35
  /** Resource for '/chat/completions' has methods for the following verbs: post */
22
36
  (path: "/chat/completions"): GetChatCompletions;
23
37
  /** Resource for '/info' has methods for the following verbs: get */
24
38
  (path: "/info"): GetModelInfo;
39
+ /** Resource for '/embeddings' has methods for the following verbs: post */
40
+ (path: "/embeddings"): GetEmbeddings;
41
+ /** Resource for '/images/embeddings' has methods for the following verbs: post */
42
+ (path: "/images/embeddings"): GetImageEmbeddings;
25
43
  }
26
44
  export type ModelClient = Client & {
27
45
  path: Routes;
@@ -1 +1 @@
1
- {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,4BAA4B,GACrC,gBAAgB,CACjB,6BAA6B,GAAG,iCAAiC,CAClE,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,GAAG,CACD,OAAO,CAAC,EAAE,sBAAsB,GAC/B,gBAAgB,CAAC,uBAAuB,GAAG,2BAA2B,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,MAAM;IACrB,iFAAiF;IACjF,CAAC,IAAI,EAAE,mBAAmB,GAAG,kBAAkB,CAAC;IAChD,oEAAoE;IACpE,CAAC,IAAI,EAAE,OAAO,GAAG,YAAY,CAAC;CAC/B;AAED,MAAM,MAAM,W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,EAAE,aAAa,GAAG,aAAa,CAAC;IACrC,kFAAkF;IAClF,CAAC,IAAI,EAAE,oBAAoB,GAAG,kBAAkB,CAAC;CAClD;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=clientDefinitions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n GetChatCompletionsParameters,\n GetModelInfoParameters,\n} from \"./parameters.js\";\nimport {\n GetChatCompletions200Response,\n GetChatCompletionsDefaultResponse,\n GetModelInfo200Response,\n GetModelInfoDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetChatCompletions {\n /**\n * Gets chat completions for the provided chat messages.\n * Completions support a wide variety of tasks and generate text that continues from or \"completes\"\n * provided prompt data. The method makes a REST API call to the `/chat/completions` route\n * on the given endpoint.\n */\n post(\n options?: GetChatCompletionsParameters,\n ): StreamableMethod<\n GetChatCompletions200Response | GetChatCompletionsDefaultResponse\n >;\n}\n\nexport interface GetModelInfo {\n /**\n * Returns information about the AI model.\n * The method makes a REST API call to the `/info` route on the given endpoint.\n */\n get(\n options?: GetModelInfoParameters,\n ): StreamableMethod<GetModelInfo200Response | GetModelInfoDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/chat/completions' has methods for the following verbs: post */\n (path: \"/chat/completions\"): GetChatCompletions;\n /** Resource for '/info' has methods for the following verbs: get */\n (path: \"/info\"): GetModelInfo;\n}\n\nexport type ModelClient = Client & {\n path: Routes;\n};\n"]}
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetChatCompletionsParameters,\n GetModelInfoParameters,\n GetEmbeddingsParameters,\n GetImageEmbeddingsParameters,\n} from \"./parameters.js\";\nimport {\n GetChatCompletions200Response,\n GetChatCompletionsDefaultResponse,\n GetModelInfo200Response,\n GetModelInfoDefaultResponse,\n GetEmbeddings200Response,\n GetEmbeddingsDefaultResponse,\n GetImageEmbeddings200Response,\n GetImageEmbeddingsDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetChatCompletions {\n /**\n * Gets chat completions for the provided chat messages.\n * Completions support a wide variety of tasks and generate text that continues from or \"completes\"\n * provided prompt data. The method makes a REST API call to the `/chat/completions` route\n * on the given endpoint.\n */\n post(\n options?: GetChatCompletionsParameters,\n ): StreamableMethod<GetChatCompletions200Response | GetChatCompletionsDefaultResponse>;\n}\n\nexport interface GetModelInfo {\n /**\n * Returns information about the AI model.\n * The method makes a REST API call to the `/info` route on the given endpoint.\n */\n get(\n options?: GetModelInfoParameters,\n ): StreamableMethod<GetModelInfo200Response | GetModelInfoDefaultResponse>;\n}\n\nexport interface GetEmbeddings {\n /**\n * Return the embedding vectors for given text prompts.\n * The method makes a REST API call to the `/embeddings` route on the given endpoint.\n */\n post(\n options?: GetEmbeddingsParameters,\n ): StreamableMethod<GetEmbeddings200Response | GetEmbeddingsDefaultResponse>;\n}\n\nexport interface GetImageEmbeddings {\n /**\n * Return the embedding vectors for given images.\n * The method makes a REST API call to the `/images/embeddings` route on the given endpoint.\n */\n post(\n options?: GetImageEmbeddingsParameters,\n ): StreamableMethod<GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/chat/completions' has methods for the following verbs: post */\n (path: \"/chat/completions\"): GetChatCompletions;\n /** Resource for '/info' has methods for the following verbs: get */\n (path: \"/info\"): GetModelInfo;\n /** Resource for '/embeddings' has methods for the following verbs: post */\n (path: \"/embeddings\"): GetEmbeddings;\n /** Resource for '/images/embeddings' has methods for the following verbs: post */\n (path: \"/images/embeddings\"): GetImageEmbeddings;\n}\n\nexport type ModelClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const SDK_VERSION: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export const SDK_VERSION = "1.0.0-beta.3";
4
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,cAAc,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.0.0-beta.3\";\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import ModelClient from "./modelClient.js";
4
4
  export * from "./modelClient.js";
5
5
  export * from "./parameters.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,eAAe,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport ModelClient from \"./modelClient.js\";\n\nexport * from \"./modelClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\n\nexport default ModelClient;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAE3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,eAAe,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport ModelClient from \"./modelClient.js\";\n\nexport * from \"./modelClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\n\nexport default ModelClient;\n"]}
@@ -1,4 +1,6 @@
1
- import { GetChatCompletions200Response, GetChatCompletionsDefaultResponse, GetModelInfo200Response, GetModelInfoDefaultResponse } from "./responses.js";
1
+ import { GetChatCompletions200Response, GetChatCompletionsDefaultResponse, GetModelInfo200Response, GetModelInfoDefaultResponse, GetEmbeddings200Response, GetEmbeddingsDefaultResponse, GetImageEmbeddings200Response, GetImageEmbeddingsDefaultResponse } from "./responses.js";
2
2
  export declare function isUnexpected(response: GetChatCompletions200Response | GetChatCompletionsDefaultResponse): response is GetChatCompletionsDefaultResponse;
3
3
  export declare function isUnexpected(response: GetModelInfo200Response | GetModelInfoDefaultResponse): response is GetModelInfoDefaultResponse;
4
+ export declare function isUnexpected(response: GetEmbeddings200Response | GetEmbeddingsDefaultResponse): response is GetEmbeddingsDefaultResponse;
5
+ export declare function isUnexpected(response: GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse): response is GetImageEmbeddingsDefaultResponse;
4
6
  //# sourceMappingURL=isUnexpected.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAOxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC;AACjD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,uBAAuB,GAAG,2BAA2B,GAC9D,QAAQ,IAAI,2BAA2B,CAAC"}
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,iCAAiC,EACjC,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,6BAA6B,EAC7B,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AASxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC;AACjD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,uBAAuB,GAAG,2BAA2B,GAC9D,QAAQ,IAAI,2BAA2B,CAAC;AAC3C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,wBAAwB,GAAG,4BAA4B,GAChE,QAAQ,IAAI,4BAA4B,CAAC;AAC5C,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,6BAA6B,GAAG,iCAAiC,GAC1E,QAAQ,IAAI,iCAAiC,CAAC"}
@@ -1,8 +1,10 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  const responseMap = {
4
4
  "POST /chat/completions": ["200"],
5
5
  "GET /info": ["200"],
6
+ "POST /embeddings": ["200"],
7
+ "POST /images/embeddings": ["200"],
6
8
  };
7
9
  export function isUnexpected(response) {
8
10
  const lroOriginal = response.headers["x-ms-original-url"];
@@ -34,8 +36,7 @@ function getParametrizedPathSuccess(method, path) {
34
36
  // track if we have found a match to return the values found.
35
37
  let found = true;
36
38
  for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
37
- if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
38
- ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
39
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
39
40
  const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
40
41
  // If the current part of the candidate is a "template" part
41
42
  // Try to use the suffix of pattern to match the path
@@ -1 +1 @@
1
- {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,MAAM,WAAW,GAA6B;IAC5C,wBAAwB,EAAE,CAAC,KAAK,CAAC;IACjC,WAAW,EAAE,CAAC,KAAK,CAAC;CACrB,CAAC;AAQF,MAAM,UAAU,YAAY,CAC1B,QAI+B;IAE/B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,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,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n GetChatCompletions200Response,\n GetChatCompletionsDefaultResponse,\n GetModelInfo200Response,\n GetModelInfoDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /chat/completions\": [\"200\"],\n \"GET /info\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetChatCompletions200Response | GetChatCompletionsDefaultResponse,\n): response is GetChatCompletionsDefaultResponse;\nexport function isUnexpected(\n response: GetModelInfo200Response | GetModelInfoDefaultResponse,\n): response is GetModelInfoDefaultResponse;\nexport function isUnexpected(\n response:\n | GetChatCompletions200Response\n | GetChatCompletionsDefaultResponse\n | GetModelInfo200Response\n | GetModelInfoDefaultResponse,\n): response is GetChatCompletionsDefaultResponse | GetModelInfoDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,MAAM,WAAW,GAA6B;IAC5C,wBAAwB,EAAE,CAAC,KAAK,CAAC;IACjC,WAAW,EAAE,CAAC,KAAK,CAAC;IACpB,kBAAkB,EAAE,CAAC,KAAK,CAAC;IAC3B,yBAAyB,EAAE,CAAC,KAAK,CAAC;CACnC,CAAC;AAcF,MAAM,UAAU,YAAY,CAC1B,QAQqC;IAMrC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CA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CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetChatCompletions200Response,\n GetChatCompletionsDefaultResponse,\n GetModelInfo200Response,\n GetModelInfoDefaultResponse,\n GetEmbeddings200Response,\n GetEmbeddingsDefaultResponse,\n GetImageEmbeddings200Response,\n GetImageEmbeddingsDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"POST /chat/completions\": [\"200\"],\n \"GET /info\": [\"200\"],\n \"POST /embeddings\": [\"200\"],\n \"POST /images/embeddings\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetChatCompletions200Response | GetChatCompletionsDefaultResponse,\n): response is GetChatCompletionsDefaultResponse;\nexport function isUnexpected(\n response: GetModelInfo200Response | GetModelInfoDefaultResponse,\n): response is GetModelInfoDefaultResponse;\nexport function isUnexpected(\n response: GetEmbeddings200Response | GetEmbeddingsDefaultResponse,\n): response is GetEmbeddingsDefaultResponse;\nexport function isUnexpected(\n response: GetImageEmbeddings200Response | GetImageEmbeddingsDefaultResponse,\n): response is GetImageEmbeddingsDefaultResponse;\nexport function isUnexpected(\n response:\n | GetChatCompletions200Response\n | GetChatCompletionsDefaultResponse\n | GetModelInfo200Response\n | GetModelInfoDefaultResponse\n | GetEmbeddings200Response\n | GetEmbeddingsDefaultResponse\n | GetImageEmbeddings200Response\n | GetImageEmbeddingsDefaultResponse,\n): response is\n | GetChatCompletionsDefaultResponse\n | GetModelInfoDefaultResponse\n | GetEmbeddingsDefaultResponse\n | GetImageEmbeddingsDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createClientLogger } from "@azure/logger";
4
4
  export const logger = createClientLogger("ai-inference");
5
5
  //# sourceMappingURL=logger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"ai-inference\");\n"]}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,cAAc,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"ai-inference\");\n"]}
@@ -1,11 +1,16 @@
1
1
  import { ClientOptions } from "@azure-rest/core-client";
2
2
  import { TokenCredential, KeyCredential } from "@azure/core-auth";
3
3
  import { ModelClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface ModelClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
4
9
  /**
5
10
  * Initialize a new instance of `ModelClient`
6
11
  * @param endpointParam - The parameter endpointParam
7
12
  * @param credentials - uniquely identify client credential
8
13
  * @param options - the parameter for all optional parameters
9
14
  */
10
- export default function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): ModelClient;
15
+ export default function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, { apiVersion, ...options }?: ModelClientOptions): ModelClient;
11
16
  //# sourceMappingURL=modelClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"modelClient.d.ts","sourceRoot":"","sources":["../../src/modelClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EACL,eAAe,EACf,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,GAAG,aAAa,EAC5C,OAAO,GAAE,aAAkB,GAC1B,WAAW,CAmCb"}
1
+ {"version":3,"file":"modelClient.d.ts","sourceRoot":"","sources":["../../src/modelClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAmB,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,6CAA6C;AAC7C,MAAM,WAAW,kBAAmB,SAAQ,aAAa;IACvD,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,GAAG,aAAa,EAC5C,EAAE,UAAiC,EAAE,GAAG,OAAO,EAAE,GAAE,kBAAuB,GACzE,WAAW,CAwDb"}
@@ -1,19 +1,21 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
+ import { __rest } from "tslib";
3
4
  import { getClient } from "@azure-rest/core-client";
4
5
  import { logger } from "./logger.js";
5
- import { isKeyCredential, } from "@azure/core-auth";
6
+ import { isKeyCredential } from "@azure/core-auth";
7
+ import { tracingPolicy } from "./tracingPolicy.js";
6
8
  /**
7
9
  * Initialize a new instance of `ModelClient`
8
10
  * @param endpointParam - The parameter endpointParam
9
11
  * @param credentials - uniquely identify client credential
10
12
  * @param options - the parameter for all optional parameters
11
13
  */
12
- export default function createClient(endpointParam, credentials, options = {}) {
13
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
14
- const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `${endpointParam}`;
15
- options.apiVersion = (_c = options.apiVersion) !== null && _c !== void 0 ? _c : "2024-05-01-preview";
16
- const userAgentInfo = `azsdk-js-ai-inference-rest/1.0.0-beta.1`;
14
+ export default function createClient(endpointParam, credentials, _a = {}) {
15
+ var _b, _c, _d, _e, _f, _g, _h, _j;
16
+ var { apiVersion = "2024-05-01-preview" } = _a, options = __rest(_a, ["apiVersion"]);
17
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpointParam}`;
18
+ const userAgentInfo = `azsdk-js-ai-inference/1.0.0-beta.2`;
17
19
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
18
20
  ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
19
21
  : `${userAgentInfo}`;
@@ -26,6 +28,25 @@ export default function createClient(endpointParam, credentials, options = {}) {
26
28
  apiKeyHeaderName: (_j = (_h = options.credentials) === null || _h === void 0 ? void 0 : _h.apiKeyHeaderName) !== null && _j !== void 0 ? _j : "api-key",
27
29
  } });
28
30
  const client = getClient(endpointUrl, credentials, options);
31
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
32
+ client.pipeline.addPolicy({
33
+ name: "InferenceTracingPolicy",
34
+ sendRequest: (req, next) => {
35
+ return tracingPolicy().sendRequest(req, next);
36
+ },
37
+ });
38
+ client.pipeline.addPolicy({
39
+ name: "ClientApiVersionPolicy",
40
+ sendRequest: (req, next) => {
41
+ // Use the apiVersion defined in request url directly
42
+ // Append one if there is no apiVersion and we have one at client options
43
+ const url = new URL(req.url);
44
+ if (!url.searchParams.get("api-version") && apiVersion) {
45
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
46
+ }
47
+ return next(req);
48
+ },
49
+ });
29
50
  if (isKeyCredential(credentials)) {
30
51
  client.pipeline.addPolicy({
31
52
  name: "customKeyCredentialPolicy",
@@ -1 +1 @@
1
- {"version":3,"file":"modelClient.js","sourceRoot":"","sources":["../../src/modelClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAGL,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAG1B;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAqB,EACrB,WAA4C,EAC5C,UAAyB,EAAE;;IAE3B,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,EAAE,CAAC;IAC9E,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,MAAM,aAAa,GAAG,yCAAyC,CAAC;IAChE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,+BAA+B,CAAC;YACxE,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,SAAS;SACrE,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAgB,CAAC;IAE3E,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;YACxB,IAAI,EAAE,2BAA2B;YACjC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI;gBAC7B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;gBAClE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport {\n TokenCredential,\n KeyCredential,\n isKeyCredential,\n} from \"@azure/core-auth\";\nimport { ModelClient } from \"./clientDefinitions.js\";\n\n/**\n * Initialize a new instance of `ModelClient`\n * @param endpointParam - The parameter endpointParam\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential | KeyCredential,\n options: ClientOptions = {},\n): ModelClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n options.apiVersion = options.apiVersion ?? \"2024-05-01-preview\";\n const userAgentInfo = `azsdk-js-ai-inference-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://ml.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"api-key\",\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as ModelClient;\n\n if (isKeyCredential(credentials)) {\n client.pipeline.addPolicy({\n name: \"customKeyCredentialPolicy\",\n async sendRequest(request, next) {\n request.headers.set(\"Authorization\", \"Bearer \" + credentials.key);\n return next(request);\n },\n });\n }\n\n return client;\n}\n"]}
1
+ {"version":3,"file":"modelClient.js","sourceRoot":"","sources":["../../src/modelClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAkC,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQnD;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAqB,EACrB,WAA4C,EAC5C,KAAwE,EAAE;;QAA1E,EAAE,UAAU,GAAG,oBAAoB,OAAuC,EAAlC,OAAO,cAA/C,cAAiD,CAAF;IAE/C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,EAAE,CAAC;IAC9E,MAAM,aAAa,GAAG,oCAAoC,CAAC;IAC3D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gB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,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;YACxB,IAAI,EAAE,2BAA2B;YACjC,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI;gBAC7B,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;gBAClE,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { TokenCredential, KeyCredential, isKeyCredential } from \"@azure/core-auth\";\nimport { ModelClient } from \"./clientDefinitions.js\";\nimport { tracingPolicy } from \"./tracingPolicy.js\";\n\n/** The optional parameters for the client */\nexport interface ModelClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `ModelClient`\n * @param endpointParam - The parameter endpointParam\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential | KeyCredential,\n { apiVersion = \"2024-05-01-preview\", ...options }: ModelClientOptions = {},\n): ModelClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n const userAgentInfo = `azsdk-js-ai-inference/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://ml.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"api-key\",\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as ModelClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"InferenceTracingPolicy\",\n sendRequest: (req, next) => {\n return tracingPolicy().sendRequest(req, next);\n },\n });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n if (isKeyCredential(credentials)) {\n client.pipeline.addPolicy({\n name: \"customKeyCredentialPolicy\",\n async sendRequest(request, next) {\n request.headers.set(\"Authorization\", \"Bearer \" + credentials.key);\n return next(request);\n },\n });\n }\n\n return client;\n}\n"]}
@@ -44,6 +44,8 @@ export interface ChatMessageImageUrl {
44
44
  /**
45
45
  * The evaluation quality setting to use, which controls relative prioritization of speed, token consumption, and
46
46
  * accuracy.
47
+ *
48
+ * Possible values: "auto", "low", "high"
47
49
  */
48
50
  detail?: ChatMessageImageDetailLevel;
49
51
  }
@@ -59,23 +61,13 @@ export interface ChatRequestAssistantMessage extends ChatRequestMessageParent {
59
61
  */
60
62
  tool_calls?: Array<ChatCompletionsToolCall>;
61
63
  }
62
- /**
63
- * An abstract representation of a tool call that must be resolved in a subsequent request to perform the requested
64
- * chat completion.
65
- */
66
- export interface ChatCompletionsToolCallParent {
64
+ /** A function tool call requested by the AI model. */
65
+ export interface ChatCompletionsToolCall {
67
66
  /** The ID of the tool call. */
68
67
  id: string;
69
- type: string;
70
- }
71
- /**
72
- * A tool call to a function tool, issued by the model in evaluation of a configured function tool, that represents
73
- * a function invocation needed for a subsequent chat completions request to resolve.
74
- */
75
- export interface ChatCompletionsFunctionToolCall extends ChatCompletionsToolCallParent {
76
- /** The type of tool call, in this case always 'function'. */
68
+ /** The type of tool call. Currently, only `function` is supported. */
77
69
  type: "function";
78
- /** The details of the function invocation requested by the tool call. */
70
+ /** The details of the function call requested by the AI model. */
79
71
  function: FunctionCall;
80
72
  }
81
73
  /** The name and arguments of a function that should be called, as generated by the model. */
@@ -99,13 +91,31 @@ export interface ChatRequestToolMessage extends ChatRequestMessageParent {
99
91
  /** The ID of the tool call resolved by the provided content. */
100
92
  tool_call_id: string;
101
93
  }
102
- /** An abstract representation of a tool that can be used by the model to improve a chat completions response. */
103
- export interface ChatCompletionsToolDefinitionParent {
94
+ /**
95
+ * Represents the format that the model must output. Use this to enable JSON mode instead of the default text mode.
96
+ * Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON
97
+ * via a system or user message.
98
+ */
99
+ export interface ChatCompletionsResponseFormatParent {
104
100
  type: string;
105
101
  }
106
- /** The definition information for a chat completions function tool that can call a function in response to a tool call. */
107
- export interface ChatCompletionsFunctionToolDefinition extends ChatCompletionsToolDefinitionParent {
108
- /** The object name, which is always 'function'. */
102
+ /** A response format for Chat Completions that emits text responses. This is the default response format. */
103
+ export interface ChatCompletionsResponseFormatText extends ChatCompletionsResponseFormatParent {
104
+ /** Response format type: always 'text' for this object. */
105
+ type: "text";
106
+ }
107
+ /**
108
+ * A response format for Chat Completions that restricts responses to emitting valid JSON objects.
109
+ * Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON
110
+ * via a system or user message.
111
+ */
112
+ export interface ChatCompletionsResponseFormatJSON extends ChatCompletionsResponseFormatParent {
113
+ /** Response format type: always 'json_object' for this object. */
114
+ type: "json_object";
115
+ }
116
+ /** The definition of a chat completions tool that can call a function. */
117
+ export interface ChatCompletionsToolDefinition {
118
+ /** The type of the tool. Currently, only `function` is supported. */
109
119
  type: "function";
110
120
  /** The function definition details for the function tool. */
111
121
  function: FunctionDefinition;
@@ -122,13 +132,9 @@ export interface FunctionDefinition {
122
132
  /** The parameters the function accepts, described as a JSON Schema object. */
123
133
  parameters?: unknown;
124
134
  }
125
- /** An abstract representation of an explicit, named tool selection to use for a chat completions request. */
126
- export interface ChatCompletionsNamedToolSelectionParent {
127
- type: string;
128
- }
129
135
  /** A tool selection of a specific, named function tool that will limit chat completions to using the named function. */
130
- export interface ChatCompletionsNamedFunctionToolSelection extends ChatCompletionsNamedToolSelectionParent {
131
- /** The object type, which is always 'function'. */
136
+ export interface ChatCompletionsNamedToolSelection {
137
+ /** The type of the tool. Currently, only `function` is supported. */
132
138
  type: "function";
133
139
  /** The function that should be called. */
134
140
  function: ChatCompletionsFunctionToolSelection;
@@ -138,27 +144,36 @@ export interface ChatCompletionsFunctionToolSelection {
138
144
  /** The name of the function that should be called. */
139
145
  name: string;
140
146
  }
147
+ /** Represents an image with optional text. */
148
+ export interface ImageEmbeddingInput {
149
+ /** The input image, in PNG format. */
150
+ image: string;
151
+ /**
152
+ * Optional. The text input to feed into the model (like DINO, CLIP).
153
+ * Returns a 422 error if the model doesn't support the value or parameter.
154
+ */
155
+ text?: string;
156
+ }
141
157
  /** An abstract representation of a chat message as provided in a request. */
142
158
  export type ChatRequestMessage = ChatRequestMessageParent | ChatRequestSystemMessage | ChatRequestUserMessage | ChatRequestAssistantMessage | ChatRequestToolMessage;
143
159
  /** An abstract representation of a structured content item within a chat message. */
144
160
  export type ChatMessageContentItem = ChatMessageContentItemParent | ChatMessageTextContentItem | ChatMessageImageContentItem;
145
161
  /**
146
- * An abstract representation of a tool call that must be resolved in a subsequent request to perform the requested
147
- * chat completion.
162
+ * Represents the format that the model must output. Use this to enable JSON mode instead of the default text mode.
163
+ * Note that to enable JSON mode, some AI models may also require you to instruct the model to produce JSON
164
+ * via a system or user message.
148
165
  */
149
- export type ChatCompletionsToolCall = ChatCompletionsToolCallParent | ChatCompletionsFunctionToolCall;
150
- /** An abstract representation of a tool that can be used by the model to improve a chat completions response. */
151
- export type ChatCompletionsToolDefinition = ChatCompletionsToolDefinitionParent | ChatCompletionsFunctionToolDefinition;
152
- /** An abstract representation of an explicit, named tool selection to use for a chat completions request. */
153
- export type ChatCompletionsNamedToolSelection = ChatCompletionsNamedToolSelectionParent | ChatCompletionsNamedFunctionToolSelection;
154
- /** Alias for UnknownParams */
155
- export type UnknownParams = string | "error" | "drop" | "pass_through";
166
+ export type ChatCompletionsResponseFormat = ChatCompletionsResponseFormatParent | ChatCompletionsResponseFormatText | ChatCompletionsResponseFormatJSON;
167
+ /** Alias for ExtraParameters */
168
+ export type ExtraParameters = string;
156
169
  /** Alias for ChatRole */
157
- export type ChatRole = string | "system" | "user" | "assistant" | "tool";
170
+ export type ChatRole = string;
158
171
  /** Alias for ChatMessageImageDetailLevel */
159
- export type ChatMessageImageDetailLevel = string | "auto" | "low" | "high";
160
- /** Alias for ChatCompletionsResponseFormat */
161
- export type ChatCompletionsResponseFormat = string | "text" | "json_object";
172
+ export type ChatMessageImageDetailLevel = string;
162
173
  /** Alias for ChatCompletionsToolSelectionPreset */
163
- export type ChatCompletionsToolSelectionPreset = string | "auto" | "none" | "required";
174
+ export type ChatCompletionsToolSelectionPreset = string;
175
+ /** Alias for EmbeddingEncodingFormat */
176
+ export type EmbeddingEncodingFormat = string;
177
+ /** Alias for EmbeddingInputType */
178
+ export type EmbeddingInputType = string;
164
179
  //# sourceMappingURL=models.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,6EAA6E;AAC7E,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAyB,SAAQ,wBAAwB;IACxE,gGAAgG;IAChG,IAAI,EAAE,QAAQ,CAAC;IACf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qF;AACrF,MAAM,MAAM,sBAAsB,GAC9B,4BAA4B,GAC5B,0BAA0B,GAC1B,2BAA2B,CAAC;AAChC;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GACrC,mCAAmC,GACnC,iCAAiC,GACjC,iCAAiC,CAAC;AACtC,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AACrC,yBAAyB;AACzB,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC9B,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AACjD,mDAAmD;AACnD,MAAM,MAAM,kCAAkC,GAAG,MAAM,CAAC;AACxD,wCAAwC;AACxC,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAC7C,mCAAmC;AACnC,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=models.js.map