@azure/ai-projects 1.0.0-beta.3 → 1.0.0-beta.5

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 (298) hide show
  1. package/README.md +185 -5
  2. package/dist/browser/agents/assistants.d.ts.map +1 -1
  3. package/dist/browser/agents/assistants.js +3 -2
  4. package/dist/browser/agents/assistants.js.map +1 -1
  5. package/dist/browser/agents/customModels.d.ts +6 -1
  6. package/dist/browser/agents/customModels.d.ts.map +1 -1
  7. package/dist/browser/agents/customModels.js.map +1 -1
  8. package/dist/browser/agents/index.d.ts +4 -2
  9. package/dist/browser/agents/index.d.ts.map +1 -1
  10. package/dist/browser/agents/index.js +2 -1
  11. package/dist/browser/agents/index.js.map +1 -1
  12. package/dist/browser/agents/inputOutputs.d.ts +4 -4
  13. package/dist/browser/agents/inputOutputs.d.ts.map +1 -1
  14. package/dist/browser/agents/inputOutputs.js.map +1 -1
  15. package/dist/browser/agents/inputValidations.js +2 -2
  16. package/dist/browser/agents/inputValidations.js.map +1 -1
  17. package/dist/browser/agents/messages.js +1 -1
  18. package/dist/browser/agents/messages.js.map +1 -1
  19. package/dist/browser/agents/threads.d.ts +4 -2
  20. package/dist/browser/agents/threads.d.ts.map +1 -1
  21. package/dist/browser/agents/threads.js +23 -0
  22. package/dist/browser/agents/threads.js.map +1 -1
  23. package/dist/browser/agents/utils.d.ts +35 -4
  24. package/dist/browser/agents/utils.d.ts.map +1 -1
  25. package/dist/browser/agents/utils.js +62 -4
  26. package/dist/browser/agents/utils.js.map +1 -1
  27. package/dist/browser/constants.d.ts +1 -1
  28. package/dist/browser/constants.js +1 -1
  29. package/dist/browser/constants.js.map +1 -1
  30. package/dist/browser/customization/convertModelsToWrite.d.ts.map +1 -1
  31. package/dist/browser/customization/convertModelsToWrite.js +24 -2
  32. package/dist/browser/customization/convertModelsToWrite.js.map +1 -1
  33. package/dist/browser/customization/convertOutputModelsFromWire.d.ts +1 -0
  34. package/dist/browser/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  35. package/dist/browser/customization/convertOutputModelsFromWire.js +36 -7
  36. package/dist/browser/customization/convertOutputModelsFromWire.js.map +1 -1
  37. package/dist/browser/customization/models.d.ts +158 -9
  38. package/dist/browser/customization/models.d.ts.map +1 -1
  39. package/dist/browser/customization/models.js.map +1 -1
  40. package/dist/browser/customization/outputModels.d.ts +41 -9
  41. package/dist/browser/customization/outputModels.d.ts.map +1 -1
  42. package/dist/browser/customization/outputModels.js.map +1 -1
  43. package/dist/browser/customization/parameters.d.ts +18 -0
  44. package/dist/browser/customization/parameters.d.ts.map +1 -1
  45. package/dist/browser/customization/parameters.js.map +1 -1
  46. package/dist/browser/generated/src/clientDefinitions.d.ts +6 -4
  47. package/dist/browser/generated/src/clientDefinitions.d.ts.map +1 -1
  48. package/dist/browser/generated/src/clientDefinitions.js.map +1 -1
  49. package/dist/browser/generated/src/isUnexpected.d.ts +2 -1
  50. package/dist/browser/generated/src/isUnexpected.d.ts.map +1 -1
  51. package/dist/browser/generated/src/isUnexpected.js +1 -0
  52. package/dist/browser/generated/src/isUnexpected.js.map +1 -1
  53. package/dist/browser/generated/src/models.d.ts +173 -22
  54. package/dist/browser/generated/src/models.d.ts.map +1 -1
  55. package/dist/browser/generated/src/models.js.map +1 -1
  56. package/dist/browser/generated/src/outputModels.d.ts +173 -21
  57. package/dist/browser/generated/src/outputModels.d.ts.map +1 -1
  58. package/dist/browser/generated/src/outputModels.js.map +1 -1
  59. package/dist/browser/generated/src/paginateHelper.d.ts +1 -1
  60. package/dist/browser/generated/src/paginateHelper.d.ts.map +1 -1
  61. package/dist/browser/generated/src/paginateHelper.js +1 -1
  62. package/dist/browser/generated/src/paginateHelper.js.map +1 -1
  63. package/dist/browser/generated/src/parameters.d.ts +85 -10
  64. package/dist/browser/generated/src/parameters.d.ts.map +1 -1
  65. package/dist/browser/generated/src/parameters.js.map +1 -1
  66. package/dist/browser/generated/src/projectsClient.d.ts +3 -3
  67. package/dist/browser/generated/src/projectsClient.d.ts.map +1 -1
  68. package/dist/browser/generated/src/projectsClient.js +1 -1
  69. package/dist/browser/generated/src/projectsClient.js.map +1 -1
  70. package/dist/browser/generated/src/responses.d.ts +19 -4
  71. package/dist/browser/generated/src/responses.d.ts.map +1 -1
  72. package/dist/browser/generated/src/responses.js.map +1 -1
  73. package/dist/browser/index.d.ts +1 -0
  74. package/dist/browser/index.d.ts.map +1 -1
  75. package/dist/browser/index.js.map +1 -1
  76. package/dist/commonjs/agents/assistants.d.ts.map +1 -1
  77. package/dist/commonjs/agents/assistants.js +3 -2
  78. package/dist/commonjs/agents/assistants.js.map +1 -1
  79. package/dist/commonjs/agents/customModels.d.ts +6 -1
  80. package/dist/commonjs/agents/customModels.d.ts.map +1 -1
  81. package/dist/commonjs/agents/customModels.js.map +1 -1
  82. package/dist/commonjs/agents/index.d.ts +4 -2
  83. package/dist/commonjs/agents/index.d.ts.map +1 -1
  84. package/dist/commonjs/agents/index.js +1 -0
  85. package/dist/commonjs/agents/index.js.map +1 -1
  86. package/dist/commonjs/agents/inputOutputs.d.ts +4 -4
  87. package/dist/commonjs/agents/inputOutputs.d.ts.map +1 -1
  88. package/dist/commonjs/agents/inputOutputs.js.map +1 -1
  89. package/dist/commonjs/agents/inputValidations.js +2 -2
  90. package/dist/commonjs/agents/inputValidations.js.map +1 -1
  91. package/dist/commonjs/agents/messages.js +1 -1
  92. package/dist/commonjs/agents/messages.js.map +1 -1
  93. package/dist/commonjs/agents/threads.d.ts +4 -2
  94. package/dist/commonjs/agents/threads.d.ts.map +1 -1
  95. package/dist/commonjs/agents/threads.js +24 -0
  96. package/dist/commonjs/agents/threads.js.map +1 -1
  97. package/dist/commonjs/agents/utils.d.ts +35 -4
  98. package/dist/commonjs/agents/utils.d.ts.map +1 -1
  99. package/dist/commonjs/agents/utils.js +62 -4
  100. package/dist/commonjs/agents/utils.js.map +1 -1
  101. package/dist/commonjs/constants.d.ts +1 -1
  102. package/dist/commonjs/constants.js +1 -1
  103. package/dist/commonjs/constants.js.map +1 -1
  104. package/dist/commonjs/customization/convertModelsToWrite.d.ts.map +1 -1
  105. package/dist/commonjs/customization/convertModelsToWrite.js +24 -2
  106. package/dist/commonjs/customization/convertModelsToWrite.js.map +1 -1
  107. package/dist/commonjs/customization/convertOutputModelsFromWire.d.ts +1 -0
  108. package/dist/commonjs/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  109. package/dist/commonjs/customization/convertOutputModelsFromWire.js +37 -7
  110. package/dist/commonjs/customization/convertOutputModelsFromWire.js.map +1 -1
  111. package/dist/commonjs/customization/models.d.ts +158 -9
  112. package/dist/commonjs/customization/models.d.ts.map +1 -1
  113. package/dist/commonjs/customization/models.js.map +1 -1
  114. package/dist/commonjs/customization/outputModels.d.ts +41 -9
  115. package/dist/commonjs/customization/outputModels.d.ts.map +1 -1
  116. package/dist/commonjs/customization/outputModels.js.map +1 -1
  117. package/dist/commonjs/customization/parameters.d.ts +18 -0
  118. package/dist/commonjs/customization/parameters.d.ts.map +1 -1
  119. package/dist/commonjs/customization/parameters.js.map +1 -1
  120. package/dist/commonjs/generated/src/clientDefinitions.d.ts +6 -4
  121. package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -1
  122. package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -1
  123. package/dist/commonjs/generated/src/isUnexpected.d.ts +2 -1
  124. package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -1
  125. package/dist/commonjs/generated/src/isUnexpected.js +1 -0
  126. package/dist/commonjs/generated/src/isUnexpected.js.map +1 -1
  127. package/dist/commonjs/generated/src/models.d.ts +173 -22
  128. package/dist/commonjs/generated/src/models.d.ts.map +1 -1
  129. package/dist/commonjs/generated/src/models.js.map +1 -1
  130. package/dist/commonjs/generated/src/outputModels.d.ts +173 -21
  131. package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -1
  132. package/dist/commonjs/generated/src/outputModels.js.map +1 -1
  133. package/dist/commonjs/generated/src/paginateHelper.d.ts +1 -1
  134. package/dist/commonjs/generated/src/paginateHelper.d.ts.map +1 -1
  135. package/dist/commonjs/generated/src/paginateHelper.js.map +1 -1
  136. package/dist/commonjs/generated/src/parameters.d.ts +85 -10
  137. package/dist/commonjs/generated/src/parameters.d.ts.map +1 -1
  138. package/dist/commonjs/generated/src/parameters.js.map +1 -1
  139. package/dist/commonjs/generated/src/projectsClient.d.ts +3 -3
  140. package/dist/commonjs/generated/src/projectsClient.d.ts.map +1 -1
  141. package/dist/commonjs/generated/src/projectsClient.js +1 -1
  142. package/dist/commonjs/generated/src/projectsClient.js.map +1 -1
  143. package/dist/commonjs/generated/src/responses.d.ts +19 -4
  144. package/dist/commonjs/generated/src/responses.d.ts.map +1 -1
  145. package/dist/commonjs/generated/src/responses.js.map +1 -1
  146. package/dist/commonjs/index.d.ts +1 -0
  147. package/dist/commonjs/index.d.ts.map +1 -1
  148. package/dist/commonjs/index.js.map +1 -1
  149. package/dist/commonjs/tsdoc-metadata.json +1 -1
  150. package/dist/esm/agents/assistants.d.ts.map +1 -1
  151. package/dist/esm/agents/assistants.js +3 -2
  152. package/dist/esm/agents/assistants.js.map +1 -1
  153. package/dist/esm/agents/customModels.d.ts +6 -1
  154. package/dist/esm/agents/customModels.d.ts.map +1 -1
  155. package/dist/esm/agents/customModels.js.map +1 -1
  156. package/dist/esm/agents/index.d.ts +4 -2
  157. package/dist/esm/agents/index.d.ts.map +1 -1
  158. package/dist/esm/agents/index.js +2 -1
  159. package/dist/esm/agents/index.js.map +1 -1
  160. package/dist/esm/agents/inputOutputs.d.ts +4 -4
  161. package/dist/esm/agents/inputOutputs.d.ts.map +1 -1
  162. package/dist/esm/agents/inputOutputs.js.map +1 -1
  163. package/dist/esm/agents/inputValidations.js +2 -2
  164. package/dist/esm/agents/inputValidations.js.map +1 -1
  165. package/dist/esm/agents/messages.js +1 -1
  166. package/dist/esm/agents/messages.js.map +1 -1
  167. package/dist/esm/agents/threads.d.ts +4 -2
  168. package/dist/esm/agents/threads.d.ts.map +1 -1
  169. package/dist/esm/agents/threads.js +23 -0
  170. package/dist/esm/agents/threads.js.map +1 -1
  171. package/dist/esm/agents/utils.d.ts +35 -4
  172. package/dist/esm/agents/utils.d.ts.map +1 -1
  173. package/dist/esm/agents/utils.js +62 -4
  174. package/dist/esm/agents/utils.js.map +1 -1
  175. package/dist/esm/constants.d.ts +1 -1
  176. package/dist/esm/constants.js +1 -1
  177. package/dist/esm/constants.js.map +1 -1
  178. package/dist/esm/customization/convertModelsToWrite.d.ts.map +1 -1
  179. package/dist/esm/customization/convertModelsToWrite.js +24 -2
  180. package/dist/esm/customization/convertModelsToWrite.js.map +1 -1
  181. package/dist/esm/customization/convertOutputModelsFromWire.d.ts +1 -0
  182. package/dist/esm/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  183. package/dist/esm/customization/convertOutputModelsFromWire.js +36 -7
  184. package/dist/esm/customization/convertOutputModelsFromWire.js.map +1 -1
  185. package/dist/esm/customization/models.d.ts +158 -9
  186. package/dist/esm/customization/models.d.ts.map +1 -1
  187. package/dist/esm/customization/models.js.map +1 -1
  188. package/dist/esm/customization/outputModels.d.ts +41 -9
  189. package/dist/esm/customization/outputModels.d.ts.map +1 -1
  190. package/dist/esm/customization/outputModels.js.map +1 -1
  191. package/dist/esm/customization/parameters.d.ts +18 -0
  192. package/dist/esm/customization/parameters.d.ts.map +1 -1
  193. package/dist/esm/customization/parameters.js.map +1 -1
  194. package/dist/esm/generated/src/clientDefinitions.d.ts +6 -4
  195. package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -1
  196. package/dist/esm/generated/src/clientDefinitions.js.map +1 -1
  197. package/dist/esm/generated/src/isUnexpected.d.ts +2 -1
  198. package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -1
  199. package/dist/esm/generated/src/isUnexpected.js +1 -0
  200. package/dist/esm/generated/src/isUnexpected.js.map +1 -1
  201. package/dist/esm/generated/src/models.d.ts +173 -22
  202. package/dist/esm/generated/src/models.d.ts.map +1 -1
  203. package/dist/esm/generated/src/models.js.map +1 -1
  204. package/dist/esm/generated/src/outputModels.d.ts +173 -21
  205. package/dist/esm/generated/src/outputModels.d.ts.map +1 -1
  206. package/dist/esm/generated/src/outputModels.js.map +1 -1
  207. package/dist/esm/generated/src/paginateHelper.d.ts +1 -1
  208. package/dist/esm/generated/src/paginateHelper.d.ts.map +1 -1
  209. package/dist/esm/generated/src/paginateHelper.js +1 -1
  210. package/dist/esm/generated/src/paginateHelper.js.map +1 -1
  211. package/dist/esm/generated/src/parameters.d.ts +85 -10
  212. package/dist/esm/generated/src/parameters.d.ts.map +1 -1
  213. package/dist/esm/generated/src/parameters.js.map +1 -1
  214. package/dist/esm/generated/src/projectsClient.d.ts +3 -3
  215. package/dist/esm/generated/src/projectsClient.d.ts.map +1 -1
  216. package/dist/esm/generated/src/projectsClient.js +1 -1
  217. package/dist/esm/generated/src/projectsClient.js.map +1 -1
  218. package/dist/esm/generated/src/responses.d.ts +19 -4
  219. package/dist/esm/generated/src/responses.d.ts.map +1 -1
  220. package/dist/esm/generated/src/responses.js.map +1 -1
  221. package/dist/esm/index.d.ts +1 -0
  222. package/dist/esm/index.d.ts.map +1 -1
  223. package/dist/esm/index.js.map +1 -1
  224. package/dist/react-native/agents/assistants.d.ts.map +1 -1
  225. package/dist/react-native/agents/assistants.js +3 -2
  226. package/dist/react-native/agents/assistants.js.map +1 -1
  227. package/dist/react-native/agents/customModels.d.ts +6 -1
  228. package/dist/react-native/agents/customModels.d.ts.map +1 -1
  229. package/dist/react-native/agents/customModels.js.map +1 -1
  230. package/dist/react-native/agents/index.d.ts +4 -2
  231. package/dist/react-native/agents/index.d.ts.map +1 -1
  232. package/dist/react-native/agents/index.js +2 -1
  233. package/dist/react-native/agents/index.js.map +1 -1
  234. package/dist/react-native/agents/inputOutputs.d.ts +4 -4
  235. package/dist/react-native/agents/inputOutputs.d.ts.map +1 -1
  236. package/dist/react-native/agents/inputOutputs.js.map +1 -1
  237. package/dist/react-native/agents/inputValidations.js +2 -2
  238. package/dist/react-native/agents/inputValidations.js.map +1 -1
  239. package/dist/react-native/agents/messages.js +1 -1
  240. package/dist/react-native/agents/messages.js.map +1 -1
  241. package/dist/react-native/agents/threads.d.ts +4 -2
  242. package/dist/react-native/agents/threads.d.ts.map +1 -1
  243. package/dist/react-native/agents/threads.js +23 -0
  244. package/dist/react-native/agents/threads.js.map +1 -1
  245. package/dist/react-native/agents/utils.d.ts +35 -4
  246. package/dist/react-native/agents/utils.d.ts.map +1 -1
  247. package/dist/react-native/agents/utils.js +62 -4
  248. package/dist/react-native/agents/utils.js.map +1 -1
  249. package/dist/react-native/constants.d.ts +1 -1
  250. package/dist/react-native/constants.js +1 -1
  251. package/dist/react-native/constants.js.map +1 -1
  252. package/dist/react-native/customization/convertModelsToWrite.d.ts.map +1 -1
  253. package/dist/react-native/customization/convertModelsToWrite.js +24 -2
  254. package/dist/react-native/customization/convertModelsToWrite.js.map +1 -1
  255. package/dist/react-native/customization/convertOutputModelsFromWire.d.ts +1 -0
  256. package/dist/react-native/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  257. package/dist/react-native/customization/convertOutputModelsFromWire.js +36 -7
  258. package/dist/react-native/customization/convertOutputModelsFromWire.js.map +1 -1
  259. package/dist/react-native/customization/models.d.ts +158 -9
  260. package/dist/react-native/customization/models.d.ts.map +1 -1
  261. package/dist/react-native/customization/models.js.map +1 -1
  262. package/dist/react-native/customization/outputModels.d.ts +41 -9
  263. package/dist/react-native/customization/outputModels.d.ts.map +1 -1
  264. package/dist/react-native/customization/outputModels.js.map +1 -1
  265. package/dist/react-native/customization/parameters.d.ts +18 -0
  266. package/dist/react-native/customization/parameters.d.ts.map +1 -1
  267. package/dist/react-native/customization/parameters.js.map +1 -1
  268. package/dist/react-native/generated/src/clientDefinitions.d.ts +6 -4
  269. package/dist/react-native/generated/src/clientDefinitions.d.ts.map +1 -1
  270. package/dist/react-native/generated/src/clientDefinitions.js.map +1 -1
  271. package/dist/react-native/generated/src/isUnexpected.d.ts +2 -1
  272. package/dist/react-native/generated/src/isUnexpected.d.ts.map +1 -1
  273. package/dist/react-native/generated/src/isUnexpected.js +1 -0
  274. package/dist/react-native/generated/src/isUnexpected.js.map +1 -1
  275. package/dist/react-native/generated/src/models.d.ts +173 -22
  276. package/dist/react-native/generated/src/models.d.ts.map +1 -1
  277. package/dist/react-native/generated/src/models.js.map +1 -1
  278. package/dist/react-native/generated/src/outputModels.d.ts +173 -21
  279. package/dist/react-native/generated/src/outputModels.d.ts.map +1 -1
  280. package/dist/react-native/generated/src/outputModels.js.map +1 -1
  281. package/dist/react-native/generated/src/paginateHelper.d.ts +1 -1
  282. package/dist/react-native/generated/src/paginateHelper.d.ts.map +1 -1
  283. package/dist/react-native/generated/src/paginateHelper.js +1 -1
  284. package/dist/react-native/generated/src/paginateHelper.js.map +1 -1
  285. package/dist/react-native/generated/src/parameters.d.ts +85 -10
  286. package/dist/react-native/generated/src/parameters.d.ts.map +1 -1
  287. package/dist/react-native/generated/src/parameters.js.map +1 -1
  288. package/dist/react-native/generated/src/projectsClient.d.ts +3 -3
  289. package/dist/react-native/generated/src/projectsClient.d.ts.map +1 -1
  290. package/dist/react-native/generated/src/projectsClient.js +1 -1
  291. package/dist/react-native/generated/src/projectsClient.js.map +1 -1
  292. package/dist/react-native/generated/src/responses.d.ts +19 -4
  293. package/dist/react-native/generated/src/responses.d.ts.map +1 -1
  294. package/dist/react-native/generated/src/responses.js.map +1 -1
  295. package/dist/react-native/index.d.ts +1 -0
  296. package/dist/react-native/index.d.ts.map +1 -1
  297. package/dist/react-native/index.js.map +1 -1
  298. package/package.json +4 -4
@@ -3,8 +3,8 @@ export * from "./streamingModels.js";
3
3
  export * from "./vectorStoresModels.js";
4
4
  export * from "./utils.js";
5
5
  export * from "../customization/streamingModels.js";
6
- export type { OpenAIPageableListOfThreadRunOutput, ThreadRunOutput, AgentThreadOutput, RunStepOutput, OpenAIPageableListOfRunStepOutput, ThreadMessageOutput, ThreadDeletionStatusOutput, OpenAIPageableListOfThreadMessageOutput, OpenAIPageableListOfVectorStoreOutput, VectorStoreOutput, VectorStoreFileOutput, VectorStoreDeletionStatusOutput, VectorStoreFileDeletionStatusOutput, VectorStoreFileBatchOutput, OpenAIPageableListOfVectorStoreFileOutput, AgentDeletionStatusOutput, AgentOutput, OpenAIPageableListOfAgentOutput, FileDeletionStatusOutput, FileListResponseOutput, OpenAIFileOutput, RequiredActionOutput, RequiredToolCallOutput, ToolDefinitionOutputParent, AgentsApiResponseFormatOptionOutput, ToolDefinitionOutput, ToolResourcesOutput, AgentsApiResponseFormatModeOutput, AgentsApiResponseFormatOutput, FilePurposeOutput, FileStateOutput, RequiredActionOutputParent, SubmitToolOutputsActionOutput, RequiredToolCallOutputParent, RequiredFunctionToolCallOutput, RunStepErrorOutput, RunStepStatusOutput, RunStepDetailsOutput, RunStepTypeOutput, RunStepCompletionUsageOutput, MessageAttachmentOutput, MessageContentOutput, MessageIncompleteDetailsOutput, MessageRoleOutput, MessageStatusOutput, IncompleteRunDetailsOutput, RunErrorOutput, RunStatusOutput, AgentsApiToolChoiceOptionOutput, UpdateToolResourcesOptionsOutput, TruncationObjectOutput, RunCompletionUsageOutput, CodeInterpreterToolDefinitionOutput, FileSearchToolDefinitionOutput, FunctionToolDefinitionOutput, BingGroundingToolDefinitionOutput, AzureAISearchToolDefinitionOutput, AzureAISearchResourceOutput, CodeInterpreterToolResourceOutput, FileSearchToolResourceOutput, VectorStoreFileCountOutput, VectorStoreFileBatchStatusOutput, VectorStoreChunkingStrategyResponseOutput, VectorStoreConfigurationOutput, AgentsNamedToolChoiceOutput, IndexResourceOutput, ToolConnectionListOutput, VectorStoreDataSourceOutput, FileSearchToolDefinitionDetailsOutput, VectorStoreConfigurationsOutput, FunctionDefinitionOutput, MessageAttachmentToolDefinitionOutput, MessageContentOutputParent, MessageTextContentOutput, MessageImageFileContentOutput, RequiredFunctionToolCallDetailsOutput, RunStepDetailsOutputParent, RunStepMessageCreationDetailsOutput, RunStepToolCallDetailsOutput, RunStepErrorCodeOutput, SubmitToolOutputsDetailsOutput, MicrosoftFabricToolDefinitionOutput, SharepointToolDefinitionOutput, UpdateCodeInterpreterToolResourceOptionsOutput, UpdateFileSearchToolResourceOptionsOutput, VectorStoreChunkingStrategyResponseOutputParent, VectorStoreAutoChunkingStrategyResponseOutput, VectorStoreStaticChunkingStrategyResponseOutput, VectorStoreFileErrorOutput, VectorStoreFileStatusOutput, VectorStoreExpirationPolicyOutput, VectorStoreStatusOutput, AgentsApiToolChoiceOptionModeOutput, FunctionNameOutput, AgentsNamedToolChoiceTypeOutput, MessageImageFileDetailsOutput, MessageIncompleteDetailsReasonOutput, MessageTextDetailsOutput, RunStepMessageCreationReferenceOutput, RunStepToolCallOutput, ToolConnectionOutput, TruncationStrategyOutput, VectorStoreChunkingStrategyResponseTypeOutput, VectorStoreDataSourceAssetTypeOutput, VectorStoreExpirationPolicyAnchorOutput, VectorStoreFileErrorCodeOutput, VectorStoreStaticChunkingStrategyOptionsOutput, FileSearchRankingOptionsOutput, MessageTextAnnotationOutput, RunStepToolCallOutputParent, RunStepCodeInterpreterToolCallOutput, RunStepFileSearchToolCallOutput, RunStepBingGroundingToolCallOutput, RunStepAzureAISearchToolCallOutput, RunStepSharepointToolCallOutput, RunStepMicrosoftFabricToolCallOutput, RunStepFunctionToolCallOutput, MessageTextAnnotationOutputParent, MessageTextFileCitationAnnotationOutput, MessageTextFilePathAnnotationOutput, RunStepCodeInterpreterToolCallOutputOutputParent, RunStepCodeInterpreterToolCallDetailsOutput, RunStepFunctionToolCallDetailsOutput, MessageTextFileCitationDetailsOutput, MessageTextFilePathDetailsOutput, RunStepCodeInterpreterToolCallOutputOutput, RunStepCodeInterpreterLogOutputOutput, RunStepCodeInterpreterImageOutputOutput, RunStepCodeInterpreterImageReferenceOutput, ResponseFormatOutput, ResponseFormatJsonSchemaTypeOutput, IncompleteDetailsReasonOutput, RunStepFileSearchToolCallResultsOutput, ResponseFormatJsonSchemaOutput, RunStepFileSearchToolCallResultOutput, FileSearchToolCallContentOutput, AzureFunctionToolDefinitionOutput, AzureFunctionDefinitionOutput, AzureFunctionBindingOutput, OpenApiToolDefinitionOutput, OpenApiFunctionDefinitionOutput, OpenApiAuthDetailsOutput, OpenApiAuthTypeOutput, OpenApiAuthDetailsOutputParent, OpenApiAnonymousAuthDetailsOutput, OpenApiConnectionAuthDetailsOutput, OpenApiManagedAuthDetailsOutput, AzureFunctionStorageQueueOutput, OpenApiConnectionSecuritySchemeOutput, OpenApiManagedSecuritySchemeOutput, } from "../customization/outputModels.js";
7
- export { ListMessagesQueryParamProperties, ListFilesQueryParamProperties, } from "../customization/parameters.js";
8
- export type { AgentRunResponse, CreateRunOptionalParams, GetRunOptionalParams, CancelRunOptionalParams, SubmitToolOutputsToRunOptionalParams, UpdateRunOptionalParams, ListRunQueryOptionalParams, CreateAndRunThreadOptionalParams, CreateAgentThreadOptionalParams, GetAgentThreadOptionalParams, UpdateAgentThreadOptionalParams, DeleteAgentThreadOptionalParams, GetRunStepOptionalParams, ListRunStepsOptionalParams, CreateMessageOptionalParams, ListMessagesOptionalParams, UpdateMessageOptionalParams, GetVectorStoreOptionalParams, ListVectorStoresOptionalParams, UpdateVectorStoreOptionalParams, DeleteVectorStoreOptionalParams, CreateVectorStoreOptionalParams, CreateVectorStoreFileOptionalParams, ListVectorStoreFilesOptionalParams, GetVectorStoreFileOptionalParams, DeleteVectorStoreFileOptionalParams, CreateVectorStoreFileBatchOptionalParams, GetVectorStoreFileBatchOptionalParams, ListVectorStoreFileBatchFilesOptionalParams, CreateAgentOptionalParams, ListAgentsOptionalParams, GetAgentOptionalParams, UpdateAgentOptionalParams, DeleteFileOptionalParams, GetFileOptionalParams, GetFileContentOptionalParams, ListFilesOptionalParams, UploadFileOptionalParams, ListQueryParameters, PollingOptions, PollingOptionsParams, CancelVectorStoreFileBatchOptionalParams, DeleteAgentOptionalParams, } from "./customModels.js";
9
- export { AzureAISearchToolDefinition, CodeInterpreterToolDefinition, FileSearchToolDefinition, FileSearchToolDefinitionDetails, FunctionDefinition, FunctionToolDefinition, ToolResources, VectorStoreConfigurations, VectorStoreDataSource, ToolDefinition, ThreadMessageOptions, ToolOutput, FilePurpose, ToolDefinitionParent, AgentThreadCreationOptions, CreateAgentOptions, CreateAndRunThreadOptions, CreateRunOptions, UpdateAgentOptions, UpdateAgentThreadOptions, VectorStoreFileStatusFilter, VectorStoreOptions, VectorStoreUpdateOptions, AgentsApiResponseFormatMode, AgentsApiToolChoiceOption, TruncationObject, UpdateToolResourcesOptions, VectorStoreChunkingStrategyRequest, FileSearchRankingOptions, AgentsApiToolChoiceOptionMode, AgentsNamedToolChoice, AgentsApiResponseFormatOption, ConnectionType, ListSortOrder, MessageAttachment, BingGroundingToolDefinition, MicrosoftFabricToolDefinition, SharepointToolDefinition, AzureAISearchResource, CodeInterpreterToolResource, FileSearchToolResource, TruncationStrategy, UpdateCodeInterpreterToolResourceOptions, UpdateFileSearchToolResourceOptions, VectorStoreChunkingStrategyRequestParent, VectorStoreAutoChunkingStrategyRequest, VectorStoreStaticChunkingStrategyRequest, VectorStoreConfiguration, VectorStoreDataSourceAssetType, AgentsApiResponseFormat, FunctionName, AgentsNamedToolChoiceType, IndexResource, ToolConnectionList, MessageAttachmentToolDefinition, MessageRole, VectorStoreChunkingStrategyRequestType, VectorStoreExpirationPolicy, VectorStoreStaticChunkingStrategyOptions, ToolConnection, VectorStoreExpirationPolicyAnchor, ResponseFormat, ResponseFormatJsonSchemaType, OpenApiToolDefinition, AzureFunctionToolDefinition, OpenApiFunctionDefinition, ResponseFormatJsonSchema, AzureFunctionDefinition, AzureFunctionBinding, OpenApiAuthDetails, AzureFunctionStorageQueue, OpenApiAuthType, OpenApiAuthDetailsParent, OpenApiAnonymousAuthDetails, OpenApiConnectionAuthDetails, OpenApiManagedAuthDetails, OpenApiConnectionSecurityScheme, OpenApiManagedSecurityScheme, } from "../customization/models.js";
6
+ export type { OpenAIPageableListOfThreadRunOutput, ThreadRunOutput, AgentThreadOutput, RunStepOutput, OpenAIPageableListOfRunStepOutput, ThreadMessageOutput, ThreadDeletionStatusOutput, OpenAIPageableListOfThreadMessageOutput, OpenAIPageableListOfVectorStoreOutput, VectorStoreOutput, VectorStoreFileOutput, VectorStoreDeletionStatusOutput, VectorStoreFileDeletionStatusOutput, VectorStoreFileBatchOutput, OpenAIPageableListOfVectorStoreFileOutput, AgentDeletionStatusOutput, AgentOutput, OpenAIPageableListOfAgentOutput, FileDeletionStatusOutput, FileListResponseOutput, OpenAIFileOutput, RequiredActionOutput, RequiredToolCallOutput, ToolDefinitionOutputParent, AgentsApiResponseFormatOptionOutput, ToolDefinitionOutput, ToolResourcesOutput, AgentsApiResponseFormatModeOutput, AgentsApiResponseFormatOutput, FilePurposeOutput, FileStateOutput, RequiredActionOutputParent, SubmitToolOutputsActionOutput, RequiredToolCallOutputParent, RequiredFunctionToolCallOutput, RunStepErrorOutput, RunStepStatusOutput, RunStepDetailsOutput, RunStepTypeOutput, RunStepCompletionUsageOutput, MessageAttachmentOutput, MessageContentOutput, MessageIncompleteDetailsOutput, MessageRoleOutput, MessageStatusOutput, IncompleteRunDetailsOutput, RunErrorOutput, RunStatusOutput, AgentsApiToolChoiceOptionOutput, UpdateToolResourcesOptionsOutput, TruncationObjectOutput, RunCompletionUsageOutput, CodeInterpreterToolDefinitionOutput, FileSearchToolDefinitionOutput, FunctionToolDefinitionOutput, BingGroundingToolDefinitionOutput, BingCustomSearchToolDefinitionOutput, SearchConfigurationListOutput, SearchConfigurationOutput, AzureAISearchToolDefinitionOutput, AzureAISearchResourceOutput, CodeInterpreterToolResourceOutput, FileSearchToolResourceOutput, VectorStoreFileCountOutput, VectorStoreFileBatchStatusOutput, VectorStoreChunkingStrategyResponseOutput, VectorStoreConfigurationOutput, AgentsNamedToolChoiceOutput, IndexResourceOutput, ToolConnectionListOutput, VectorStoreDataSourceOutput, FileSearchToolDefinitionDetailsOutput, VectorStoreConfigurationsOutput, FunctionDefinitionOutput, MessageAttachmentToolDefinitionOutput, MessageContentOutputParent, MessageTextContentOutput, MessageImageFileContentOutput, RequiredFunctionToolCallDetailsOutput, RunStepDetailsOutputParent, RunStepMessageCreationDetailsOutput, RunStepToolCallDetailsOutput, RunStepErrorCodeOutput, SubmitToolOutputsDetailsOutput, MicrosoftFabricToolDefinitionOutput, SharepointToolDefinitionOutput, UpdateCodeInterpreterToolResourceOptionsOutput, UpdateFileSearchToolResourceOptionsOutput, VectorStoreChunkingStrategyResponseOutputParent, VectorStoreAutoChunkingStrategyResponseOutput, VectorStoreStaticChunkingStrategyResponseOutput, VectorStoreFileErrorOutput, VectorStoreFileStatusOutput, VectorStoreExpirationPolicyOutput, VectorStoreStatusOutput, AgentsApiToolChoiceOptionModeOutput, FunctionNameOutput, AgentsNamedToolChoiceTypeOutput, MessageImageFileDetailsOutput, MessageIncompleteDetailsReasonOutput, MessageTextDetailsOutput, RunStepMessageCreationReferenceOutput, RunStepToolCallOutput, ToolConnectionOutput, TruncationStrategyOutput, VectorStoreChunkingStrategyResponseTypeOutput, VectorStoreDataSourceAssetTypeOutput, VectorStoreExpirationPolicyAnchorOutput, VectorStoreFileErrorCodeOutput, VectorStoreStaticChunkingStrategyOptionsOutput, FileSearchRankingOptionsOutput, MessageTextAnnotationOutput, RunStepToolCallOutputParent, RunStepCodeInterpreterToolCallOutput, RunStepFileSearchToolCallOutput, RunStepBingGroundingToolCallOutput, RunStepAzureAISearchToolCallOutput, RunStepSharepointToolCallOutput, RunStepMicrosoftFabricToolCallOutput, RunStepFunctionToolCallOutput, MessageTextAnnotationOutputParent, MessageTextFileCitationAnnotationOutput, MessageTextFilePathAnnotationOutput, RunStepCodeInterpreterToolCallOutputOutputParent, RunStepCodeInterpreterToolCallDetailsOutput, RunStepFunctionToolCallDetailsOutput, MessageTextFileCitationDetailsOutput, MessageTextFilePathDetailsOutput, RunStepCodeInterpreterToolCallOutputOutput, RunStepCodeInterpreterLogOutputOutput, RunStepCodeInterpreterImageOutputOutput, RunStepCodeInterpreterImageReferenceOutput, ResponseFormatOutput, ResponseFormatJsonSchemaTypeOutput, IncompleteDetailsReasonOutput, RunStepFileSearchToolCallResultsOutput, ResponseFormatJsonSchemaOutput, RunStepFileSearchToolCallResultOutput, FileSearchToolCallContentOutput, AzureFunctionToolDefinitionOutput, AzureFunctionDefinitionOutput, AzureFunctionBindingOutput, OpenApiToolDefinitionOutput, OpenApiFunctionDefinitionOutput, OpenApiAuthDetailsOutput, OpenApiAuthTypeOutput, OpenApiAuthDetailsOutputParent, OpenApiAnonymousAuthDetailsOutput, OpenApiConnectionAuthDetailsOutput, OpenApiManagedAuthDetailsOutput, AzureFunctionStorageQueueOutput, OpenApiConnectionSecuritySchemeOutput, OpenApiManagedSecuritySchemeOutput, OpenAIPageableListOfAgentThreadOutput, } from "../customization/outputModels.js";
7
+ export { ListMessagesQueryParamProperties, ListFilesQueryParamProperties, ListThreadsQueryParamProperties, } from "../customization/parameters.js";
8
+ export type { AgentRunResponse, CreateRunOptionalParams, GetRunOptionalParams, CancelRunOptionalParams, SubmitToolOutputsToRunOptionalParams, UpdateRunOptionalParams, ListRunQueryOptionalParams, CreateAndRunThreadOptionalParams, CreateAgentThreadOptionalParams, GetAgentThreadOptionalParams, UpdateAgentThreadOptionalParams, DeleteAgentThreadOptionalParams, GetRunStepOptionalParams, ListRunStepsOptionalParams, CreateMessageOptionalParams, ListMessagesOptionalParams, UpdateMessageOptionalParams, GetVectorStoreOptionalParams, ListVectorStoresOptionalParams, UpdateVectorStoreOptionalParams, DeleteVectorStoreOptionalParams, CreateVectorStoreOptionalParams, CreateVectorStoreFileOptionalParams, ListVectorStoreFilesOptionalParams, GetVectorStoreFileOptionalParams, DeleteVectorStoreFileOptionalParams, CreateVectorStoreFileBatchOptionalParams, GetVectorStoreFileBatchOptionalParams, ListVectorStoreFileBatchFilesOptionalParams, CreateAgentOptionalParams, ListAgentsOptionalParams, GetAgentOptionalParams, UpdateAgentOptionalParams, DeleteFileOptionalParams, GetFileOptionalParams, GetFileContentOptionalParams, ListFilesOptionalParams, UploadFileOptionalParams, ListQueryParameters, PollingOptions, PollingOptionsParams, CancelVectorStoreFileBatchOptionalParams, DeleteAgentOptionalParams, ListAgentThreadOptionalParams, } from "./customModels.js";
9
+ export { AzureAISearchToolDefinition, CodeInterpreterToolDefinition, FileSearchToolDefinition, FileSearchToolDefinitionDetails, FunctionDefinition, FunctionToolDefinition, ToolResources, VectorStoreConfigurations, VectorStoreDataSource, ToolDefinition, ThreadMessageOptions, ToolOutput, FilePurpose, ToolDefinitionParent, AgentThreadCreationOptions, CreateAgentOptions, CreateAndRunThreadOptions, CreateRunOptions, UpdateAgentOptions, UpdateAgentThreadOptions, VectorStoreFileStatusFilter, VectorStoreOptions, VectorStoreUpdateOptions, AgentsApiResponseFormatMode, AgentsApiToolChoiceOption, TruncationObject, UpdateToolResourcesOptions, VectorStoreChunkingStrategyRequest, FileSearchRankingOptions, AgentsApiToolChoiceOptionMode, AgentsNamedToolChoice, AgentsApiResponseFormatOption, ConnectionType, ListSortOrder, MessageAttachment, BingGroundingToolDefinition, MicrosoftFabricToolDefinition, SharepointToolDefinition, AzureAISearchResource, CodeInterpreterToolResource, FileSearchToolResource, TruncationStrategy, UpdateCodeInterpreterToolResourceOptions, UpdateFileSearchToolResourceOptions, VectorStoreChunkingStrategyRequestParent, VectorStoreAutoChunkingStrategyRequest, VectorStoreStaticChunkingStrategyRequest, VectorStoreConfiguration, VectorStoreDataSourceAssetType, AgentsApiResponseFormat, FunctionName, AgentsNamedToolChoiceType, IndexResource, ToolConnectionList, MessageAttachmentToolDefinition, MessageRole, VectorStoreChunkingStrategyRequestType, VectorStoreExpirationPolicy, VectorStoreStaticChunkingStrategyOptions, ToolConnection, VectorStoreExpirationPolicyAnchor, ResponseFormat, ResponseFormatJsonSchemaType, OpenApiToolDefinition, AzureFunctionToolDefinition, OpenApiFunctionDefinition, ResponseFormatJsonSchema, AzureFunctionDefinition, AzureFunctionBinding, OpenApiAuthDetails, AzureFunctionStorageQueue, OpenApiAuthType, OpenApiAuthDetailsParent, OpenApiAnonymousAuthDetails, OpenApiConnectionAuthDetails, OpenApiManagedAuthDetails, OpenApiConnectionSecurityScheme, OpenApiManagedSecurityScheme, CreateMessageContent, MessageContentBlockInput, MessageContentBlockInputParent, MessageTextBlockInput, MessageImageFileBlockInput, MessageImageUrlBlockInput, MessageBlockType, MessageImageFileParam, MessageImageUrlParam, ImageDetailLevel, AzureFunctionToolResource, } from "../customization/models.js";
10
10
  //# sourceMappingURL=inputOutputs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inputOutputs.d.ts","sourceRoot":"","sources":["../../../src/agents/inputOutputs.ts"],"names":[],"mappings":"AAGA,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,qCAAqC,CAAC;AACpD,YAAY,EACV,mCAAmC,EACnC,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,iCAAiC,EACjC,mBAAmB,EACnB,0BAA0B,EAC1B,uCAAuC,EACvC,qCAAqC,EACrC,iBAAiB,EACjB,qBAAqB,EACrB,+BAA+B,EAC/B,mCAAmC,EACnC,0BAA0B,EAC1B,yCAAyC,EACzC,yBAAyB,EACzB,WAAW,EACX,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,mCAAmC,EACnC,oBAAoB,EACpB,mBAAmB,EACnB,iCAAiC,EACjC,6BAA6B,EAC7B,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,6BAA6B,EAC7B,4BAA4B,EAC5B,8BAA8B,EAC9B,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EACpB,8BAA8B,EAC9B,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EAC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oBAAoB,EACpB,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,gBAAgB,EAChB,0BAA0B,EAC1B,kCAAkC,EAClC,wBAAwB,EACxB,6BAA6B,EAC7B,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,2BAA2B,EAC3B,6BAA6B,EAC7B,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,sBAAsB,EACtB,kBAAkB,EAClB,wCAAwC,EACxC,mCAAmC,EACnC,wCAAwC,EACxC,sCAAsC,EACtC,wCAAwC,EACxC,wBAAwB,EACxB,8BAA8B,EAC9B,uBAAuB,EACvB,YAAY,EACZ,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,+BAA+B,EAC/B,WAAW,EACX,sCAAsC,EACtC,2BAA2B,EAC3B,wCAAwC,EACxC,cAAc,EACd,iCAAiC,EACjC,cAAc,EACd,4BAA4B,EAC5B,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"inputOutputs.d.ts","sourceRoot":"","sources":["../../../src/agents/inputOutputs.ts"],"names":[],"mappings":"AAGA,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,qCAAqC,CAAC;AACpD,YAAY,EACV,mCAAmC,E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,EACnC,wCAAwC,EACxC,sCAAsC,EACtC,wCAAwC,EACxC,wBAAwB,EACxB,8BAA8B,EAC9B,uBAAuB,EACvB,YAAY,EACZ,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,+BAA+B,EAC/B,WAAW,EACX,sCAAsC,EACtC,2BAA2B,EAC3B,wCAAwC,EACxC,cAAc,EACd,iCAAiC,EACjC,cAAc,EACd,4BAA4B,EAC5B,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,4BAA4B,EAC5B,oBAAoB,EACpB,wBAAwB,EACxB,8BAA8B,EAC9B,qBAAqB,EACrB,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"inputOutputs.js","sourceRoot":"","sources":["../../../src/agents/inputOutputs.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,qCAAqC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"../customization/streamingModels.js\";\nexport * from \"./streamingModels.js\";\nexport * from \"./vectorStoresModels.js\";\nexport * from \"./utils.js\";\nexport * from \"../customization/streamingModels.js\";\nexport type {\n OpenAIPageableListOfThreadRunOutput,\n ThreadRunOutput,\n AgentThreadOutput,\n RunStepOutput,\n OpenAIPageableListOfRunStepOutput,\n ThreadMessageOutput,\n ThreadDeletionStatusOutput,\n OpenAIPageableListOfThreadMessageOutput,\n OpenAIPageableListOfVectorStoreOutput,\n VectorStoreOutput,\n VectorStoreFileOutput,\n VectorStoreDeletionStatusOutput,\n VectorStoreFileDeletionStatusOutput,\n VectorStoreFileBatchOutput,\n OpenAIPageableListOfVectorStoreFileOutput,\n AgentDeletionStatusOutput,\n AgentOutput,\n OpenAIPageableListOfAgentOutput,\n FileDeletionStatusOutput,\n FileListResponseOutput,\n OpenAIFileOutput,\n RequiredActionOutput,\n RequiredToolCallOutput,\n ToolDefinitionOutputParent,\n AgentsApiResponseFormatOptionOutput,\n ToolDefinitionOutput,\n ToolResourcesOutput,\n AgentsApiResponseFormatModeOutput,\n AgentsApiResponseFormatOutput,\n FilePurposeOutput,\n FileStateOutput,\n RequiredActionOutputParent,\n SubmitToolOutputsActionOutput,\n RequiredToolCallOutputParent,\n RequiredFunctionToolCallOutput,\n RunStepErrorOutput,\n RunStepStatusOutput,\n RunStepDetailsOutput,\n RunStepTypeOutput,\n RunStepCompletionUsageOutput,\n MessageAttachmentOutput,\n MessageContentOutput,\n MessageIncompleteDetailsOutput,\n MessageRoleOutput,\n MessageStatusOutput,\n IncompleteRunDetailsOutput,\n RunErrorOutput,\n RunStatusOutput,\n AgentsApiToolChoiceOptionOutput,\n UpdateToolResourcesOptionsOutput,\n TruncationObjectOutput,\n RunCompletionUsageOutput,\n CodeInterpreterToolDefinitionOutput,\n FileSearchToolDefinitionOutput,\n FunctionToolDefinitionOutput,\n BingGroundingToolDefinitionOutput,\n AzureAISearchToolDefinitionOutput,\n AzureAISearchResourceOutput,\n CodeInterpreterToolResourceOutput,\n FileSearchToolResourceOutput,\n VectorStoreFileCountOutput,\n VectorStoreFileBatchStatusOutput,\n VectorStoreChunkingStrategyResponseOutput,\n VectorStoreConfigurationOutput,\n AgentsNamedToolChoiceOutput,\n IndexResourceOutput,\n ToolConnectionListOutput,\n VectorStoreDataSourceOutput,\n FileSearchToolDefinitionDetailsOutput,\n VectorStoreConfigurationsOutput,\n FunctionDefinitionOutput,\n MessageAttachmentToolDefinitionOutput,\n MessageContentOutputParent,\n MessageTextContentOutput,\n MessageImageFileContentOutput,\n RequiredFunctionToolCallDetailsOutput,\n RunStepDetailsOutputParent,\n RunStepMessageCreationDetailsOutput,\n RunStepToolCallDetailsOutput,\n RunStepErrorCodeOutput,\n SubmitToolOutputsDetailsOutput,\n MicrosoftFabricToolDefinitionOutput,\n SharepointToolDefinitionOutput,\n UpdateCodeInterpreterToolResourceOptionsOutput,\n UpdateFileSearchToolResourceOptionsOutput,\n VectorStoreChunkingStrategyResponseOutputParent,\n VectorStoreAutoChunkingStrategyResponseOutput,\n VectorStoreStaticChunkingStrategyResponseOutput,\n VectorStoreFileErrorOutput,\n VectorStoreFileStatusOutput,\n VectorStoreExpirationPolicyOutput,\n VectorStoreStatusOutput,\n AgentsApiToolChoiceOptionModeOutput,\n FunctionNameOutput,\n AgentsNamedToolChoiceTypeOutput,\n MessageImageFileDetailsOutput,\n MessageIncompleteDetailsReasonOutput,\n MessageTextDetailsOutput,\n RunStepMessageCreationReferenceOutput,\n RunStepToolCallOutput,\n ToolConnectionOutput,\n TruncationStrategyOutput,\n VectorStoreChunkingStrategyResponseTypeOutput,\n VectorStoreDataSourceAssetTypeOutput,\n VectorStoreExpirationPolicyAnchorOutput,\n VectorStoreFileErrorCodeOutput,\n VectorStoreStaticChunkingStrategyOptionsOutput,\n FileSearchRankingOptionsOutput,\n MessageTextAnnotationOutput,\n RunStepToolCallOutputParent,\n RunStepCodeInterpreterToolCallOutput,\n RunStepFileSearchToolCallOutput,\n RunStepBingGroundingToolCallOutput,\n RunStepAzureAISearchToolCallOutput,\n RunStepSharepointToolCallOutput,\n RunStepMicrosoftFabricToolCallOutput,\n RunStepFunctionToolCallOutput,\n MessageTextAnnotationOutputParent,\n MessageTextFileCitationAnnotationOutput,\n MessageTextFilePathAnnotationOutput,\n RunStepCodeInterpreterToolCallOutputOutputParent,\n RunStepCodeInterpreterToolCallDetailsOutput,\n RunStepFunctionToolCallDetailsOutput,\n MessageTextFileCitationDetailsOutput,\n MessageTextFilePathDetailsOutput,\n RunStepCodeInterpreterToolCallOutputOutput,\n RunStepCodeInterpreterLogOutputOutput,\n RunStepCodeInterpreterImageOutputOutput,\n RunStepCodeInterpreterImageReferenceOutput,\n ResponseFormatOutput,\n ResponseFormatJsonSchemaTypeOutput,\n IncompleteDetailsReasonOutput,\n RunStepFileSearchToolCallResultsOutput,\n ResponseFormatJsonSchemaOutput,\n RunStepFileSearchToolCallResultOutput,\n FileSearchToolCallContentOutput,\n AzureFunctionToolDefinitionOutput,\n AzureFunctionDefinitionOutput,\n AzureFunctionBindingOutput,\n OpenApiToolDefinitionOutput,\n OpenApiFunctionDefinitionOutput,\n OpenApiAuthDetailsOutput,\n OpenApiAuthTypeOutput,\n OpenApiAuthDetailsOutputParent,\n OpenApiAnonymousAuthDetailsOutput,\n OpenApiConnectionAuthDetailsOutput,\n OpenApiManagedAuthDetailsOutput,\n AzureFunctionStorageQueueOutput,\n OpenApiConnectionSecuritySchemeOutput,\n OpenApiManagedSecuritySchemeOutput,\n} from \"../customization/outputModels.js\";\nexport {\n ListMessagesQueryParamProperties,\n ListFilesQueryParamProperties,\n} from \"../customization/parameters.js\";\nexport type {\n AgentRunResponse,\n CreateRunOptionalParams,\n GetRunOptionalParams,\n CancelRunOptionalParams,\n SubmitToolOutputsToRunOptionalParams,\n UpdateRunOptionalParams,\n ListRunQueryOptionalParams,\n CreateAndRunThreadOptionalParams,\n CreateAgentThreadOptionalParams,\n GetAgentThreadOptionalParams,\n UpdateAgentThreadOptionalParams,\n DeleteAgentThreadOptionalParams,\n GetRunStepOptionalParams,\n ListRunStepsOptionalParams,\n CreateMessageOptionalParams,\n ListMessagesOptionalParams,\n UpdateMessageOptionalParams,\n GetVectorStoreOptionalParams,\n ListVectorStoresOptionalParams,\n UpdateVectorStoreOptionalParams,\n DeleteVectorStoreOptionalParams,\n CreateVectorStoreOptionalParams,\n CreateVectorStoreFileOptionalParams,\n ListVectorStoreFilesOptionalParams,\n GetVectorStoreFileOptionalParams,\n DeleteVectorStoreFileOptionalParams,\n CreateVectorStoreFileBatchOptionalParams,\n GetVectorStoreFileBatchOptionalParams,\n ListVectorStoreFileBatchFilesOptionalParams,\n CreateAgentOptionalParams,\n ListAgentsOptionalParams,\n GetAgentOptionalParams,\n UpdateAgentOptionalParams,\n DeleteFileOptionalParams,\n GetFileOptionalParams,\n GetFileContentOptionalParams,\n ListFilesOptionalParams,\n UploadFileOptionalParams,\n ListQueryParameters,\n PollingOptions,\n PollingOptionsParams,\n CancelVectorStoreFileBatchOptionalParams,\n DeleteAgentOptionalParams,\n} from \"./customModels.js\";\n\nexport {\n AzureAISearchToolDefinition,\n CodeInterpreterToolDefinition,\n FileSearchToolDefinition,\n FileSearchToolDefinitionDetails,\n FunctionDefinition,\n FunctionToolDefinition,\n ToolResources,\n VectorStoreConfigurations,\n VectorStoreDataSource,\n ToolDefinition,\n ThreadMessageOptions,\n ToolOutput,\n FilePurpose,\n ToolDefinitionParent,\n AgentThreadCreationOptions,\n CreateAgentOptions,\n CreateAndRunThreadOptions,\n CreateRunOptions,\n UpdateAgentOptions,\n UpdateAgentThreadOptions,\n VectorStoreFileStatusFilter,\n VectorStoreOptions,\n VectorStoreUpdateOptions,\n AgentsApiResponseFormatMode,\n AgentsApiToolChoiceOption,\n TruncationObject,\n UpdateToolResourcesOptions,\n VectorStoreChunkingStrategyRequest,\n FileSearchRankingOptions,\n AgentsApiToolChoiceOptionMode,\n AgentsNamedToolChoice,\n AgentsApiResponseFormatOption,\n ConnectionType,\n ListSortOrder,\n MessageAttachment,\n BingGroundingToolDefinition,\n MicrosoftFabricToolDefinition,\n SharepointToolDefinition,\n AzureAISearchResource,\n CodeInterpreterToolResource,\n FileSearchToolResource,\n TruncationStrategy,\n UpdateCodeInterpreterToolResourceOptions,\n UpdateFileSearchToolResourceOptions,\n VectorStoreChunkingStrategyRequestParent,\n VectorStoreAutoChunkingStrategyRequest,\n VectorStoreStaticChunkingStrategyRequest,\n VectorStoreConfiguration,\n VectorStoreDataSourceAssetType,\n AgentsApiResponseFormat,\n FunctionName,\n AgentsNamedToolChoiceType,\n IndexResource,\n ToolConnectionList,\n MessageAttachmentToolDefinition,\n MessageRole,\n VectorStoreChunkingStrategyRequestType,\n VectorStoreExpirationPolicy,\n VectorStoreStaticChunkingStrategyOptions,\n ToolConnection,\n VectorStoreExpirationPolicyAnchor,\n ResponseFormat,\n ResponseFormatJsonSchemaType,\n OpenApiToolDefinition,\n AzureFunctionToolDefinition,\n OpenApiFunctionDefinition,\n ResponseFormatJsonSchema,\n AzureFunctionDefinition,\n AzureFunctionBinding,\n OpenApiAuthDetails,\n AzureFunctionStorageQueue,\n OpenApiAuthType,\n OpenApiAuthDetailsParent,\n OpenApiAnonymousAuthDetails,\n OpenApiConnectionAuthDetails,\n OpenApiManagedAuthDetails,\n OpenApiConnectionSecurityScheme,\n OpenApiManagedSecurityScheme,\n} from \"../customization/models.js\";\n"]}
1
+ {"version":3,"file":"inputOutputs.js","sourceRoot":"","sources":["../../../src/agents/inputOutputs.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,qCAAqC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"../customization/streamingModels.js\";\nexport * from \"./streamingModels.js\";\nexport * from \"./vectorStoresModels.js\";\nexport * from \"./utils.js\";\nexport * from \"../customization/streamingModels.js\";\nexport type {\n OpenAIPageableListOfThreadRunOutput,\n ThreadRunOutput,\n AgentThreadOutput,\n RunStepOutput,\n OpenAIPageableListOfRunStepOutput,\n ThreadMessageOutput,\n ThreadDeletionStatusOutput,\n OpenAIPageableListOfThreadMessageOutput,\n OpenAIPageableListOfVectorStoreOutput,\n VectorStoreOutput,\n VectorStoreFileOutput,\n VectorStoreDeletionStatusOutput,\n VectorStoreFileDeletionStatusOutput,\n VectorStoreFileBatchOutput,\n OpenAIPageableListOfVectorStoreFileOutput,\n AgentDeletionStatusOutput,\n AgentOutput,\n OpenAIPageableListOfAgentOutput,\n FileDeletionStatusOutput,\n FileListResponseOutput,\n OpenAIFileOutput,\n RequiredActionOutput,\n RequiredToolCallOutput,\n ToolDefinitionOutputParent,\n AgentsApiResponseFormatOptionOutput,\n ToolDefinitionOutput,\n ToolResourcesOutput,\n AgentsApiResponseFormatModeOutput,\n AgentsApiResponseFormatOutput,\n FilePurposeOutput,\n FileStateOutput,\n RequiredActionOutputParent,\n SubmitToolOutputsActionOutput,\n RequiredToolCallOutputParent,\n RequiredFunctionToolCallOutput,\n RunStepErrorOutput,\n RunStepStatusOutput,\n RunStepDetailsOutput,\n RunStepTypeOutput,\n RunStepCompletionUsageOutput,\n MessageAttachmentOutput,\n MessageContentOutput,\n MessageIncompleteDetailsOutput,\n MessageRoleOutput,\n MessageStatusOutput,\n IncompleteRunDetailsOutput,\n RunErrorOutput,\n RunStatusOutput,\n AgentsApiToolChoiceOptionOutput,\n UpdateToolResourcesOptionsOutput,\n TruncationObjectOutput,\n RunCompletionUsageOutput,\n CodeInterpreterToolDefinitionOutput,\n FileSearchToolDefinitionOutput,\n FunctionToolDefinitionOutput,\n BingGroundingToolDefinitionOutput,\n BingCustomSearchToolDefinitionOutput,\n SearchConfigurationListOutput,\n SearchConfigurationOutput,\n AzureAISearchToolDefinitionOutput,\n AzureAISearchResourceOutput,\n CodeInterpreterToolResourceOutput,\n FileSearchToolResourceOutput,\n VectorStoreFileCountOutput,\n VectorStoreFileBatchStatusOutput,\n VectorStoreChunkingStrategyResponseOutput,\n VectorStoreConfigurationOutput,\n AgentsNamedToolChoiceOutput,\n IndexResourceOutput,\n ToolConnectionListOutput,\n VectorStoreDataSourceOutput,\n FileSearchToolDefinitionDetailsOutput,\n VectorStoreConfigurationsOutput,\n FunctionDefinitionOutput,\n MessageAttachmentToolDefinitionOutput,\n MessageContentOutputParent,\n MessageTextContentOutput,\n MessageImageFileContentOutput,\n RequiredFunctionToolCallDetailsOutput,\n RunStepDetailsOutputParent,\n RunStepMessageCreationDetailsOutput,\n RunStepToolCallDetailsOutput,\n RunStepErrorCodeOutput,\n SubmitToolOutputsDetailsOutput,\n MicrosoftFabricToolDefinitionOutput,\n SharepointToolDefinitionOutput,\n UpdateCodeInterpreterToolResourceOptionsOutput,\n UpdateFileSearchToolResourceOptionsOutput,\n VectorStoreChunkingStrategyResponseOutputParent,\n VectorStoreAutoChunkingStrategyResponseOutput,\n VectorStoreStaticChunkingStrategyResponseOutput,\n VectorStoreFileErrorOutput,\n VectorStoreFileStatusOutput,\n VectorStoreExpirationPolicyOutput,\n VectorStoreStatusOutput,\n AgentsApiToolChoiceOptionModeOutput,\n FunctionNameOutput,\n AgentsNamedToolChoiceTypeOutput,\n MessageImageFileDetailsOutput,\n MessageIncompleteDetailsReasonOutput,\n MessageTextDetailsOutput,\n RunStepMessageCreationReferenceOutput,\n RunStepToolCallOutput,\n ToolConnectionOutput,\n TruncationStrategyOutput,\n VectorStoreChunkingStrategyResponseTypeOutput,\n VectorStoreDataSourceAssetTypeOutput,\n VectorStoreExpirationPolicyAnchorOutput,\n VectorStoreFileErrorCodeOutput,\n VectorStoreStaticChunkingStrategyOptionsOutput,\n FileSearchRankingOptionsOutput,\n MessageTextAnnotationOutput,\n RunStepToolCallOutputParent,\n RunStepCodeInterpreterToolCallOutput,\n RunStepFileSearchToolCallOutput,\n RunStepBingGroundingToolCallOutput,\n RunStepAzureAISearchToolCallOutput,\n RunStepSharepointToolCallOutput,\n RunStepMicrosoftFabricToolCallOutput,\n RunStepFunctionToolCallOutput,\n MessageTextAnnotationOutputParent,\n MessageTextFileCitationAnnotationOutput,\n MessageTextFilePathAnnotationOutput,\n RunStepCodeInterpreterToolCallOutputOutputParent,\n RunStepCodeInterpreterToolCallDetailsOutput,\n RunStepFunctionToolCallDetailsOutput,\n MessageTextFileCitationDetailsOutput,\n MessageTextFilePathDetailsOutput,\n RunStepCodeInterpreterToolCallOutputOutput,\n RunStepCodeInterpreterLogOutputOutput,\n RunStepCodeInterpreterImageOutputOutput,\n RunStepCodeInterpreterImageReferenceOutput,\n ResponseFormatOutput,\n ResponseFormatJsonSchemaTypeOutput,\n IncompleteDetailsReasonOutput,\n RunStepFileSearchToolCallResultsOutput,\n ResponseFormatJsonSchemaOutput,\n RunStepFileSearchToolCallResultOutput,\n FileSearchToolCallContentOutput,\n AzureFunctionToolDefinitionOutput,\n AzureFunctionDefinitionOutput,\n AzureFunctionBindingOutput,\n OpenApiToolDefinitionOutput,\n OpenApiFunctionDefinitionOutput,\n OpenApiAuthDetailsOutput,\n OpenApiAuthTypeOutput,\n OpenApiAuthDetailsOutputParent,\n OpenApiAnonymousAuthDetailsOutput,\n OpenApiConnectionAuthDetailsOutput,\n OpenApiManagedAuthDetailsOutput,\n AzureFunctionStorageQueueOutput,\n OpenApiConnectionSecuritySchemeOutput,\n OpenApiManagedSecuritySchemeOutput,\n OpenAIPageableListOfAgentThreadOutput,\n} from \"../customization/outputModels.js\";\nexport {\n ListMessagesQueryParamProperties,\n ListFilesQueryParamProperties,\n ListThreadsQueryParamProperties,\n} from \"../customization/parameters.js\";\nexport type {\n AgentRunResponse,\n CreateRunOptionalParams,\n GetRunOptionalParams,\n CancelRunOptionalParams,\n SubmitToolOutputsToRunOptionalParams,\n UpdateRunOptionalParams,\n ListRunQueryOptionalParams,\n CreateAndRunThreadOptionalParams,\n CreateAgentThreadOptionalParams,\n GetAgentThreadOptionalParams,\n UpdateAgentThreadOptionalParams,\n DeleteAgentThreadOptionalParams,\n GetRunStepOptionalParams,\n ListRunStepsOptionalParams,\n CreateMessageOptionalParams,\n ListMessagesOptionalParams,\n UpdateMessageOptionalParams,\n GetVectorStoreOptionalParams,\n ListVectorStoresOptionalParams,\n UpdateVectorStoreOptionalParams,\n DeleteVectorStoreOptionalParams,\n CreateVectorStoreOptionalParams,\n CreateVectorStoreFileOptionalParams,\n ListVectorStoreFilesOptionalParams,\n GetVectorStoreFileOptionalParams,\n DeleteVectorStoreFileOptionalParams,\n CreateVectorStoreFileBatchOptionalParams,\n GetVectorStoreFileBatchOptionalParams,\n ListVectorStoreFileBatchFilesOptionalParams,\n CreateAgentOptionalParams,\n ListAgentsOptionalParams,\n GetAgentOptionalParams,\n UpdateAgentOptionalParams,\n DeleteFileOptionalParams,\n GetFileOptionalParams,\n GetFileContentOptionalParams,\n ListFilesOptionalParams,\n UploadFileOptionalParams,\n ListQueryParameters,\n PollingOptions,\n PollingOptionsParams,\n CancelVectorStoreFileBatchOptionalParams,\n DeleteAgentOptionalParams,\n ListAgentThreadOptionalParams,\n} from \"./customModels.js\";\n\nexport {\n AzureAISearchToolDefinition,\n CodeInterpreterToolDefinition,\n FileSearchToolDefinition,\n FileSearchToolDefinitionDetails,\n FunctionDefinition,\n FunctionToolDefinition,\n ToolResources,\n VectorStoreConfigurations,\n VectorStoreDataSource,\n ToolDefinition,\n ThreadMessageOptions,\n ToolOutput,\n FilePurpose,\n ToolDefinitionParent,\n AgentThreadCreationOptions,\n CreateAgentOptions,\n CreateAndRunThreadOptions,\n CreateRunOptions,\n UpdateAgentOptions,\n UpdateAgentThreadOptions,\n VectorStoreFileStatusFilter,\n VectorStoreOptions,\n VectorStoreUpdateOptions,\n AgentsApiResponseFormatMode,\n AgentsApiToolChoiceOption,\n TruncationObject,\n UpdateToolResourcesOptions,\n VectorStoreChunkingStrategyRequest,\n FileSearchRankingOptions,\n AgentsApiToolChoiceOptionMode,\n AgentsNamedToolChoice,\n AgentsApiResponseFormatOption,\n ConnectionType,\n ListSortOrder,\n MessageAttachment,\n BingGroundingToolDefinition,\n MicrosoftFabricToolDefinition,\n SharepointToolDefinition,\n AzureAISearchResource,\n CodeInterpreterToolResource,\n FileSearchToolResource,\n TruncationStrategy,\n UpdateCodeInterpreterToolResourceOptions,\n UpdateFileSearchToolResourceOptions,\n VectorStoreChunkingStrategyRequestParent,\n VectorStoreAutoChunkingStrategyRequest,\n VectorStoreStaticChunkingStrategyRequest,\n VectorStoreConfiguration,\n VectorStoreDataSourceAssetType,\n AgentsApiResponseFormat,\n FunctionName,\n AgentsNamedToolChoiceType,\n IndexResource,\n ToolConnectionList,\n MessageAttachmentToolDefinition,\n MessageRole,\n VectorStoreChunkingStrategyRequestType,\n VectorStoreExpirationPolicy,\n VectorStoreStaticChunkingStrategyOptions,\n ToolConnection,\n VectorStoreExpirationPolicyAnchor,\n ResponseFormat,\n ResponseFormatJsonSchemaType,\n OpenApiToolDefinition,\n AzureFunctionToolDefinition,\n OpenApiFunctionDefinition,\n ResponseFormatJsonSchema,\n AzureFunctionDefinition,\n AzureFunctionBinding,\n OpenApiAuthDetails,\n AzureFunctionStorageQueue,\n OpenApiAuthType,\n OpenApiAuthDetailsParent,\n OpenApiAnonymousAuthDetails,\n OpenApiConnectionAuthDetails,\n OpenApiManagedAuthDetails,\n OpenApiConnectionSecurityScheme,\n OpenApiManagedSecurityScheme,\n CreateMessageContent,\n MessageContentBlockInput,\n MessageContentBlockInputParent,\n MessageTextBlockInput,\n MessageImageFileBlockInput,\n MessageImageUrlBlockInput,\n MessageBlockType,\n MessageImageFileParam,\n MessageImageUrlParam,\n ImageDetailLevel,\n AzureFunctionToolResource,\n} from \"../customization/models.js\";\n"]}
@@ -31,14 +31,14 @@ var Tools;
31
31
  Tools["FileSearch"] = "file_search";
32
32
  Tools["Function"] = "function";
33
33
  Tools["BingGrounding"] = "bing_grounding";
34
- Tools["MicrosoftFabric"] = "microsoft_fabric";
34
+ Tools["MicrosoftFabric"] = "fabric_dataagent";
35
35
  Tools["SharepointGrounding"] = "sharepoint_grounding";
36
36
  Tools["AzureAISearch"] = "azure_ai_search";
37
37
  Tools["AzureFunction"] = "azure_function";
38
38
  })(Tools || (Tools = {}));
39
39
  export function validateTools(value) {
40
40
  if (value.some((tool) => !Object.values(Tools).includes(tool))) {
41
- throw new Error("Tool type must be one of 'code_interpreter', 'file_search', 'function', 'bing_grounding', 'microsoft_fabric', 'sharepoint_grounding', 'azure_ai_search', 'azure_function'");
41
+ throw new Error("Tool type must be one of 'code_interpreter', 'file_search', 'function', 'bing_grounding', 'fabric_dataagent', 'sharepoint_grounding', 'azure_ai_search', 'azure_function'");
42
42
  }
43
43
  }
44
44
  export function validateMetadata(metadata) {
@@ -1 +1 @@
1
- {"version":3,"file":"inputValidations.js","sourceRoot":"","sources":["../../../src/agents/inputValidations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,MAAM,UAAU,2BAA2B,CAAC,YAAqC;IAC/E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACnF,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACxC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACr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,MAAM,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,MAAyB,CAAC,EAAE,CAAC;QACxE,MAAM,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,IAAK,QAGJ;AAHD,WAAK,QAAQ;IACX,yBAAa,CAAA;IACb,oCAAwB,CAAA;AAC1B,CAAC,EAHI,QAAQ,KAAR,QAAQ,QAGZ;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAiB,CAAC,EAAE,CAAC;QACzD,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC;AAED,IAAK,kBAGJ;AAHD,WAAK,kBAAkB;IACrB,mCAAa,CAAA;IACb,oDAA8B,CAAA;AAChC,CAAC,EAHI,kBAAkB,KAAlB,kBAAkB,QAGtB;AAED,MAAM,UAAU,0BAA0B,CAAC,KAAa;IACtD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,KAA2B,CAAC,EAAE,CAAC;QAC7E,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IACnE,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ToolDefinition,\n UpdateToolResourcesOptions,\n VectorStoreDataSource,\n} from \"../generated/src/models.js\";\n\nexport function validateVectorStoreDataType(data_sources: VectorStoreDataSource[]): void {\n if (!data_sources.some((value) => ![\"uri_asset\", \"id_asset\"].includes(value.type))) {\n throw new Error(\"Vector store data type must be one of 'uri_asset', 'id_asset'\");\n }\n}\n\nexport function validateThreadId(threadId: string): void {\n if (!threadId) {\n throw new Error(\"Thread ID is required\");\n }\n}\n\nexport function validateRunId(runId: string): void {\n if (!runId) {\n throw new Error(\"Run ID is required\");\n }\n}\n\nexport function validateLimit(limit: number): void {\n if (limit < 1 || limit > 100) {\n throw new Error(\"Limit must be between 1 and 100\");\n }\n}\n\nexport function validateOrder(order: string): void {\n if (![\"asc\", \"desc\"].includes(order)) {\n throw new Error(\"Order must be 'asc' or 'desc'\");\n }\n}\n\nenum Tools {\n CodeInterpreter = \"code_interpreter\",\n FileSearch = \"file_search\",\n Function = \"function\",\n BingGrounding = \"bing_grounding\",\n MicrosoftFabric = \"microsoft_fabric\",\n SharepointGrounding = \"sharepoint_grounding\",\n AzureAISearch = \"azure_ai_search\",\n AzureFunction = \"azure_function\",\n}\n\nexport function validateTools(value: Array<ToolDefinition>): void {\n if (value.some((tool) => !Object.values(Tools).includes(tool as unknown as Tools))) {\n throw new Error(\n \"Tool type must be one of 'code_interpreter', 'file_search', 'function', 'bing_grounding', 'microsoft_fabric', 'sharepoint_grounding', 'azure_ai_search', 'azure_function'\",\n );\n }\n}\n\nexport function validateMetadata(metadata: Record<string, string>): void {\n if (Object.keys(metadata).length > 16) {\n throw new Error(\"Only 16 key/value pairs are allowed\");\n }\n if (Object.keys(metadata).some((value) => value.length > 64)) {\n throw new Error(\"Keys must be less than 64 characters\");\n }\n if (Object.values(metadata).some((value) => value.length > 512)) {\n throw new Error(\"Values must be less than 512 characters\");\n }\n}\n\nexport function validateToolResources(toolResource: UpdateToolResourcesOptions): void {\n if (toolResource.code_interpreter) {\n if (\n toolResource.code_interpreter.file_ids &&\n toolResource.code_interpreter.file_ids.length > 20\n ) {\n throw new Error(\"A maximum of 20 file IDs are allowed\");\n }\n }\n if (toolResource.file_search) {\n if (\n toolResource.file_search.vector_store_ids &&\n toolResource.file_search.vector_store_ids.length > 1\n ) {\n throw new Error(\"Only one vector store ID is allowed\");\n }\n }\n if (toolResource.azure_ai_search) {\n if (toolResource.azure_ai_search.indexes && toolResource.azure_ai_search.indexes.length > 1) {\n throw new Error(\"Only one index is allowed\");\n }\n }\n}\n\nexport function validateVectorStoreId(vectorStoreId: string): void {\n if (!vectorStoreId) {\n throw new Error(\"Vector store ID is required\");\n }\n}\n\nexport function validateFileId(fileId: string): void {\n if (!fileId) {\n throw new Error(\"File ID is required\");\n }\n}\n\nenum FileBatchStatus {\n InProgress = \"in_progress\",\n Completed = \"completed\",\n Failed = \"failed\",\n Cancelled = \"cancelled\",\n}\n\nexport function validateFileStatusFilter(filter: string): void {\n if (!Object.values(FileBatchStatus).includes(filter as FileBatchStatus)) {\n throw new Error(\n \"File status filter must be one of 'in_progress', 'completed', 'failed', 'cancelled'\",\n );\n }\n}\n\nenum Messages {\n User = \"user\",\n Assistants = \"assistant\",\n}\n\nexport function validateMessages(value: string): void {\n if (!Object.values(Messages).includes(value as Messages)) {\n throw new Error(\"Role must be either 'user' or 'assistant'\");\n }\n}\n\nenum TruncationStrategy {\n Auto = \"auto\",\n LastMessages = \"last_messages\",\n}\n\nexport function validateTruncationStrategy(value: string): void {\n if (!Object.values(TruncationStrategy).includes(value as TruncationStrategy)) {\n throw new Error(\"Role must be either 'auto' or 'last_messages'\");\n }\n}\n"]}
1
+ {"version":3,"file":"inputValidations.js","sourceRoot":"","sources":["../../../src/agents/inputValidations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,MAAM,UAAU,2BAA2B,CAAC,YAAqC;IAC/E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACnF,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAAgB;IAC/C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,IAAI,CAA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c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ToolDefinition,\n UpdateToolResourcesOptions,\n VectorStoreDataSource,\n} from \"../generated/src/models.js\";\n\nexport function validateVectorStoreDataType(data_sources: VectorStoreDataSource[]): void {\n if (!data_sources.some((value) => ![\"uri_asset\", \"id_asset\"].includes(value.type))) {\n throw new Error(\"Vector store data type must be one of 'uri_asset', 'id_asset'\");\n }\n}\n\nexport function validateThreadId(threadId: string): void {\n if (!threadId) {\n throw new Error(\"Thread ID is required\");\n }\n}\n\nexport function validateRunId(runId: string): void {\n if (!runId) {\n throw new Error(\"Run ID is required\");\n }\n}\n\nexport function validateLimit(limit: number): void {\n if (limit < 1 || limit > 100) {\n throw new Error(\"Limit must be between 1 and 100\");\n }\n}\n\nexport function validateOrder(order: string): void {\n if (![\"asc\", \"desc\"].includes(order)) {\n throw new Error(\"Order must be 'asc' or 'desc'\");\n }\n}\n\nenum Tools {\n CodeInterpreter = \"code_interpreter\",\n FileSearch = \"file_search\",\n Function = \"function\",\n BingGrounding = \"bing_grounding\",\n MicrosoftFabric = \"fabric_dataagent\",\n SharepointGrounding = \"sharepoint_grounding\",\n AzureAISearch = \"azure_ai_search\",\n AzureFunction = \"azure_function\",\n}\n\nexport function validateTools(value: Array<ToolDefinition>): void {\n if (value.some((tool) => !Object.values(Tools).includes(tool as unknown as Tools))) {\n throw new Error(\n \"Tool type must be one of 'code_interpreter', 'file_search', 'function', 'bing_grounding', 'fabric_dataagent', 'sharepoint_grounding', 'azure_ai_search', 'azure_function'\",\n );\n }\n}\n\nexport function validateMetadata(metadata: Record<string, string>): void {\n if (Object.keys(metadata).length > 16) {\n throw new Error(\"Only 16 key/value pairs are allowed\");\n }\n if (Object.keys(metadata).some((value) => value.length > 64)) {\n throw new Error(\"Keys must be less than 64 characters\");\n }\n if (Object.values(metadata).some((value) => value.length > 512)) {\n throw new Error(\"Values must be less than 512 characters\");\n }\n}\n\nexport function validateToolResources(toolResource: UpdateToolResourcesOptions): void {\n if (toolResource.code_interpreter) {\n if (\n toolResource.code_interpreter.file_ids &&\n toolResource.code_interpreter.file_ids.length > 20\n ) {\n throw new Error(\"A maximum of 20 file IDs are allowed\");\n }\n }\n if (toolResource.file_search) {\n if (\n toolResource.file_search.vector_store_ids &&\n toolResource.file_search.vector_store_ids.length > 1\n ) {\n throw new Error(\"Only one vector store ID is allowed\");\n }\n }\n if (toolResource.azure_ai_search) {\n if (toolResource.azure_ai_search.indexes && toolResource.azure_ai_search.indexes.length > 1) {\n throw new Error(\"Only one index is allowed\");\n }\n }\n}\n\nexport function validateVectorStoreId(vectorStoreId: string): void {\n if (!vectorStoreId) {\n throw new Error(\"Vector store ID is required\");\n }\n}\n\nexport function validateFileId(fileId: string): void {\n if (!fileId) {\n throw new Error(\"File ID is required\");\n }\n}\n\nenum FileBatchStatus {\n InProgress = \"in_progress\",\n Completed = \"completed\",\n Failed = \"failed\",\n Cancelled = \"cancelled\",\n}\n\nexport function validateFileStatusFilter(filter: string): void {\n if (!Object.values(FileBatchStatus).includes(filter as FileBatchStatus)) {\n throw new Error(\n \"File status filter must be one of 'in_progress', 'completed', 'failed', 'cancelled'\",\n );\n }\n}\n\nenum Messages {\n User = \"user\",\n Assistants = \"assistant\",\n}\n\nexport function validateMessages(value: string): void {\n if (!Object.values(Messages).includes(value as Messages)) {\n throw new Error(\"Role must be either 'user' or 'assistant'\");\n }\n}\n\nenum TruncationStrategy {\n Auto = \"auto\",\n LastMessages = \"last_messages\",\n}\n\nexport function validateTruncationStrategy(value: string): void {\n if (!Object.values(TruncationStrategy).includes(value as TruncationStrategy)) {\n throw new Error(\"Role must be either 'auto' or 'last_messages'\");\n }\n}\n"]}
@@ -26,7 +26,7 @@ export async function createMessage(context, threadId, messageOptions, options =
26
26
  }
27
27
  /** Gets a list of messages that exist on a thread. */
28
28
  export async function listMessages(context, threadId, options = {}) {
29
- const listOptions = Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { queryParameters: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (options.runId && { run_id: options.runId })), (options.limit && { run_id: options.limit })), (options.order && { run_id: options.order })), (options.after && { run_id: options.after })), (options.before && { run_id: options.before })) });
29
+ const listOptions = Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { queryParameters: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (options.runId && { run_id: options.runId })), (options.limit && { limit: options.limit })), (options.order && { order: options.order })), (options.after && { after: options.after })), (options.before && { before: options.before })) });
30
30
  validateThreadId(threadId);
31
31
  validateListMessagesParameters(listOptions);
32
32
  const output = await TracingUtility.withSpan("ListMessages", listOptions, async (updateOptions) => {
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/agents/messages.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAS9E,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAQ3D,OAAO,KAAK,eAAe,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;AAEjC,mDAAmD;AACnD,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,OAAe,EACf,QAAgB,EAChB,cAAoC,EACpC,UAAuC,EAAE;IAEzC,MAAM,aAAa,mCACd,mCAAmC,CAAC,OAAO,CAAC,KAC/C,IAAI,oBACC,cAAc,IAEpB,CAAC;IAEF,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC3B,+BA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ent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client } from \"@azure-rest/core-client\";\nimport { operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type {\n OpenAIPageableListOfThreadMessageOutput,\n ThreadMessageOutput,\n} from \"../customization/outputModels.js\";\nimport type {\n CreateMessageParameters,\n ListMessagesParameters,\n} from \"../generated/src/parameters.js\";\nimport { validateMetadata, validateVectorStoreDataType } from \"./inputValidations.js\";\nimport { TracingUtility } from \"../tracing.js\";\nimport {\n traceEndCreateMessage,\n traceEndListMessages,\n traceStartCreateMessage,\n traceStartListMessages,\n} from \"./messagesTrace.js\";\nimport { traceStartAgentGeneric } from \"./traceUtility.js\";\nimport type { ThreadMessageOptions } from \"../customization/models.js\";\nimport type {\n CreateMessageOptionalParams,\n ListMessagesOptionalParams,\n UpdateMessageOptionalParams,\n} from \"./customModels.js\";\nimport type * as GeneratedParameters from \"../generated/src/parameters.js\";\nimport * as ConvertFromWire from \"../customization/convertOutputModelsFromWire.js\";\nimport { createOpenAIError } from \"./openAIError.js\";\n\nconst expectedStatuses = [\"200\"];\n\n/** Creates a new message on a specified thread. */\nexport async function createMessage(\n context: Client,\n threadId: string,\n messageOptions: ThreadMessageOptions,\n options: CreateMessageOptionalParams = {},\n): Promise<ThreadMessageOutput> {\n const createOptions: GeneratedParameters.CreateMessageParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...messageOptions,\n },\n };\n\n validateThreadId(threadId);\n validateCreateMessageParameters(createOptions);\n const response = await TracingUtility.withSpan(\n \"CreateMessage\",\n createOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/threads/{threadId}/messages\", threadId)\n .post(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) => traceStartCreateMessage(span, threadId, updatedOptions),\n traceEndCreateMessage,\n );\n return ConvertFromWire.convertThreadMessageOutput(response);\n}\n\n/** Gets a list of messages that exist on a thread. */\nexport async function listMessages(\n context: Client,\n threadId: string,\n options: ListMessagesOptionalParams = {},\n): Promise<OpenAIPageableListOfThreadMessageOutput> {\n const listOptions: GeneratedParameters.ListMessagesParameters = {\n ...operationOptionsToRequestParameters(options),\n queryParameters: {\n ...(options.runId && { run_id: options.runId }),\n ...(options.limit && { run_id: options.limit }),\n ...(options.order && { run_id: options.order }),\n ...(options.after && { run_id: options.after }),\n ...(options.before && { run_id: options.before }),\n },\n };\n\n validateThreadId(threadId);\n validateListMessagesParameters(listOptions);\n const output = await TracingUtility.withSpan(\n \"ListMessages\",\n listOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/threads/{threadId}/messages\", threadId)\n .get(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) => traceStartListMessages(span, threadId, updatedOptions),\n traceEndListMessages,\n );\n\n return ConvertFromWire.convertOpenAIPageableListOfThreadMessageOutput(output);\n}\n\n/** Modifies an existing message on an existing thread. */\nexport async function updateMessage(\n context: Client,\n threadId: string,\n messageId: string,\n options: UpdateMessageOptionalParams = {},\n): Promise<ThreadMessageOutput> {\n const updateMessageOptions: GeneratedParameters.UpdateMessageParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...(options.metadata ? { metadata: options.metadata } : {}),\n },\n };\n validateThreadId(threadId);\n validateMessageId(messageId);\n const response = await TracingUtility.withSpan(\n \"UpdateMessage\",\n updateMessageOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/threads/{threadId}/messages/{messageId}\", threadId, messageId)\n .post(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId, messageId: messageId },\n }),\n );\n\n return ConvertFromWire.convertThreadMessageOutput(response);\n}\n\nfunction validateThreadId(threadId: string): void {\n if (!threadId) {\n throw new Error(\"Thread ID is required\");\n }\n}\n\nfunction validateMessageId(messageId: string): void {\n if (!messageId) {\n throw new Error(\"Message ID is required\");\n }\n}\n\nfunction validateCreateMessageParameters(options: CreateMessageParameters): void {\n if (options.body.role && ![\"user\", \"assistant\"].includes(options.body.role)) {\n throw new Error(\"Role must be either 'user' or 'assistant'\");\n }\n if (options.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n if (options.body.attachments) {\n if (\n options.body.attachments.some((value) => {\n value.tools.some((tool) => ![\"code_interpreter\", \"file_search\"].includes(tool.type));\n })\n ) {\n throw new Error(\"Tool type must be either 'code_interpreter' or 'file_search'\");\n }\n if (options.body.attachments) {\n options.body.attachments.forEach((value) => {\n if (value.data_source) {\n validateVectorStoreDataType([value.data_source]);\n }\n });\n }\n }\n}\n\nfunction validateListMessagesParameters(options?: ListMessagesParameters): void {\n if (\n options?.queryParameters?.limit &&\n (options.queryParameters.limit < 1 || options.queryParameters.limit > 100)\n ) {\n throw new Error(\"Limit must be between 1 and 100\");\n }\n if (options?.queryParameters?.order && ![\"asc\", \"desc\"].includes(options.queryParameters.order)) {\n throw new Error(\"Order must be either 'asc' or 'desc'\");\n }\n}\n"]}
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/agents/messages.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAS9E,OAAO,EAAE,gBAAgB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAQ3D,OAAO,KAAK,eAAe,MAAM,iDAAiD,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,k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AAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IACD,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,0CAAE,KAAK,KAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAChG,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client } from \"@azure-rest/core-client\";\nimport { operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type {\n OpenAIPageableListOfThreadMessageOutput,\n ThreadMessageOutput,\n} from \"../customization/outputModels.js\";\nimport type {\n CreateMessageParameters,\n ListMessagesParameters,\n} from \"../generated/src/parameters.js\";\nimport { validateMetadata, validateVectorStoreDataType } from \"./inputValidations.js\";\nimport { TracingUtility } from \"../tracing.js\";\nimport {\n traceEndCreateMessage,\n traceEndListMessages,\n traceStartCreateMessage,\n traceStartListMessages,\n} from \"./messagesTrace.js\";\nimport { traceStartAgentGeneric } from \"./traceUtility.js\";\nimport type { ThreadMessageOptions } from \"../customization/models.js\";\nimport type {\n CreateMessageOptionalParams,\n ListMessagesOptionalParams,\n UpdateMessageOptionalParams,\n} from \"./customModels.js\";\nimport type * as GeneratedParameters from \"../generated/src/parameters.js\";\nimport * as ConvertFromWire from \"../customization/convertOutputModelsFromWire.js\";\nimport { createOpenAIError } from \"./openAIError.js\";\n\nconst expectedStatuses = [\"200\"];\n\n/** Creates a new message on a specified thread. */\nexport async function createMessage(\n context: Client,\n threadId: string,\n messageOptions: ThreadMessageOptions,\n options: CreateMessageOptionalParams = {},\n): Promise<ThreadMessageOutput> {\n const createOptions: GeneratedParameters.CreateMessageParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...messageOptions,\n },\n };\n\n validateThreadId(threadId);\n validateCreateMessageParameters(createOptions);\n const response = await TracingUtility.withSpan(\n \"CreateMessage\",\n createOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/threads/{threadId}/messages\", threadId)\n .post(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) => traceStartCreateMessage(span, threadId, updatedOptions),\n traceEndCreateMessage,\n );\n return ConvertFromWire.convertThreadMessageOutput(response);\n}\n\n/** Gets a list of messages that exist on a thread. */\nexport async function listMessages(\n context: Client,\n threadId: string,\n options: ListMessagesOptionalParams = {},\n): Promise<OpenAIPageableListOfThreadMessageOutput> {\n const listOptions: GeneratedParameters.ListMessagesParameters = {\n ...operationOptionsToRequestParameters(options),\n queryParameters: {\n ...(options.runId && { run_id: options.runId }),\n ...(options.limit && { limit: options.limit }),\n ...(options.order && { order: options.order }),\n ...(options.after && { after: options.after }),\n ...(options.before && { before: options.before }),\n },\n };\n\n validateThreadId(threadId);\n validateListMessagesParameters(listOptions);\n const output = await TracingUtility.withSpan(\n \"ListMessages\",\n listOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/threads/{threadId}/messages\", threadId)\n .get(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) => traceStartListMessages(span, threadId, updatedOptions),\n traceEndListMessages,\n );\n\n return ConvertFromWire.convertOpenAIPageableListOfThreadMessageOutput(output);\n}\n\n/** Modifies an existing message on an existing thread. */\nexport async function updateMessage(\n context: Client,\n threadId: string,\n messageId: string,\n options: UpdateMessageOptionalParams = {},\n): Promise<ThreadMessageOutput> {\n const updateMessageOptions: GeneratedParameters.UpdateMessageParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...(options.metadata ? { metadata: options.metadata } : {}),\n },\n };\n validateThreadId(threadId);\n validateMessageId(messageId);\n const response = await TracingUtility.withSpan(\n \"UpdateMessage\",\n updateMessageOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/threads/{threadId}/messages/{messageId}\", threadId, messageId)\n .post(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId, messageId: messageId },\n }),\n );\n\n return ConvertFromWire.convertThreadMessageOutput(response);\n}\n\nfunction validateThreadId(threadId: string): void {\n if (!threadId) {\n throw new Error(\"Thread ID is required\");\n }\n}\n\nfunction validateMessageId(messageId: string): void {\n if (!messageId) {\n throw new Error(\"Message ID is required\");\n }\n}\n\nfunction validateCreateMessageParameters(options: CreateMessageParameters): void {\n if (options.body.role && ![\"user\", \"assistant\"].includes(options.body.role)) {\n throw new Error(\"Role must be either 'user' or 'assistant'\");\n }\n if (options.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n if (options.body.attachments) {\n if (\n options.body.attachments.some((value) => {\n value.tools.some((tool) => ![\"code_interpreter\", \"file_search\"].includes(tool.type));\n })\n ) {\n throw new Error(\"Tool type must be either 'code_interpreter' or 'file_search'\");\n }\n if (options.body.attachments) {\n options.body.attachments.forEach((value) => {\n if (value.data_source) {\n validateVectorStoreDataType([value.data_source]);\n }\n });\n }\n }\n}\n\nfunction validateListMessagesParameters(options?: ListMessagesParameters): void {\n if (\n options?.queryParameters?.limit &&\n (options.queryParameters.limit < 1 || options.queryParameters.limit > 100)\n ) {\n throw new Error(\"Limit must be between 1 and 100\");\n }\n if (options?.queryParameters?.order && ![\"asc\", \"desc\"].includes(options.queryParameters.order)) {\n throw new Error(\"Order must be either 'asc' or 'desc'\");\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { Client } from "@azure-rest/core-client";
2
- import type { AgentThreadOutput, ThreadDeletionStatusOutput } from "../customization/outputModels.js";
3
- import type { CreateAgentThreadOptionalParams, DeleteAgentThreadOptionalParams, GetAgentThreadOptionalParams, UpdateAgentThreadOptionalParams } from "./customModels.js";
2
+ import type { AgentThreadOutput, OpenAIPageableListOfAgentThreadOutput, ThreadDeletionStatusOutput } from "../customization/outputModels.js";
3
+ import type { CreateAgentThreadOptionalParams, DeleteAgentThreadOptionalParams, GetAgentThreadOptionalParams, ListAgentThreadOptionalParams, UpdateAgentThreadOptionalParams } from "./customModels.js";
4
4
  /** Creates a new thread. Threads contain messages and can be run by agents. */
5
5
  export declare function createThread(context: Client, options?: CreateAgentThreadOptionalParams): Promise<AgentThreadOutput>;
6
6
  /** Gets information about an existing thread. */
@@ -9,4 +9,6 @@ export declare function getThread(context: Client, threadId: string, options?: G
9
9
  export declare function updateThread(context: Client, threadId: string, options?: UpdateAgentThreadOptionalParams): Promise<AgentThreadOutput>;
10
10
  /** Deletes an existing thread. */
11
11
  export declare function deleteThread(context: Client, threadId: string, options?: DeleteAgentThreadOptionalParams): Promise<ThreadDeletionStatusOutput>;
12
+ /** Gets a list of threads that were previously created. */
13
+ export declare function listThreads(context: Client, options?: ListAgentThreadOptionalParams): Promise<OpenAIPageableListOfAgentThreadOutput>;
12
14
  //# sourceMappingURL=threads.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"threads.d.ts","sourceRoot":"","sources":["../../../src/agents/threads.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAKtD,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;AAU1C,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAChC,MAAM,mBAAmB,CAAC;AAM3B,+EAA+E;AAC/E,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,+BAAoC,GAC5C,OAAO,CAAC,iBAAiB,CAAC,CAwB5B;AAED,iDAAiD;AACjD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,GAA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,GAC5C,OAAO,CAAC,0BAA0B,CAAC,CAwBrC;AAED,2DAA2D;AAC3D,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,qCAAqC,CAAC,CA8BhD"}
@@ -62,6 +62,19 @@ export async function deleteThread(context, threadId, options = {}) {
62
62
  }, (span, updatedOptions) => traceStartAgentGeneric(span, Object.assign(Object.assign({}, updatedOptions), { tracingAttributeOptions: { threadId: threadId } })));
63
63
  return convertThreadDeletionStatusOutput(response);
64
64
  }
65
+ /** Gets a list of threads that were previously created. */
66
+ export async function listThreads(context, options = {}) {
67
+ const listThreadsOptions = Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { queryParameters: Object.assign(Object.assign(Object.assign(Object.assign({}, (options.limit && { limit: options.limit })), (options.order && { order: options.order })), (options.after && { after: options.after })), (options.before && { before: options.before })) });
68
+ validateListThreadsParameters(listThreadsOptions);
69
+ const output = await TracingUtility.withSpan("ListThreads", listThreadsOptions, async (updatedOptions) => {
70
+ const result = await context.path("/threads").get(updatedOptions);
71
+ if (!expectedStatuses.includes(result.status)) {
72
+ throw createOpenAIError(result);
73
+ }
74
+ return result.body;
75
+ }, (span, updatedOptions) => traceStartAgentGeneric(span, Object.assign(Object.assign({}, updatedOptions), { tracingAttributeOptions: {} })));
76
+ return ConverterFromWire.convertOpenAIPageableListOfAgentThreadOutput(output);
77
+ }
65
78
  function validateCreateThreadParameters(options) {
66
79
  if (options === null || options === void 0 ? void 0 : options.body.messages) {
67
80
  options.body.messages.forEach((message) => validateMessages(message.role));
@@ -82,4 +95,14 @@ function validateUpdateThreadParameters(threadId, options) {
82
95
  validateMetadata(options.body.metadata);
83
96
  }
84
97
  }
98
+ function validateListThreadsParameters(options) {
99
+ var _a, _b;
100
+ if (((_a = options === null || options === void 0 ? void 0 : options.queryParameters) === null || _a === void 0 ? void 0 : _a.limit) &&
101
+ (options.queryParameters.limit < 1 || options.queryParameters.limit > 100)) {
102
+ throw new Error("Limit must be between 1 and 100");
103
+ }
104
+ if (((_b = options === null || options === void 0 ? void 0 : options.queryParameters) === null || _b === void 0 ? void 0 : _b.order) && !["asc", "desc"].includes(options.queryParameters.order)) {
105
+ throw new Error("Order must be either 'asc' or 'desc'");
106
+ }
107
+ }
85
108
  //# sourceMappingURL=threads.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"threads.js","sourceRoot":"","sources":["../../../src/agents/threads.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE9E,OAAO,KAAK,eAAe,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,iBAAiB,MAAM,iDAAiD,CAAC;AAKrF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAO3D,OAAO,EAAE,iCAAiC,EAAE,MAAM,iDAAiD,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;AAEjC,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAe,EACf,UAA2C,EAAE;IAE7C,MAAM,mBAAmB,mCACpB,mCAAmC,CAAC,OAAO,CAAC,KAC/C,IAAI,oBACC,eAAe,CAAC,iCAAiC,CAAC,OAAO,CAAC,IAEhE,CAAC;IAEF,8BAA8B,CAAC,mBAAmB,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,MAAM,cAAc,CAAC,QAAQ,CAC5C,cAAc,EACd,mBAAmB,EAC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C;IAC3B,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,cAAc,EAAE,CAAC;QACjC,qBAAqB,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACrD,CAAC;IACD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC3B,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client } from \"@azure-rest/core-client\";\nimport { operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type * as GeneratedParameters from \"../generated/src/parameters.js\";\nimport * as ConverterToWire from \"../customization/convertModelsToWrite.js\";\nimport * as ConverterFromWire from \"../customization/convertOutputModelsFromWire.js\";\nimport type {\n AgentThreadOutput,\n ThreadDeletionStatusOutput,\n} from \"../customization/outputModels.js\";\nimport { TracingUtility } from \"../tracing.js\";\nimport { traceEndCreateThread, traceStartCreateThread } from \"./threadsTrace.js\";\nimport {\n validateMessages,\n validateMetadata,\n validateThreadId,\n validateToolResources,\n} from \"./inputValidations.js\";\nimport { traceStartAgentGeneric } from \"./traceUtility.js\";\nimport type {\n CreateAgentThreadOptionalParams,\n DeleteAgentThreadOptionalParams,\n GetAgentThreadOptionalParams,\n UpdateAgentThreadOptionalParams,\n} from \"./customModels.js\";\nimport { convertThreadDeletionStatusOutput } from \"../customization/convertOutputModelsFromWire.js\";\nimport { createOpenAIError } from \"./openAIError.js\";\n\nconst expectedStatuses = [\"200\"];\n\n/** Creates a new thread. Threads contain messages and can be run by agents. */\nexport async function createThread(\n context: Client,\n options: CreateAgentThreadOptionalParams = {},\n): Promise<AgentThreadOutput> {\n const createThreadOptions: GeneratedParameters.CreateThreadParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertAgentThreadCreationOptions(options),\n },\n };\n\n validateCreateThreadParameters(createThreadOptions);\n const response = await TracingUtility.withSpan(\n \"CreateThread\",\n createThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads\").post(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n traceStartCreateThread,\n traceEndCreateThread,\n );\n\n return ConverterFromWire.convertAgentThreadOutput(response);\n}\n\n/** Gets information about an existing thread. */\nexport async function getThread(\n context: Client,\n threadId: string,\n options: GetAgentThreadOptionalParams = {},\n): Promise<AgentThreadOutput> {\n const getThreadOptions: GeneratedParameters.GetThreadParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateThreadId(threadId);\n const response = await TracingUtility.withSpan(\n \"GetThread\",\n getThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads/{threadId}\", threadId).get(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId },\n }),\n );\n\n return ConverterFromWire.convertAgentThreadOutput(response);\n}\n\n/** Modifies an existing thread. */\nexport async function updateThread(\n context: Client,\n threadId: string,\n options: UpdateAgentThreadOptionalParams = {},\n): Promise<AgentThreadOutput> {\n const updateThreadOptions: GeneratedParameters.UpdateThreadParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertAgentThreadUpdateOptions(options),\n },\n };\n\n validateUpdateThreadParameters(threadId, updateThreadOptions);\n const response = await TracingUtility.withSpan(\n \"UpdateThread\",\n updateThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads/{threadId}\", threadId).post(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId },\n }),\n );\n\n return ConverterFromWire.convertAgentThreadOutput(response);\n}\n\n/** Deletes an existing thread. */\nexport async function deleteThread(\n context: Client,\n threadId: string,\n options: DeleteAgentThreadOptionalParams = {},\n): Promise<ThreadDeletionStatusOutput> {\n const deleteThreadOptions: GeneratedParameters.DeleteAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateThreadId(threadId);\n const response = await TracingUtility.withSpan(\n \"DeleteThread\",\n deleteThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads/{threadId}\", threadId).delete(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId },\n }),\n );\n\n return convertThreadDeletionStatusOutput(response);\n}\n\nfunction validateCreateThreadParameters(\n options?: GeneratedParameters.CreateThreadParameters,\n): void {\n if (options?.body.messages) {\n options.body.messages.forEach((message) => validateMessages(message.role));\n }\n if (options?.body.tool_resources) {\n validateToolResources(options.body.tool_resources);\n }\n if (options?.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n}\n\nfunction validateUpdateThreadParameters(\n threadId: string,\n options?: GeneratedParameters.UpdateThreadParameters,\n): void {\n validateThreadId(threadId);\n if (options?.body.tool_resources) {\n validateToolResources(options.body.tool_resources);\n }\n if (options?.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n}\n"]}
1
+ {"version":3,"file":"threads.js","sourceRoot":"","sources":["../../../src/agents/threads.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE9E,OAAO,KAAK,eAAe,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,iBAAiB,MAAM,iDAAiD,CAAC;AAMrF,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,s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,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,0CAAE,KAAK,KAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAChG,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client } from \"@azure-rest/core-client\";\nimport { operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type * as GeneratedParameters from \"../generated/src/parameters.js\";\nimport * as ConverterToWire from \"../customization/convertModelsToWrite.js\";\nimport * as ConverterFromWire from \"../customization/convertOutputModelsFromWire.js\";\nimport type {\n AgentThreadOutput,\n OpenAIPageableListOfAgentThreadOutput,\n ThreadDeletionStatusOutput,\n} from \"../customization/outputModels.js\";\nimport { TracingUtility } from \"../tracing.js\";\nimport { traceEndCreateThread, traceStartCreateThread } from \"./threadsTrace.js\";\nimport {\n validateMessages,\n validateMetadata,\n validateThreadId,\n validateToolResources,\n} from \"./inputValidations.js\";\nimport { traceStartAgentGeneric } from \"./traceUtility.js\";\nimport type {\n CreateAgentThreadOptionalParams,\n DeleteAgentThreadOptionalParams,\n GetAgentThreadOptionalParams,\n ListAgentThreadOptionalParams,\n UpdateAgentThreadOptionalParams,\n} from \"./customModels.js\";\nimport { convertThreadDeletionStatusOutput } from \"../customization/convertOutputModelsFromWire.js\";\nimport { createOpenAIError } from \"./openAIError.js\";\n\nconst expectedStatuses = [\"200\"];\n\n/** Creates a new thread. Threads contain messages and can be run by agents. */\nexport async function createThread(\n context: Client,\n options: CreateAgentThreadOptionalParams = {},\n): Promise<AgentThreadOutput> {\n const createThreadOptions: GeneratedParameters.CreateThreadParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertAgentThreadCreationOptions(options),\n },\n };\n\n validateCreateThreadParameters(createThreadOptions);\n const response = await TracingUtility.withSpan(\n \"CreateThread\",\n createThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads\").post(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n traceStartCreateThread,\n traceEndCreateThread,\n );\n\n return ConverterFromWire.convertAgentThreadOutput(response);\n}\n\n/** Gets information about an existing thread. */\nexport async function getThread(\n context: Client,\n threadId: string,\n options: GetAgentThreadOptionalParams = {},\n): Promise<AgentThreadOutput> {\n const getThreadOptions: GeneratedParameters.GetThreadParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateThreadId(threadId);\n const response = await TracingUtility.withSpan(\n \"GetThread\",\n getThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads/{threadId}\", threadId).get(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId },\n }),\n );\n\n return ConverterFromWire.convertAgentThreadOutput(response);\n}\n\n/** Modifies an existing thread. */\nexport async function updateThread(\n context: Client,\n threadId: string,\n options: UpdateAgentThreadOptionalParams = {},\n): Promise<AgentThreadOutput> {\n const updateThreadOptions: GeneratedParameters.UpdateThreadParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertAgentThreadUpdateOptions(options),\n },\n };\n\n validateUpdateThreadParameters(threadId, updateThreadOptions);\n const response = await TracingUtility.withSpan(\n \"UpdateThread\",\n updateThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads/{threadId}\", threadId).post(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId },\n }),\n );\n\n return ConverterFromWire.convertAgentThreadOutput(response);\n}\n\n/** Deletes an existing thread. */\nexport async function deleteThread(\n context: Client,\n threadId: string,\n options: DeleteAgentThreadOptionalParams = {},\n): Promise<ThreadDeletionStatusOutput> {\n const deleteThreadOptions: GeneratedParameters.DeleteAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateThreadId(threadId);\n const response = await TracingUtility.withSpan(\n \"DeleteThread\",\n deleteThreadOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads/{threadId}\", threadId).delete(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: { threadId: threadId },\n }),\n );\n\n return convertThreadDeletionStatusOutput(response);\n}\n\n/** Gets a list of threads that were previously created. */\nexport async function listThreads(\n context: Client,\n options: ListAgentThreadOptionalParams = {},\n): Promise<OpenAIPageableListOfAgentThreadOutput> {\n const listThreadsOptions: GeneratedParameters.ListThreadsParameters = {\n ...operationOptionsToRequestParameters(options),\n queryParameters: {\n ...(options.limit && { limit: options.limit }),\n ...(options.order && { order: options.order }),\n ...(options.after && { after: options.after }),\n ...(options.before && { before: options.before }),\n },\n };\n\n validateListThreadsParameters(listThreadsOptions);\n const output = await TracingUtility.withSpan(\n \"ListThreads\",\n listThreadsOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/threads\").get(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) =>\n traceStartAgentGeneric(span, {\n ...updatedOptions,\n tracingAttributeOptions: {},\n }),\n );\n\n return ConverterFromWire.convertOpenAIPageableListOfAgentThreadOutput(output);\n}\n\nfunction validateCreateThreadParameters(\n options?: GeneratedParameters.CreateThreadParameters,\n): void {\n if (options?.body.messages) {\n options.body.messages.forEach((message) => validateMessages(message.role));\n }\n if (options?.body.tool_resources) {\n validateToolResources(options.body.tool_resources);\n }\n if (options?.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n}\n\nfunction validateUpdateThreadParameters(\n threadId: string,\n options?: GeneratedParameters.UpdateThreadParameters,\n): void {\n validateThreadId(threadId);\n if (options?.body.tool_resources) {\n validateToolResources(options.body.tool_resources);\n }\n if (options?.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n}\n\nfunction validateListThreadsParameters(options?: GeneratedParameters.ListThreadsParameters): void {\n if (\n options?.queryParameters?.limit &&\n (options.queryParameters.limit < 1 || options.queryParameters.limit > 100)\n ) {\n throw new Error(\"Limit must be between 1 and 100\");\n }\n if (options?.queryParameters?.order && ![\"asc\", \"desc\"].includes(options.queryParameters.order)) {\n throw new Error(\"Order must be either 'asc' or 'desc'\");\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
- import type { AzureAISearchToolDefinition, AzureFunctionToolDefinition, CodeInterpreterToolDefinition, FileSearchToolDefinition, FileSearchToolDefinitionDetails, FunctionDefinition, FunctionToolDefinition, OpenApiFunctionDefinition, OpenApiToolDefinition, RequiredActionOutput, RequiredToolCallOutput, ToolDefinition, ToolDefinitionOutputParent, ToolResources, VectorStoreConfigurations, VectorStoreDataSource, AzureFunctionStorageQueue, AzureFunctionDefinition } from "./inputOutputs.js";
1
+ import type { AzureAISearchToolDefinition, AzureFunctionToolDefinition, CodeInterpreterToolDefinition, FileSearchToolDefinition, FileSearchToolDefinitionDetails, FunctionDefinition, FunctionToolDefinition, SearchConfigurationOutput, OpenApiToolDefinition, RequiredActionOutput, RequiredToolCallOutput, ToolDefinition, ToolDefinitionOutputParent, ToolResources, VectorStoreConfigurations, VectorStoreDataSource, AzureFunctionStorageQueue, AzureFunctionDefinition, OpenApiFunctionDefinition } from "./inputOutputs.js";
2
+ import type { CreateAzureAISearchToolOptions } from "../customization/models.js";
2
3
  /**
3
4
  * Determines if the given output is of the specified type.
4
5
  *
@@ -15,11 +16,13 @@ export declare enum connectionToolType {
15
16
  /** Bing grounding search tool */
16
17
  BingGrounding = "bing_grounding",
17
18
  /** Microsoft Fabric tool */
18
- MicrosoftFabric = "microsoft_fabric",
19
+ MicrosoftFabric = "fabric_dataagent",
19
20
  /** Sharepoint tool */
20
21
  SharepointGrounding = "sharepoint_grounding",
21
22
  /** Azure Function tool */
22
- AzureFunction = "azure_function"
23
+ AzureFunction = "azure_function",
24
+ /** Bing custom search tool */
25
+ BingCustomSearch = "bing_custom_search"
23
26
  }
24
27
  /**
25
28
  * Utility class for creating various tools.
@@ -35,6 +38,16 @@ export declare class ToolUtility {
35
38
  static createConnectionTool(toolType: connectionToolType, connectionIds: string[]): {
36
39
  definition: ToolDefinition;
37
40
  };
41
+ /**
42
+ * Creates a bing custom search tool
43
+ *
44
+ * @param searchConfigurations - The ID of bing search connection and instanceName.
45
+ *
46
+ * @returns An object containing the definition and resources for the bing custom search tool
47
+ */
48
+ static createBingCustomSearchTool(searchConfigurations: SearchConfigurationOutput[]): {
49
+ definition: ToolDefinition;
50
+ };
38
51
  /**
39
52
  * Creates a file search tool
40
53
  *
@@ -81,10 +94,19 @@ export declare class ToolUtility {
81
94
  *
82
95
  * @returns An object containing the definition and resources for the Azure AI search tool.
83
96
  */
84
- static createAzureAISearchTool(indexConnectionId: string, indexName: string): {
97
+ static createAzureAISearchTool(indexConnectionId: string, indexName: string, options?: CreateAzureAISearchToolOptions): {
85
98
  definition: AzureAISearchToolDefinition;
86
99
  resources: ToolResources;
87
100
  };
101
+ /**
102
+ * Creates a Microsoft Fabric tool
103
+ *
104
+ * @param connectionIds - A list of the IDs of the Fabric connections to use.
105
+ * @returns An object containing the definition for the Microsoft Fabric tool
106
+ */
107
+ static createFabricTool(connectionId: string): {
108
+ definition: ToolDefinition;
109
+ };
88
110
  /**
89
111
  * Creates a function tool
90
112
  *
@@ -187,5 +209,14 @@ export declare class ToolSet {
187
209
  definition: AzureFunctionToolDefinition;
188
210
  resources: ToolResources;
189
211
  };
212
+ /**
213
+ * Adds a Microsoft Fabric tool to the tool set.
214
+ *
215
+ * @param connectionId - The ID of the Fabric connection to use.
216
+ * @returns An object containing the definition for the Microsoft Fabric tool
217
+ */
218
+ addFabricTool(connectionId: string): {
219
+ definition: ToolDefinition;
220
+ };
190
221
  }
191
222
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/agents/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,wBAAwB,EACxB,+BAA+B,EAC/B,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,0BAA0B,EAC1B,aAAa,EACb,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EACvD,MAAM,EAAE,oBAAoB,GAAG,sBAAsB,GAAG,0BAA0B,EAClF,IAAI,EAAE,MAAM,GACX,MAAM,IAAI,CAAC,CAEb;AAED,2DAA2D;AAC3D,oBAAY,kBAAkB;IAC5B,iCAAiC;IACjC,aAAa,mBAAmB;IAChC,4BAA4B;IAC5B,eAAe,qBAAqB;IACpC,sBAAsB;IACtB,mBAAmB,yBAAyB;IAC5C,0BAA0B;IAC1B,aAAa,mBAAmB;CACjC;AASD;;GAEG;AACH,qBAAa,WAAW;IACtB;;;;;;OAMG;IACH,MAAM,CAAC,oBAAoB,CACzB,QAAQ,EAAE,kBAAkB,EAC5B,aAAa,EAAE,MAAM,EAAE,GACtB;QAAE,UAAU,EAAE,cAAc,CAAA;KAAE;IAWjC;;;;;;;;OAQG;IACH,MAAM,CAAC,oBAAoB,CACzB,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,YAAY,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,EAC/C,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cAAc,CAAA;KAAE;IAMjC;;;;;;;;OAQG;IACH,iBAAiB,CACf,cAAc,CAAC,EAAE,MAAM,EAAE,EACzB,YAAY,CAAC,EAAE,KAAK,CAAC,yBAAyB,CAAC,EAC/C,iBAAiB,CAAC,EAAE,+BAA+B,GAClD;QAAE,UAAU,EAAE,wBAAwB,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE;IAOrE;;;;;;;OAOG;IACH,sBAAsB,CACpB,OAAO,CAAC,EAAE,MAAM,EAAE,EAClB,WAAW,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,GACzC;QAAE,UAAU,EAAE,6BAA6B,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE;IAO1E;;;;;;;OAOG;IACH,oBAAoB,CAClB,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,GAChB;QAAE,UAAU,EAAE,2BAA2B,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE;IAOxE;;;;;;OAMG;IACH,cAAc,CAAC,yBAAyB,EAAE,yBAAyB,GAAG;QACpE,UAAU,EAAE,qBAAqB,CAAC;KACnC;IAMD;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,yBAAyB,EACrC,WAAW,EAAE,yBAAyB,EACtC,iBAAiB,EAAE,uBAAuB,GACzC;QAAE,UAAU,EAAE,2BAA2B,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE;IAaxE;;;;;OAKG;IACH,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG;QAAE,UAAU,EAAE,cAAc,CAAA;KAAE;CAKpE"}
@@ -17,17 +17,20 @@ export var connectionToolType;
17
17
  /** Bing grounding search tool */
18
18
  connectionToolType["BingGrounding"] = "bing_grounding";
19
19
  /** Microsoft Fabric tool */
20
- connectionToolType["MicrosoftFabric"] = "microsoft_fabric";
20
+ connectionToolType["MicrosoftFabric"] = "fabric_dataagent";
21
21
  /** Sharepoint tool */
22
22
  connectionToolType["SharepointGrounding"] = "sharepoint_grounding";
23
23
  /** Azure Function tool */
24
24
  connectionToolType["AzureFunction"] = "azure_function";
25
+ /** Bing custom search tool */
26
+ connectionToolType["BingCustomSearch"] = "bing_custom_search";
25
27
  })(connectionToolType || (connectionToolType = {}));
26
28
  const toolMap = {
27
29
  bing_grounding: "bingGrounding",
28
- microsoft_fabric: "microsoftFabric",
30
+ fabric_dataagent: "fabric_dataagent",
29
31
  sharepoint_grounding: "sharepointGrounding",
30
32
  azure_function: "azureFunction",
33
+ bing_custom_search: "bingCustomSearch",
31
34
  };
32
35
  /**
33
36
  * Utility class for creating various tools.
@@ -50,6 +53,26 @@ export class ToolUtility {
50
53
  },
51
54
  };
52
55
  }
56
+ /**
57
+ * Creates a bing custom search tool
58
+ *
59
+ * @param searchConfigurations - The ID of bing search connection and instanceName.
60
+ *
61
+ * @returns An object containing the definition and resources for the bing custom search tool
62
+ */
63
+ static createBingCustomSearchTool(searchConfigurations) {
64
+ return {
65
+ definition: {
66
+ type: "bing_custom_search",
67
+ bingCustomSearch: {
68
+ searchConfigurations: searchConfigurations.map((searchConfiguration) => ({
69
+ connectionId: searchConfiguration.connectionId,
70
+ instanceName: searchConfiguration.instanceName,
71
+ })),
72
+ },
73
+ },
74
+ };
75
+ }
53
76
  /**
54
77
  * Creates a file search tool
55
78
  *
@@ -113,12 +136,36 @@ export class ToolUtility {
113
136
  *
114
137
  * @returns An object containing the definition and resources for the Azure AI search tool.
115
138
  */
116
- static createAzureAISearchTool(indexConnectionId, indexName) {
139
+ static createAzureAISearchTool(indexConnectionId, indexName, options) {
117
140
  return {
118
141
  definition: { type: "azure_ai_search" },
119
142
  resources: {
120
143
  azureAISearch: {
121
- indexes: [{ indexConnectionId: indexConnectionId, indexName: indexName }],
144
+ indexes: [
145
+ {
146
+ indexConnectionId: indexConnectionId,
147
+ indexName: indexName,
148
+ queryType: options === null || options === void 0 ? void 0 : options.queryType,
149
+ topK: options === null || options === void 0 ? void 0 : options.topK,
150
+ filter: options === null || options === void 0 ? void 0 : options.filter,
151
+ },
152
+ ],
153
+ },
154
+ },
155
+ };
156
+ }
157
+ /**
158
+ * Creates a Microsoft Fabric tool
159
+ *
160
+ * @param connectionIds - A list of the IDs of the Fabric connections to use.
161
+ * @returns An object containing the definition for the Microsoft Fabric tool
162
+ */
163
+ static createFabricTool(connectionId) {
164
+ return {
165
+ definition: {
166
+ type: "fabric_dataagent",
167
+ fabricDataAgent: {
168
+ connections: [{ connectionId: connectionId }],
122
169
  },
123
170
  },
124
171
  };
@@ -249,5 +296,16 @@ export class ToolSet {
249
296
  this.toolResources = Object.assign(Object.assign({}, this.toolResources), tool.resources);
250
297
  return tool;
251
298
  }
299
+ /**
300
+ * Adds a Microsoft Fabric tool to the tool set.
301
+ *
302
+ * @param connectionId - The ID of the Fabric connection to use.
303
+ * @returns An object containing the definition for the Microsoft Fabric tool
304
+ */
305
+ addFabricTool(connectionId) {
306
+ const tool = ToolUtility.createFabricTool(connectionId);
307
+ this.toolDefinitions.push(tool.definition);
308
+ return tool;
309
+ }
252
310
  }
253
311
  //# sourceMappingURL=utils.js.map