@azure-rest/ai-inference 1.0.0-beta.1 → 1.0.0-beta.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.
Files changed (97) hide show
  1. package/README.md +42 -0
  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.map +1 -1
  5. package/dist/browser/isUnexpected.d.ts +3 -1
  6. package/dist/browser/isUnexpected.d.ts.map +1 -1
  7. package/dist/browser/isUnexpected.js +2 -0
  8. package/dist/browser/isUnexpected.js.map +1 -1
  9. package/dist/browser/modelClient.d.ts +6 -1
  10. package/dist/browser/modelClient.d.ts.map +1 -1
  11. package/dist/browser/modelClient.js +19 -5
  12. package/dist/browser/modelClient.js.map +1 -1
  13. package/dist/browser/models.d.ts +19 -5
  14. package/dist/browser/models.d.ts.map +1 -1
  15. package/dist/browser/models.js.map +1 -1
  16. package/dist/browser/outputModels.d.ts +38 -3
  17. package/dist/browser/outputModels.d.ts.map +1 -1
  18. package/dist/browser/outputModels.js.map +1 -1
  19. package/dist/browser/parameters.d.ts +47 -4
  20. package/dist/browser/parameters.d.ts.map +1 -1
  21. package/dist/browser/parameters.js.map +1 -1
  22. package/dist/browser/responses.d.ts +29 -1
  23. package/dist/browser/responses.d.ts.map +1 -1
  24. package/dist/browser/responses.js.map +1 -1
  25. package/dist/commonjs/clientDefinitions.d.ts +20 -2
  26. package/dist/commonjs/clientDefinitions.d.ts.map +1 -1
  27. package/dist/commonjs/clientDefinitions.js.map +1 -1
  28. package/dist/commonjs/isUnexpected.d.ts +3 -1
  29. package/dist/commonjs/isUnexpected.d.ts.map +1 -1
  30. package/dist/commonjs/isUnexpected.js +3 -2
  31. package/dist/commonjs/isUnexpected.js.map +1 -1
  32. package/dist/commonjs/modelClient.d.ts +6 -1
  33. package/dist/commonjs/modelClient.d.ts.map +1 -1
  34. package/dist/commonjs/modelClient.js +20 -6
  35. package/dist/commonjs/modelClient.js.map +1 -1
  36. package/dist/commonjs/models.d.ts +19 -5
  37. package/dist/commonjs/models.d.ts.map +1 -1
  38. package/dist/commonjs/models.js.map +1 -1
  39. package/dist/commonjs/outputModels.d.ts +38 -3
  40. package/dist/commonjs/outputModels.d.ts.map +1 -1
  41. package/dist/commonjs/outputModels.js.map +1 -1
  42. package/dist/commonjs/parameters.d.ts +47 -4
  43. package/dist/commonjs/parameters.d.ts.map +1 -1
  44. package/dist/commonjs/parameters.js.map +1 -1
  45. package/dist/commonjs/responses.d.ts +29 -1
  46. package/dist/commonjs/responses.d.ts.map +1 -1
  47. package/dist/commonjs/responses.js.map +1 -1
  48. package/dist/commonjs/tsdoc-metadata.json +1 -1
  49. package/dist/esm/clientDefinitions.d.ts +20 -2
  50. package/dist/esm/clientDefinitions.d.ts.map +1 -1
  51. package/dist/esm/clientDefinitions.js.map +1 -1
  52. package/dist/esm/isUnexpected.d.ts +3 -1
  53. package/dist/esm/isUnexpected.d.ts.map +1 -1
  54. package/dist/esm/isUnexpected.js +2 -0
  55. package/dist/esm/isUnexpected.js.map +1 -1
  56. package/dist/esm/modelClient.d.ts +6 -1
  57. package/dist/esm/modelClient.d.ts.map +1 -1
  58. package/dist/esm/modelClient.js +19 -5
  59. package/dist/esm/modelClient.js.map +1 -1
  60. package/dist/esm/models.d.ts +19 -5
  61. package/dist/esm/models.d.ts.map +1 -1
  62. package/dist/esm/models.js.map +1 -1
  63. package/dist/esm/outputModels.d.ts +38 -3
  64. package/dist/esm/outputModels.d.ts.map +1 -1
  65. package/dist/esm/outputModels.js.map +1 -1
  66. package/dist/esm/parameters.d.ts +47 -4
  67. package/dist/esm/parameters.d.ts.map +1 -1
  68. package/dist/esm/parameters.js.map +1 -1
  69. package/dist/esm/responses.d.ts +29 -1
  70. package/dist/esm/responses.d.ts.map +1 -1
  71. package/dist/esm/responses.js.map +1 -1
  72. package/dist/react-native/clientDefinitions.d.ts +20 -2
  73. package/dist/react-native/clientDefinitions.d.ts.map +1 -1
  74. package/dist/react-native/clientDefinitions.js.map +1 -1
  75. package/dist/react-native/isUnexpected.d.ts +3 -1
  76. package/dist/react-native/isUnexpected.d.ts.map +1 -1
  77. package/dist/react-native/isUnexpected.js +2 -0
  78. package/dist/react-native/isUnexpected.js.map +1 -1
  79. package/dist/react-native/modelClient.d.ts +6 -1
  80. package/dist/react-native/modelClient.d.ts.map +1 -1
  81. package/dist/react-native/modelClient.js +19 -5
  82. package/dist/react-native/modelClient.js.map +1 -1
  83. package/dist/react-native/models.d.ts +19 -5
  84. package/dist/react-native/models.d.ts.map +1 -1
  85. package/dist/react-native/models.js.map +1 -1
  86. package/dist/react-native/outputModels.d.ts +38 -3
  87. package/dist/react-native/outputModels.d.ts.map +1 -1
  88. package/dist/react-native/outputModels.js.map +1 -1
  89. package/dist/react-native/parameters.d.ts +47 -4
  90. package/dist/react-native/parameters.d.ts.map +1 -1
  91. package/dist/react-native/parameters.js.map +1 -1
  92. package/dist/react-native/responses.d.ts +29 -1
  93. package/dist/react-native/responses.d.ts.map +1 -1
  94. package/dist/react-native/responses.js.map +1 -1
  95. package/package.json +6 -9
  96. package/CHANGELOG.md +0 -6
  97. package/review/ai-inference.api.md +0 -343
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n UnknownParams,\n ChatRequestMessage,\n ChatCompletionsResponseFormat,\n ChatCompletionsToolDefinition,\n ChatCompletionsToolSelectionPreset,\n ChatCompletionsNamedToolSelection,\n} from \"./models.js\";\n\nexport interface GetChatCompletionsHeaders {\n /**\n * Controls what happens if unknown parameters are passed in the JSON request payload.\n * This sets the HTTP request header `unknown-parameters`.\n */\n \"unknown-parameters\"?: UnknownParams;\n}\n\nexport interface GetChatCompletionsBodyParam {\n body?: {\n messages: Array<ChatRequestMessage>;\n frequency_penalty?: number;\n stream?: boolean;\n presence_penalty?: number;\n temperature?: number;\n top_p?: number;\n max_tokens?: number;\n response_format?: ChatCompletionsResponseFormat;\n stop?: string[];\n tools?: Array<ChatCompletionsToolDefinition>;\n tool_choice?:\n | ChatCompletionsToolSelectionPreset\n | ChatCompletionsNamedToolSelection;\n seed?: number;\n model?: string;\n };\n}\n\nexport interface GetChatCompletionsHeaderParam {\n headers?: RawHttpHeadersInput & GetChatCompletionsHeaders;\n}\n\nexport type GetChatCompletionsParameters = GetChatCompletionsHeaderParam &\n GetChatCompletionsBodyParam &\n RequestParameters;\nexport type GetModelInfoParameters = RequestParameters;\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n ExtraParameters,\n ChatRequestMessage,\n ChatCompletionsResponseFormat,\n ChatCompletionsToolDefinition,\n ChatCompletionsToolSelectionPreset,\n ChatCompletionsNamedToolSelection,\n EmbeddingEncodingFormat,\n EmbeddingInputType,\n ImageEmbeddingInput,\n} from \"./models.js\";\n\nexport interface GetChatCompletionsHeaders {\n /**\n * Controls what happens if extra parameters, undefined by the REST API,\n * are passed in the JSON request payload.\n * This sets the HTTP request header `extra-parameters`.\n */\n \"extra-parameters\"?: ExtraParameters;\n}\n\nexport interface GetChatCompletionsBodyParam {\n body?: {\n messages: Array<ChatRequestMessage>;\n frequency_penalty?: number;\n stream?: boolean;\n presence_penalty?: number;\n temperature?: number;\n top_p?: number;\n max_tokens?: number;\n response_format?: ChatCompletionsResponseFormat;\n stop?: string[];\n tools?: Array<ChatCompletionsToolDefinition>;\n tool_choice?:\n | ChatCompletionsToolSelectionPreset\n | ChatCompletionsNamedToolSelection;\n seed?: number;\n model?: string;\n };\n}\n\nexport interface GetChatCompletionsHeaderParam {\n headers?: RawHttpHeadersInput & GetChatCompletionsHeaders;\n}\n\nexport type GetChatCompletionsParameters = GetChatCompletionsHeaderParam &\n GetChatCompletionsBodyParam &\n RequestParameters;\nexport type GetModelInfoParameters = RequestParameters;\n\nexport interface GetEmbeddingsHeaders {\n /**\n * Controls what happens if extra parameters, undefined by the REST API,\n * are passed in the JSON request payload.\n * This sets the HTTP request header `extra-parameters`.\n */\n \"extra-parameters\"?: ExtraParameters;\n}\n\nexport interface GetEmbeddingsBodyParam {\n body?: {\n input: string[];\n dimensions?: number;\n encoding_format?: EmbeddingEncodingFormat;\n input_type?: EmbeddingInputType;\n model?: string;\n };\n}\n\nexport interface GetEmbeddingsHeaderParam {\n headers?: RawHttpHeadersInput & GetEmbeddingsHeaders;\n}\n\nexport type GetEmbeddingsParameters = GetEmbeddingsHeaderParam &\n GetEmbeddingsBodyParam &\n RequestParameters;\n\nexport interface GetImageEmbeddingsHeaders {\n /**\n * Controls what happens if extra parameters, undefined by the REST API,\n * are passed in the JSON request payload.\n * This sets the HTTP request header `extra-parameters`.\n */\n \"extra-parameters\"?: ExtraParameters;\n}\n\nexport interface GetImageEmbeddingsBodyParam {\n body?: {\n input: Array<ImageEmbeddingInput>;\n dimensions?: number;\n encoding_format?: EmbeddingEncodingFormat;\n input_type?: EmbeddingInputType;\n model?: string;\n };\n}\n\nexport interface GetImageEmbeddingsHeaderParam {\n headers?: RawHttpHeadersInput & GetImageEmbeddingsHeaders;\n}\n\nexport type GetImageEmbeddingsParameters = GetImageEmbeddingsHeaderParam &\n GetImageEmbeddingsBodyParam &\n RequestParameters;\n"]}
@@ -1,6 +1,6 @@
1
1
  import { RawHttpHeaders } from "@azure/core-rest-pipeline";
2
2
  import { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
3
- import { ChatCompletionsOutput, ModelInfoOutput } from "./outputModels.js";
3
+ import { ChatCompletionsOutput, ModelInfoOutput, EmbeddingsResultOutput } from "./outputModels.js";
4
4
  /** The request has succeeded. */
5
5
  export interface GetChatCompletions200Response extends HttpResponse {
6
6
  status: "200";
@@ -29,4 +29,32 @@ export interface GetModelInfoDefaultResponse extends HttpResponse {
29
29
  body: ErrorResponse;
30
30
  headers: RawHttpHeaders & GetModelInfoDefaultHeaders;
31
31
  }
32
+ /** The request has succeeded. */
33
+ export interface GetEmbeddings200Response extends HttpResponse {
34
+ status: "200";
35
+ body: EmbeddingsResultOutput;
36
+ }
37
+ export interface GetEmbeddingsDefaultHeaders {
38
+ /** String error code indicating what went wrong. */
39
+ "x-ms-error-code"?: string;
40
+ }
41
+ export interface GetEmbeddingsDefaultResponse extends HttpResponse {
42
+ status: string;
43
+ body: ErrorResponse;
44
+ headers: RawHttpHeaders & GetEmbeddingsDefaultHeaders;
45
+ }
46
+ /** The request has succeeded. */
47
+ export interface GetImageEmbeddings200Response extends HttpResponse {
48
+ status: "200";
49
+ body: EmbeddingsResultOutput;
50
+ }
51
+ export interface GetImageEmbeddingsDefaultHeaders {
52
+ /** String error code indicating what went wrong. */
53
+ "x-ms-error-code"?: string;
54
+ }
55
+ export interface GetImageEmbeddingsDefaultResponse extends HttpResponse {
56
+ status: string;
57
+ body: ErrorResponse;
58
+ headers: RawHttpHeaders & GetImageEmbeddingsDefaultHeaders;
59
+ }
32
60
  //# sourceMappingURL=responses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,iCAAiC;AACjC,MAAM,WAAW,6BAA8B,SAAQ,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sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport { ChatCompletionsOutput, ModelInfoOutput } from \"./outputModels.js\";\n\n/** The request has succeeded. */\nexport interface GetChatCompletions200Response extends HttpResponse {\n status: \"200\";\n body: ChatCompletionsOutput;\n}\n\nexport interface GetChatCompletionsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetChatCompletionsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetChatCompletionsDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetModelInfo200Response extends HttpResponse {\n status: \"200\";\n body: ModelInfoOutput;\n}\n\nexport interface GetModelInfoDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetModelInfoDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetModelInfoDefaultHeaders;\n}\n"]}
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport {\n ChatCompletionsOutput,\n ModelInfoOutput,\n EmbeddingsResultOutput,\n} from \"./outputModels.js\";\n\n/** The request has succeeded. */\nexport interface GetChatCompletions200Response extends HttpResponse {\n status: \"200\";\n body: ChatCompletionsOutput;\n}\n\nexport interface GetChatCompletionsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetChatCompletionsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetChatCompletionsDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetModelInfo200Response extends HttpResponse {\n status: \"200\";\n body: ModelInfoOutput;\n}\n\nexport interface GetModelInfoDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetModelInfoDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetModelInfoDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetEmbeddings200Response extends HttpResponse {\n status: \"200\";\n body: EmbeddingsResultOutput;\n}\n\nexport interface GetEmbeddingsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetEmbeddingsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetEmbeddingsDefaultHeaders;\n}\n\n/** The request has succeeded. */\nexport interface GetImageEmbeddings200Response extends HttpResponse {\n status: \"200\";\n body: EmbeddingsResultOutput;\n}\n\nexport interface GetImageEmbeddingsDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetImageEmbeddingsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetImageEmbeddingsDefaultHeaders;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-rest/ai-inference",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0-beta.2",
4
4
  "description": "Inference API for Azure-supported AI models",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -47,12 +47,8 @@
47
47
  "type": "module",
48
48
  "files": [
49
49
  "dist/",
50
- "dist/esm/",
51
- "/dist/commonjs/index.d.ts",
52
50
  "README.md",
53
- "CHANGELOG.md",
54
- "LICENSE",
55
- "review/*"
51
+ "LICENSE"
56
52
  ],
57
53
  "engines": {
58
54
  "node": ">=18.0.0"
@@ -111,8 +107,8 @@
111
107
  "playwright": "^1.41.2",
112
108
  "rimraf": "^5.0.5",
113
109
  "source-map-support": "^0.5.9",
114
- "tshy": "^1.11.1",
115
- "typescript": "~5.4.5",
110
+ "tshy": "^1.17.0",
111
+ "typescript": "~5.5.3",
116
112
  "vitest": "^1.3.1"
117
113
  },
118
114
  "scripts": {
@@ -144,5 +140,6 @@
144
140
  "productSlugs": [
145
141
  "azure"
146
142
  ]
147
- }
143
+ },
144
+ "module": "./dist/esm/index.js"
148
145
  }
package/CHANGELOG.md DELETED
@@ -1,6 +0,0 @@
1
- # Release History
2
-
3
- ## 1.0.0-beta.1 (2024-06-30)
4
-
5
- ### Features Added
6
- - This is the initial beta release for the Azure AI Inference SDK, which is a common API supporting Azure AI Inference models.
@@ -1,343 +0,0 @@
1
- ## API Report File for "@azure-rest/ai-inference"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- import { Client } from '@azure-rest/core-client';
8
- import { ClientOptions } from '@azure-rest/core-client';
9
- import { ErrorResponse } from '@azure-rest/core-client';
10
- import { HttpResponse } from '@azure-rest/core-client';
11
- import { KeyCredential } from '@azure/core-auth';
12
- import { RawHttpHeaders } from '@azure/core-rest-pipeline';
13
- import { RawHttpHeadersInput } from '@azure/core-rest-pipeline';
14
- import { RequestParameters } from '@azure-rest/core-client';
15
- import { StreamableMethod } from '@azure-rest/core-client';
16
- import { TokenCredential } from '@azure/core-auth';
17
-
18
- // @public
19
- export interface ChatChoiceOutput {
20
- finish_reason: CompletionsFinishReasonOutput | null;
21
- index: number;
22
- message: ChatResponseMessageOutput;
23
- }
24
-
25
- // @public
26
- export interface ChatCompletionsFunctionToolCall extends ChatCompletionsToolCallParent {
27
- function: FunctionCall;
28
- type: "function";
29
- }
30
-
31
- // @public
32
- export interface ChatCompletionsFunctionToolCallOutput extends ChatCompletionsToolCallOutputParent {
33
- function: FunctionCallOutput;
34
- type: "function";
35
- }
36
-
37
- // @public
38
- export interface ChatCompletionsFunctionToolDefinition extends ChatCompletionsToolDefinitionParent {
39
- function: FunctionDefinition;
40
- type: "function";
41
- }
42
-
43
- // @public
44
- export interface ChatCompletionsFunctionToolSelection {
45
- name: string;
46
- }
47
-
48
- // @public
49
- export interface ChatCompletionsNamedFunctionToolSelection extends ChatCompletionsNamedToolSelectionParent {
50
- function: ChatCompletionsFunctionToolSelection;
51
- type: "function";
52
- }
53
-
54
- // @public
55
- export type ChatCompletionsNamedToolSelection = ChatCompletionsNamedToolSelectionParent | ChatCompletionsNamedFunctionToolSelection;
56
-
57
- // @public
58
- export interface ChatCompletionsNamedToolSelectionParent {
59
- // (undocumented)
60
- type: string;
61
- }
62
-
63
- // @public
64
- export interface ChatCompletionsOutput {
65
- choices: Array<ChatChoiceOutput>;
66
- created: number;
67
- id: string;
68
- model: string;
69
- usage: CompletionsUsageOutput;
70
- }
71
-
72
- // @public
73
- export type ChatCompletionsResponseFormat = string | "text" | "json_object";
74
-
75
- // @public
76
- export type ChatCompletionsToolCall = ChatCompletionsToolCallParent | ChatCompletionsFunctionToolCall;
77
-
78
- // @public
79
- export type ChatCompletionsToolCallOutput = ChatCompletionsToolCallOutputParent | ChatCompletionsFunctionToolCallOutput;
80
-
81
- // @public
82
- export interface ChatCompletionsToolCallOutputParent {
83
- id: string;
84
- // (undocumented)
85
- type: string;
86
- }
87
-
88
- // @public
89
- export interface ChatCompletionsToolCallParent {
90
- id: string;
91
- // (undocumented)
92
- type: string;
93
- }
94
-
95
- // @public
96
- export type ChatCompletionsToolDefinition = ChatCompletionsToolDefinitionParent | ChatCompletionsFunctionToolDefinition;
97
-
98
- // @public
99
- export interface ChatCompletionsToolDefinitionParent {
100
- // (undocumented)
101
- type: string;
102
- }
103
-
104
- // @public
105
- export type ChatCompletionsToolSelectionPreset = string | "auto" | "none" | "required";
106
-
107
- // @public
108
- export type ChatMessageContentItem = ChatMessageContentItemParent | ChatMessageTextContentItem | ChatMessageImageContentItem;
109
-
110
- // @public
111
- export interface ChatMessageContentItemParent {
112
- // (undocumented)
113
- type: string;
114
- }
115
-
116
- // @public
117
- export interface ChatMessageImageContentItem extends ChatMessageContentItemParent {
118
- image_url: ChatMessageImageUrl;
119
- type: "image_url";
120
- }
121
-
122
- // @public
123
- export type ChatMessageImageDetailLevel = string | "auto" | "low" | "high";
124
-
125
- // @public
126
- export interface ChatMessageImageUrl {
127
- detail?: ChatMessageImageDetailLevel;
128
- url: string;
129
- }
130
-
131
- // @public
132
- export interface ChatMessageTextContentItem extends ChatMessageContentItemParent {
133
- text: string;
134
- type: "text";
135
- }
136
-
137
- // @public
138
- export interface ChatRequestAssistantMessage extends ChatRequestMessageParent {
139
- content?: string | null;
140
- role: "assistant";
141
- tool_calls?: Array<ChatCompletionsToolCall>;
142
- }
143
-
144
- // @public
145
- export type ChatRequestMessage = ChatRequestMessageParent | ChatRequestSystemMessage | ChatRequestUserMessage | ChatRequestAssistantMessage | ChatRequestToolMessage;
146
-
147
- // @public
148
- export interface ChatRequestMessageParent {
149
- // (undocumented)
150
- role: ChatRole;
151
- }
152
-
153
- // @public
154
- export interface ChatRequestSystemMessage extends ChatRequestMessageParent {
155
- content: string;
156
- role: "system";
157
- }
158
-
159
- // @public
160
- export interface ChatRequestToolMessage extends ChatRequestMessageParent {
161
- content: string | null;
162
- role: "tool";
163
- tool_call_id: string;
164
- }
165
-
166
- // @public
167
- export interface ChatRequestUserMessage extends ChatRequestMessageParent {
168
- content: string | Array<ChatMessageContentItem>;
169
- role: "user";
170
- }
171
-
172
- // @public
173
- export interface ChatResponseMessageOutput {
174
- content: string | null;
175
- role: ChatRoleOutput;
176
- tool_calls?: Array<ChatCompletionsToolCallOutput>;
177
- }
178
-
179
- // @public
180
- export type ChatRole = string | "system" | "user" | "assistant" | "tool";
181
-
182
- // @public
183
- export type ChatRoleOutput = string | "system" | "user" | "assistant" | "tool";
184
-
185
- // @public
186
- export type CompletionsFinishReasonOutput = string | "stop" | "length" | "content_filter" | "tool_calls";
187
-
188
- // @public
189
- export interface CompletionsUsageOutput {
190
- completion_tokens: number;
191
- prompt_tokens: number;
192
- total_tokens: number;
193
- }
194
-
195
- // @public
196
- function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, options?: ClientOptions): ModelClient;
197
- export default createClient;
198
-
199
- // @public
200
- export interface FunctionCall {
201
- arguments: string;
202
- name: string;
203
- }
204
-
205
- // @public
206
- export interface FunctionCallOutput {
207
- arguments: string;
208
- name: string;
209
- }
210
-
211
- // @public
212
- export interface FunctionDefinition {
213
- description?: string;
214
- name: string;
215
- parameters?: unknown;
216
- }
217
-
218
- // @public (undocumented)
219
- export interface GetChatCompletions {
220
- post(options?: GetChatCompletionsParameters): StreamableMethod<GetChatCompletions200Response | GetChatCompletionsDefaultResponse>;
221
- }
222
-
223
- // @public
224
- export interface GetChatCompletions200Response extends HttpResponse {
225
- // (undocumented)
226
- body: ChatCompletionsOutput;
227
- // (undocumented)
228
- status: "200";
229
- }
230
-
231
- // @public (undocumented)
232
- export interface GetChatCompletionsBodyParam {
233
- // (undocumented)
234
- body?: {
235
- messages: Array<ChatRequestMessage>;
236
- frequency_penalty?: number;
237
- stream?: boolean;
238
- presence_penalty?: number;
239
- temperature?: number;
240
- top_p?: number;
241
- max_tokens?: number;
242
- response_format?: ChatCompletionsResponseFormat;
243
- stop?: string[];
244
- tools?: Array<ChatCompletionsToolDefinition>;
245
- tool_choice?: ChatCompletionsToolSelectionPreset | ChatCompletionsNamedToolSelection;
246
- seed?: number;
247
- model?: string;
248
- };
249
- }
250
-
251
- // @public (undocumented)
252
- export interface GetChatCompletionsDefaultHeaders {
253
- "x-ms-error-code"?: string;
254
- }
255
-
256
- // @public (undocumented)
257
- export interface GetChatCompletionsDefaultResponse extends HttpResponse {
258
- // (undocumented)
259
- body: ErrorResponse;
260
- // (undocumented)
261
- headers: RawHttpHeaders & GetChatCompletionsDefaultHeaders;
262
- // (undocumented)
263
- status: string;
264
- }
265
-
266
- // @public (undocumented)
267
- export interface GetChatCompletionsHeaderParam {
268
- // (undocumented)
269
- headers?: RawHttpHeadersInput & GetChatCompletionsHeaders;
270
- }
271
-
272
- // @public (undocumented)
273
- export interface GetChatCompletionsHeaders {
274
- "unknown-parameters"?: UnknownParams;
275
- }
276
-
277
- // @public (undocumented)
278
- export type GetChatCompletionsParameters = GetChatCompletionsHeaderParam & GetChatCompletionsBodyParam & RequestParameters;
279
-
280
- // @public (undocumented)
281
- export interface GetModelInfo {
282
- get(options?: GetModelInfoParameters): StreamableMethod<GetModelInfo200Response | GetModelInfoDefaultResponse>;
283
- }
284
-
285
- // @public
286
- export interface GetModelInfo200Response extends HttpResponse {
287
- // (undocumented)
288
- body: ModelInfoOutput;
289
- // (undocumented)
290
- status: "200";
291
- }
292
-
293
- // @public (undocumented)
294
- export interface GetModelInfoDefaultHeaders {
295
- "x-ms-error-code"?: string;
296
- }
297
-
298
- // @public (undocumented)
299
- export interface GetModelInfoDefaultResponse extends HttpResponse {
300
- // (undocumented)
301
- body: ErrorResponse;
302
- // (undocumented)
303
- headers: RawHttpHeaders & GetModelInfoDefaultHeaders;
304
- // (undocumented)
305
- status: string;
306
- }
307
-
308
- // @public (undocumented)
309
- export type GetModelInfoParameters = RequestParameters;
310
-
311
- // @public (undocumented)
312
- export function isUnexpected(response: GetChatCompletions200Response | GetChatCompletionsDefaultResponse): response is GetChatCompletionsDefaultResponse;
313
-
314
- // @public (undocumented)
315
- export function isUnexpected(response: GetModelInfo200Response | GetModelInfoDefaultResponse): response is GetModelInfoDefaultResponse;
316
-
317
- // @public (undocumented)
318
- export type ModelClient = Client & {
319
- path: Routes;
320
- };
321
-
322
- // @public
323
- export interface ModelInfoOutput {
324
- model_name: string;
325
- model_provider_name: string;
326
- model_type: ModelTypeOutput;
327
- }
328
-
329
- // @public
330
- export type ModelTypeOutput = string | "embeddings" | "image_generation" | "text_generation" | "image_embeddings" | "audio_generation" | "chat";
331
-
332
- // @public (undocumented)
333
- export interface Routes {
334
- (path: "/chat/completions"): GetChatCompletions;
335
- (path: "/info"): GetModelInfo;
336
- }
337
-
338
- // @public
339
- export type UnknownParams = string | "error" | "drop" | "pass_through";
340
-
341
- // (No @packageDocumentation comment for this package)
342
-
343
- ```