@azure/ai-projects 1.0.0-beta.4 → 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 (267) hide show
  1. package/README.md +159 -2
  2. package/dist/browser/agents/assistants.d.ts.map +1 -1
  3. package/dist/browser/agents/assistants.js +1 -0
  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/messages.js +1 -1
  16. package/dist/browser/agents/messages.js.map +1 -1
  17. package/dist/browser/agents/threads.d.ts +4 -2
  18. package/dist/browser/agents/threads.d.ts.map +1 -1
  19. package/dist/browser/agents/threads.js +23 -0
  20. package/dist/browser/agents/threads.js.map +1 -1
  21. package/dist/browser/agents/utils.d.ts +16 -3
  22. package/dist/browser/agents/utils.d.ts.map +1 -1
  23. package/dist/browser/agents/utils.js +33 -2
  24. package/dist/browser/agents/utils.js.map +1 -1
  25. package/dist/browser/constants.d.ts +1 -1
  26. package/dist/browser/constants.js +1 -1
  27. package/dist/browser/constants.js.map +1 -1
  28. package/dist/browser/customization/convertModelsToWrite.d.ts.map +1 -1
  29. package/dist/browser/customization/convertModelsToWrite.js +22 -0
  30. package/dist/browser/customization/convertModelsToWrite.js.map +1 -1
  31. package/dist/browser/customization/convertOutputModelsFromWire.d.ts +1 -0
  32. package/dist/browser/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  33. package/dist/browser/customization/convertOutputModelsFromWire.js +31 -2
  34. package/dist/browser/customization/convertOutputModelsFromWire.js.map +1 -1
  35. package/dist/browser/customization/models.d.ts +153 -4
  36. package/dist/browser/customization/models.d.ts.map +1 -1
  37. package/dist/browser/customization/models.js.map +1 -1
  38. package/dist/browser/customization/outputModels.d.ts +33 -1
  39. package/dist/browser/customization/outputModels.d.ts.map +1 -1
  40. package/dist/browser/customization/outputModels.js.map +1 -1
  41. package/dist/browser/customization/parameters.d.ts +18 -0
  42. package/dist/browser/customization/parameters.d.ts.map +1 -1
  43. package/dist/browser/customization/parameters.js.map +1 -1
  44. package/dist/browser/generated/src/clientDefinitions.d.ts +5 -3
  45. package/dist/browser/generated/src/clientDefinitions.d.ts.map +1 -1
  46. package/dist/browser/generated/src/clientDefinitions.js.map +1 -1
  47. package/dist/browser/generated/src/isUnexpected.d.ts +2 -1
  48. package/dist/browser/generated/src/isUnexpected.d.ts.map +1 -1
  49. package/dist/browser/generated/src/isUnexpected.js +1 -0
  50. package/dist/browser/generated/src/isUnexpected.js.map +1 -1
  51. package/dist/browser/generated/src/models.d.ts +111 -13
  52. package/dist/browser/generated/src/models.d.ts.map +1 -1
  53. package/dist/browser/generated/src/models.js.map +1 -1
  54. package/dist/browser/generated/src/outputModels.d.ts +78 -5
  55. package/dist/browser/generated/src/outputModels.d.ts.map +1 -1
  56. package/dist/browser/generated/src/outputModels.js.map +1 -1
  57. package/dist/browser/generated/src/parameters.d.ts +18 -0
  58. package/dist/browser/generated/src/parameters.d.ts.map +1 -1
  59. package/dist/browser/generated/src/parameters.js.map +1 -1
  60. package/dist/browser/generated/src/projectsClient.js +1 -1
  61. package/dist/browser/generated/src/projectsClient.js.map +1 -1
  62. package/dist/browser/generated/src/responses.d.ts +15 -1
  63. package/dist/browser/generated/src/responses.d.ts.map +1 -1
  64. package/dist/browser/generated/src/responses.js.map +1 -1
  65. package/dist/browser/index.d.ts +1 -0
  66. package/dist/browser/index.d.ts.map +1 -1
  67. package/dist/browser/index.js.map +1 -1
  68. package/dist/commonjs/agents/assistants.d.ts.map +1 -1
  69. package/dist/commonjs/agents/assistants.js +1 -0
  70. package/dist/commonjs/agents/assistants.js.map +1 -1
  71. package/dist/commonjs/agents/customModels.d.ts +6 -1
  72. package/dist/commonjs/agents/customModels.d.ts.map +1 -1
  73. package/dist/commonjs/agents/customModels.js.map +1 -1
  74. package/dist/commonjs/agents/index.d.ts +4 -2
  75. package/dist/commonjs/agents/index.d.ts.map +1 -1
  76. package/dist/commonjs/agents/index.js +1 -0
  77. package/dist/commonjs/agents/index.js.map +1 -1
  78. package/dist/commonjs/agents/inputOutputs.d.ts +4 -4
  79. package/dist/commonjs/agents/inputOutputs.d.ts.map +1 -1
  80. package/dist/commonjs/agents/inputOutputs.js.map +1 -1
  81. package/dist/commonjs/agents/messages.js +1 -1
  82. package/dist/commonjs/agents/messages.js.map +1 -1
  83. package/dist/commonjs/agents/threads.d.ts +4 -2
  84. package/dist/commonjs/agents/threads.d.ts.map +1 -1
  85. package/dist/commonjs/agents/threads.js +24 -0
  86. package/dist/commonjs/agents/threads.js.map +1 -1
  87. package/dist/commonjs/agents/utils.d.ts +16 -3
  88. package/dist/commonjs/agents/utils.d.ts.map +1 -1
  89. package/dist/commonjs/agents/utils.js +33 -2
  90. package/dist/commonjs/agents/utils.js.map +1 -1
  91. package/dist/commonjs/constants.d.ts +1 -1
  92. package/dist/commonjs/constants.js +1 -1
  93. package/dist/commonjs/constants.js.map +1 -1
  94. package/dist/commonjs/customization/convertModelsToWrite.d.ts.map +1 -1
  95. package/dist/commonjs/customization/convertModelsToWrite.js +22 -0
  96. package/dist/commonjs/customization/convertModelsToWrite.js.map +1 -1
  97. package/dist/commonjs/customization/convertOutputModelsFromWire.d.ts +1 -0
  98. package/dist/commonjs/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  99. package/dist/commonjs/customization/convertOutputModelsFromWire.js +32 -2
  100. package/dist/commonjs/customization/convertOutputModelsFromWire.js.map +1 -1
  101. package/dist/commonjs/customization/models.d.ts +153 -4
  102. package/dist/commonjs/customization/models.d.ts.map +1 -1
  103. package/dist/commonjs/customization/models.js.map +1 -1
  104. package/dist/commonjs/customization/outputModels.d.ts +33 -1
  105. package/dist/commonjs/customization/outputModels.d.ts.map +1 -1
  106. package/dist/commonjs/customization/outputModels.js.map +1 -1
  107. package/dist/commonjs/customization/parameters.d.ts +18 -0
  108. package/dist/commonjs/customization/parameters.d.ts.map +1 -1
  109. package/dist/commonjs/customization/parameters.js.map +1 -1
  110. package/dist/commonjs/generated/src/clientDefinitions.d.ts +5 -3
  111. package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -1
  112. package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -1
  113. package/dist/commonjs/generated/src/isUnexpected.d.ts +2 -1
  114. package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -1
  115. package/dist/commonjs/generated/src/isUnexpected.js +1 -0
  116. package/dist/commonjs/generated/src/isUnexpected.js.map +1 -1
  117. package/dist/commonjs/generated/src/models.d.ts +111 -13
  118. package/dist/commonjs/generated/src/models.d.ts.map +1 -1
  119. package/dist/commonjs/generated/src/models.js.map +1 -1
  120. package/dist/commonjs/generated/src/outputModels.d.ts +78 -5
  121. package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -1
  122. package/dist/commonjs/generated/src/outputModels.js.map +1 -1
  123. package/dist/commonjs/generated/src/parameters.d.ts +18 -0
  124. package/dist/commonjs/generated/src/parameters.d.ts.map +1 -1
  125. package/dist/commonjs/generated/src/parameters.js.map +1 -1
  126. package/dist/commonjs/generated/src/projectsClient.js +1 -1
  127. package/dist/commonjs/generated/src/projectsClient.js.map +1 -1
  128. package/dist/commonjs/generated/src/responses.d.ts +15 -1
  129. package/dist/commonjs/generated/src/responses.d.ts.map +1 -1
  130. package/dist/commonjs/generated/src/responses.js.map +1 -1
  131. package/dist/commonjs/index.d.ts +1 -0
  132. package/dist/commonjs/index.d.ts.map +1 -1
  133. package/dist/commonjs/index.js.map +1 -1
  134. package/dist/commonjs/tsdoc-metadata.json +1 -1
  135. package/dist/esm/agents/assistants.d.ts.map +1 -1
  136. package/dist/esm/agents/assistants.js +1 -0
  137. package/dist/esm/agents/assistants.js.map +1 -1
  138. package/dist/esm/agents/customModels.d.ts +6 -1
  139. package/dist/esm/agents/customModels.d.ts.map +1 -1
  140. package/dist/esm/agents/customModels.js.map +1 -1
  141. package/dist/esm/agents/index.d.ts +4 -2
  142. package/dist/esm/agents/index.d.ts.map +1 -1
  143. package/dist/esm/agents/index.js +2 -1
  144. package/dist/esm/agents/index.js.map +1 -1
  145. package/dist/esm/agents/inputOutputs.d.ts +4 -4
  146. package/dist/esm/agents/inputOutputs.d.ts.map +1 -1
  147. package/dist/esm/agents/inputOutputs.js.map +1 -1
  148. package/dist/esm/agents/messages.js +1 -1
  149. package/dist/esm/agents/messages.js.map +1 -1
  150. package/dist/esm/agents/threads.d.ts +4 -2
  151. package/dist/esm/agents/threads.d.ts.map +1 -1
  152. package/dist/esm/agents/threads.js +23 -0
  153. package/dist/esm/agents/threads.js.map +1 -1
  154. package/dist/esm/agents/utils.d.ts +16 -3
  155. package/dist/esm/agents/utils.d.ts.map +1 -1
  156. package/dist/esm/agents/utils.js +33 -2
  157. package/dist/esm/agents/utils.js.map +1 -1
  158. package/dist/esm/constants.d.ts +1 -1
  159. package/dist/esm/constants.js +1 -1
  160. package/dist/esm/constants.js.map +1 -1
  161. package/dist/esm/customization/convertModelsToWrite.d.ts.map +1 -1
  162. package/dist/esm/customization/convertModelsToWrite.js +22 -0
  163. package/dist/esm/customization/convertModelsToWrite.js.map +1 -1
  164. package/dist/esm/customization/convertOutputModelsFromWire.d.ts +1 -0
  165. package/dist/esm/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  166. package/dist/esm/customization/convertOutputModelsFromWire.js +31 -2
  167. package/dist/esm/customization/convertOutputModelsFromWire.js.map +1 -1
  168. package/dist/esm/customization/models.d.ts +153 -4
  169. package/dist/esm/customization/models.d.ts.map +1 -1
  170. package/dist/esm/customization/models.js.map +1 -1
  171. package/dist/esm/customization/outputModels.d.ts +33 -1
  172. package/dist/esm/customization/outputModels.d.ts.map +1 -1
  173. package/dist/esm/customization/outputModels.js.map +1 -1
  174. package/dist/esm/customization/parameters.d.ts +18 -0
  175. package/dist/esm/customization/parameters.d.ts.map +1 -1
  176. package/dist/esm/customization/parameters.js.map +1 -1
  177. package/dist/esm/generated/src/clientDefinitions.d.ts +5 -3
  178. package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -1
  179. package/dist/esm/generated/src/clientDefinitions.js.map +1 -1
  180. package/dist/esm/generated/src/isUnexpected.d.ts +2 -1
  181. package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -1
  182. package/dist/esm/generated/src/isUnexpected.js +1 -0
  183. package/dist/esm/generated/src/isUnexpected.js.map +1 -1
  184. package/dist/esm/generated/src/models.d.ts +111 -13
  185. package/dist/esm/generated/src/models.d.ts.map +1 -1
  186. package/dist/esm/generated/src/models.js.map +1 -1
  187. package/dist/esm/generated/src/outputModels.d.ts +78 -5
  188. package/dist/esm/generated/src/outputModels.d.ts.map +1 -1
  189. package/dist/esm/generated/src/outputModels.js.map +1 -1
  190. package/dist/esm/generated/src/parameters.d.ts +18 -0
  191. package/dist/esm/generated/src/parameters.d.ts.map +1 -1
  192. package/dist/esm/generated/src/parameters.js.map +1 -1
  193. package/dist/esm/generated/src/projectsClient.js +1 -1
  194. package/dist/esm/generated/src/projectsClient.js.map +1 -1
  195. package/dist/esm/generated/src/responses.d.ts +15 -1
  196. package/dist/esm/generated/src/responses.d.ts.map +1 -1
  197. package/dist/esm/generated/src/responses.js.map +1 -1
  198. package/dist/esm/index.d.ts +1 -0
  199. package/dist/esm/index.d.ts.map +1 -1
  200. package/dist/esm/index.js.map +1 -1
  201. package/dist/react-native/agents/assistants.d.ts.map +1 -1
  202. package/dist/react-native/agents/assistants.js +1 -0
  203. package/dist/react-native/agents/assistants.js.map +1 -1
  204. package/dist/react-native/agents/customModels.d.ts +6 -1
  205. package/dist/react-native/agents/customModels.d.ts.map +1 -1
  206. package/dist/react-native/agents/customModels.js.map +1 -1
  207. package/dist/react-native/agents/index.d.ts +4 -2
  208. package/dist/react-native/agents/index.d.ts.map +1 -1
  209. package/dist/react-native/agents/index.js +2 -1
  210. package/dist/react-native/agents/index.js.map +1 -1
  211. package/dist/react-native/agents/inputOutputs.d.ts +4 -4
  212. package/dist/react-native/agents/inputOutputs.d.ts.map +1 -1
  213. package/dist/react-native/agents/inputOutputs.js.map +1 -1
  214. package/dist/react-native/agents/messages.js +1 -1
  215. package/dist/react-native/agents/messages.js.map +1 -1
  216. package/dist/react-native/agents/threads.d.ts +4 -2
  217. package/dist/react-native/agents/threads.d.ts.map +1 -1
  218. package/dist/react-native/agents/threads.js +23 -0
  219. package/dist/react-native/agents/threads.js.map +1 -1
  220. package/dist/react-native/agents/utils.d.ts +16 -3
  221. package/dist/react-native/agents/utils.d.ts.map +1 -1
  222. package/dist/react-native/agents/utils.js +33 -2
  223. package/dist/react-native/agents/utils.js.map +1 -1
  224. package/dist/react-native/constants.d.ts +1 -1
  225. package/dist/react-native/constants.js +1 -1
  226. package/dist/react-native/constants.js.map +1 -1
  227. package/dist/react-native/customization/convertModelsToWrite.d.ts.map +1 -1
  228. package/dist/react-native/customization/convertModelsToWrite.js +22 -0
  229. package/dist/react-native/customization/convertModelsToWrite.js.map +1 -1
  230. package/dist/react-native/customization/convertOutputModelsFromWire.d.ts +1 -0
  231. package/dist/react-native/customization/convertOutputModelsFromWire.d.ts.map +1 -1
  232. package/dist/react-native/customization/convertOutputModelsFromWire.js +31 -2
  233. package/dist/react-native/customization/convertOutputModelsFromWire.js.map +1 -1
  234. package/dist/react-native/customization/models.d.ts +153 -4
  235. package/dist/react-native/customization/models.d.ts.map +1 -1
  236. package/dist/react-native/customization/models.js.map +1 -1
  237. package/dist/react-native/customization/outputModels.d.ts +33 -1
  238. package/dist/react-native/customization/outputModels.d.ts.map +1 -1
  239. package/dist/react-native/customization/outputModels.js.map +1 -1
  240. package/dist/react-native/customization/parameters.d.ts +18 -0
  241. package/dist/react-native/customization/parameters.d.ts.map +1 -1
  242. package/dist/react-native/customization/parameters.js.map +1 -1
  243. package/dist/react-native/generated/src/clientDefinitions.d.ts +5 -3
  244. package/dist/react-native/generated/src/clientDefinitions.d.ts.map +1 -1
  245. package/dist/react-native/generated/src/clientDefinitions.js.map +1 -1
  246. package/dist/react-native/generated/src/isUnexpected.d.ts +2 -1
  247. package/dist/react-native/generated/src/isUnexpected.d.ts.map +1 -1
  248. package/dist/react-native/generated/src/isUnexpected.js +1 -0
  249. package/dist/react-native/generated/src/isUnexpected.js.map +1 -1
  250. package/dist/react-native/generated/src/models.d.ts +111 -13
  251. package/dist/react-native/generated/src/models.d.ts.map +1 -1
  252. package/dist/react-native/generated/src/models.js.map +1 -1
  253. package/dist/react-native/generated/src/outputModels.d.ts +78 -5
  254. package/dist/react-native/generated/src/outputModels.d.ts.map +1 -1
  255. package/dist/react-native/generated/src/outputModels.js.map +1 -1
  256. package/dist/react-native/generated/src/parameters.d.ts +18 -0
  257. package/dist/react-native/generated/src/parameters.d.ts.map +1 -1
  258. package/dist/react-native/generated/src/parameters.js.map +1 -1
  259. package/dist/react-native/generated/src/projectsClient.js +1 -1
  260. package/dist/react-native/generated/src/projectsClient.js.map +1 -1
  261. package/dist/react-native/generated/src/responses.d.ts +15 -1
  262. package/dist/react-native/generated/src/responses.d.ts.map +1 -1
  263. package/dist/react-native/generated/src/responses.js.map +1 -1
  264. package/dist/react-native/index.d.ts +1 -0
  265. package/dist/react-native/index.d.ts.map +1 -1
  266. package/dist/react-native/index.js.map +1 -1
  267. package/package.json +3 -3
package/README.md CHANGED
@@ -379,6 +379,38 @@ const agent = await client.agents.createAgent("gpt-4o", {
379
379
  console.log(`Created agent, agent ID: ${agent.id}`);
380
380
  ```
381
381
 
382
+ #### Create Agent With OpenAPI
383
+
384
+ OpenAPI specifications describe REST operations against a specific endpoint. Agents SDK can read an OpenAPI spec, create a function from it, and call that function against the REST endpoint without additional client-side execution.
385
+ Here is an example creating an OpenAPI tool (using anonymous authentication):
386
+
387
+ ```ts snippet:createAgentWithOpenApi
388
+ import { ToolUtility } from "@azure/ai-projects";
389
+
390
+ // Read in OpenApi spec
391
+ const filePath = "./data/weatherOpenApi.json";
392
+ const openApiSpec = JSON.parse(fs.readFileSync(filePath, "utf-8"));
393
+ // Define OpenApi function
394
+ const openApiFunction = {
395
+ name: "getWeather",
396
+ spec: openApiSpec,
397
+ description: "Retrieve weather information for a location",
398
+ auth: {
399
+ type: "anonymous",
400
+ },
401
+ default_params: ["format"], // optional
402
+ };
403
+ // Create OpenApi tool
404
+ const openApiTool = ToolUtility.createOpenApiTool(openApiFunction);
405
+ // Create agent with OpenApi tool
406
+ const agent = await client.agents.createAgent("gpt-4o-mini", {
407
+ name: "myAgent",
408
+ instructions: "You are a helpful agent",
409
+ tools: [openApiTool.definition],
410
+ });
411
+ console.log(`Created agent, agent ID: ${agent.id}`);
412
+ ```
413
+
382
414
  #### Create an Agent with Fabric
383
415
 
384
416
  To enable your Agent to answer queries using Fabric data, use `FabricTool` along with a connection to the Fabric resource.
@@ -439,6 +471,21 @@ console.log(`Created agent, agent ID : ${agent.id}`);
439
471
  const thread = await client.agents.createThread({ toolResources: fileSearchTool.resources });
440
472
  ```
441
473
 
474
+ #### List Threads
475
+
476
+ To list all threads attached to a given agent, use the list_threads API:
477
+
478
+ ```ts snippet:listThreads
479
+ const threads = await client.agents.listThreads();
480
+ console.log(`Threads for agent ${agent.id}:`);
481
+ for await (const t of (await threads).data) {
482
+ console.log(`Thread ID: ${t.id}`);
483
+ console.log(`Created at: ${t.createdAt}`);
484
+ console.log(`Metadata: ${t.metadata}`);
485
+ console.log(`---- `);
486
+ }
487
+ ```
488
+
442
489
  #### Create Message
443
490
 
444
491
  To create a message for assistant to process, you pass `user` as `role` and a question as `content`:
@@ -501,6 +548,116 @@ const message = await client.agents.createMessage(thread.id, {
501
548
  console.log(`Created message, message ID: ${message.id}`);
502
549
  ```
503
550
 
551
+ #### Create Message with Image Inputs
552
+
553
+ You can send messages to Azure agents with image inputs in following ways:
554
+
555
+ - **Using an image stored as a uploaded file**
556
+ - **Using a public image accessible via URL**
557
+ - **Using a base64 encoded image string**
558
+
559
+ The following examples demonstrate each method:
560
+
561
+ ##### Create message using uploaded image file
562
+
563
+ ```ts snippet:imageInputWithFile
564
+ // Upload the local image file
565
+ const fileStream = fs.createReadStream(imagePath);
566
+ const imageFile = await client.agents.uploadFile(fileStream, "assistants", {
567
+ fileName: "image_file.png",
568
+ });
569
+ console.log(`Uploaded file, file ID: ${imageFile.id}`);
570
+ // Create a message with both text and image content
571
+ console.log("Creating message with image content...");
572
+ const inputMessage = "Hello, what is in the image?";
573
+ const content = [
574
+ {
575
+ type: "text",
576
+ text: inputMessage,
577
+ },
578
+ {
579
+ type: "image_file",
580
+ image_file: {
581
+ file_id: imageFile.id,
582
+ detail: "high",
583
+ },
584
+ },
585
+ ];
586
+ const message = await client.agents.createMessage(thread.id, {
587
+ role: "user",
588
+ content: content,
589
+ });
590
+ console.log(`Created message, message ID: ${message.id}`);
591
+ ```
592
+
593
+ ##### Create message with an image URL input
594
+
595
+ ```ts snippet:imageInputWithUrl
596
+ // Specify the public image URL
597
+ const imageUrl =
598
+ "https://github.com/Azure/azure-sdk-for-js/blob/0aa88ceb18d865726d423f73b8393134e783aea6/sdk/ai/ai-projects/data/image_file.png?raw=true";
599
+ // Create content directly referencing image URL
600
+ const inputMessage = "Hello, what is in the image?";
601
+ const content = [
602
+ {
603
+ type: "text",
604
+ text: inputMessage,
605
+ },
606
+ {
607
+ type: "image_url",
608
+ image_url: {
609
+ url: imageUrl,
610
+ detail: "high",
611
+ },
612
+ },
613
+ ];
614
+ const message = await client.agents.createMessage(thread.id, {
615
+ role: "user",
616
+ content: content,
617
+ });
618
+ console.log(`Created message, message ID: ${message.id}`);
619
+ ```
620
+
621
+ ##### Create message with base64-encoded image input
622
+
623
+ ```ts snippet:imageInputWithBase64
624
+ function imageToBase64DataUrl(imagePath: string, mimeType: string): string {
625
+ try {
626
+ // Read the image file as binary
627
+ const imageBuffer = fs.readFileSync(imagePath);
628
+ // Convert to base64
629
+ const base64Data = imageBuffer.toString("base64");
630
+ // Format as a data URL
631
+ return `data:${mimeType};base64,${base64Data}`;
632
+ } catch (error) {
633
+ console.error(`Error reading image file at ${imagePath}:`, error);
634
+ throw error;
635
+ }
636
+ }
637
+ // Convert your image file to base64 format
638
+ const imageDataUrl = imageToBase64DataUrl(filePath, "image/png");
639
+ // Create a message with both text and image content
640
+ const inputMessage = "Hello, what is in the image?";
641
+ const content = [
642
+ {
643
+ type: "text",
644
+ text: inputMessage,
645
+ },
646
+ {
647
+ type: "image_url",
648
+ image_url: {
649
+ url: imageDataUrl,
650
+ detail: "high",
651
+ },
652
+ },
653
+ ];
654
+ const message = await client.agents.createMessage(thread.id, {
655
+ role: "user",
656
+ content: content,
657
+ });
658
+ console.log(`Created message, message ID: ${message.id}`);
659
+ ```
660
+
504
661
  #### Create Run, Run_and_Process, or Stream
505
662
 
506
663
  Here is an example of `createRun` and poll until the run is completed:
@@ -592,7 +749,7 @@ for await (const eventMessage of streamEventMessages) {
592
749
  To retrieve messages from agents, use the following example:
593
750
 
594
751
  ```ts snippet:listMessages
595
- import { MessageContentOutput, isOutputOfType, MessageTextContentOutput } from "../src/index.js";
752
+ import { MessageContentOutput, isOutputOfType, MessageTextContentOutput } from "@azure/ai-projects";
596
753
 
597
754
  const messages = await client.agents.listMessages(thread.id);
598
755
  while (messages.hasMore) {
@@ -627,7 +784,7 @@ import {
627
784
  isOutputOfType,
628
785
  MessageTextContentOutput,
629
786
  MessageImageFileContentOutput,
630
- } from "../src/index.js";
787
+ } from "@azure/ai-projects";
631
788
 
632
789
  const messages = await client.agents.listMessages(thread.id);
633
790
  // Get most recent message from the assistant
@@ -1 +1 @@
1
- {"version":3,"file":"assistants.d.ts","sourceRoot":"","sources":["../../../src/agents/assistants.ts"],"names":[],"mappings":"AAGA,OAAO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B,EACzB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAsB3B,2BAA2B;AAC3B,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,WAAW,CAAC,CAuBtB;AAED,0DAA0D;AAC1D,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,+BAA+B,CAAC,CAoB1C;AAED,mCAAmC;AACnC,wBAAsB,QAAQ,CAC5B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,WAAW,CAAC,CA0BtB;AAED,kCAAkC;AAClC,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,WAAW,CAAC,CAyBtB;AAED,wBAAwB;AACxB,wBAAsB,WAAW,CAC/B,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,yBAAyB,CAAC,CAsBpC"}
@@ -16,6 +16,7 @@ var Tools;
16
16
  Tools["FileSearch"] = "file_search";
17
17
  Tools["Function"] = "function";
18
18
  Tools["BingGrounding"] = "bing_grounding";
19
+ Tools["BingCustomSearch"] = "bing_custom_search";
19
20
  Tools["MicrosoftFabric"] = "fabric_dataagent";
20
21
  Tools["SharepointGrounding"] = "sharepoint_grounding";
21
22
  Tools["AzureAISearch"] = "azure_ai_search";
@@ -1 +1 @@
1
- {"version":3,"file":"assistants.js","sourceRoot":"","sources":["../../../src/agents/assistants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAM9E,OAAO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,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,0CAAE,KAAK,EAAE,CAAC;QACpC,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,WAAmB;IAC9C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC;AAED,SAAS,6BAA6B,CACpC,WAAmB,EACnB,OAAmD;IAEnD,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACjC,IAAI,OAAO,EAAE,CAAC;QACZ,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACzC,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 AgentDeletionStatusOutput,\n AgentOutput,\n OpenAIPageableListOfAgentOutput,\n} from \"../customization/outputModels.js\";\nimport {\n validateLimit,\n validateMetadata,\n validateOrder,\n validateVectorStoreDataType,\n} from \"./inputValidations.js\";\nimport { TracingUtility } from \"../tracing.js\";\nimport { traceEndCreateOrUpdateAgent, traceStartCreateOrUpdateAgent } from \"./assistantsTrace.js\";\nimport { traceEndAgentGeneric, traceStartAgentGeneric } from \"./traceUtility.js\";\nimport type {\n CreateAgentOptionalParams,\n DeleteAgentOptionalParams,\n GetAgentOptionalParams,\n ListAgentsOptionalParams,\n UpdateAgentOptionalParams,\n} from \"./customModels.js\";\nimport type * as GeneratedParameters from \"../generated/src/parameters.js\";\nimport * as ConvertFromWire from \"../customization/convertOutputModelsFromWire.js\";\nimport * as ConverterToWire from \"../customization/convertModelsToWrite.js\";\nimport { convertToListQueryParameters } from \"../customization/convertParametersToWire.js\";\nimport { createOpenAIError } from \"./openAIError.js\";\n\nconst expectedStatuses = [\"200\"];\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 OpenApi = \"openapi\",\n AzureFunction = \"azure_function\",\n}\n\n/** Creates a new agent. */\nexport async function createAgent(\n context: Client,\n model: string,\n options: CreateAgentOptionalParams = {},\n): Promise<AgentOutput> {\n const createOptions: GeneratedParameters.CreateAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertCreateAgentOptions({ ...options, model }),\n },\n };\n\n validateCreateAgentParameters(createOptions);\n const response = await TracingUtility.withSpan(\n \"CreateAgent\",\n createOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/assistants\").post(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n traceStartCreateOrUpdateAgent,\n traceEndCreateOrUpdateAgent,\n );\n return ConvertFromWire.convertAgentOutput(response);\n}\n\n/** Gets a list of agents that were previously created. */\nexport async function listAgents(\n context: Client,\n options: ListAgentsOptionalParams = {},\n): Promise<OpenAIPageableListOfAgentOutput> {\n const listAgentsOptions: GeneratedParameters.ListAgentsParameters = {\n ...operationOptionsToRequestParameters(options),\n queryParameters: convertToListQueryParameters(options),\n };\n\n validateListAgentsParameters(listAgentsOptions);\n const response = await TracingUtility.withSpan(\n \"ListAgents\",\n listAgentsOptions || {},\n async (updateOptions) => {\n const result = await context.path(\"/assistants\").get(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n );\n\n return ConvertFromWire.convertOpenAIPageableListOfAgentOutput(response);\n}\n\n/** Retrieves an existing agent. */\nexport async function getAgent(\n context: Client,\n assistantId: string,\n options: GetAgentOptionalParams = {},\n): Promise<AgentOutput> {\n const getAgentOptions: GeneratedParameters.GetAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateAssistantId(assistantId);\n const response = await TracingUtility.withSpan(\n \"GetAgent\",\n getAgentOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/assistants/{assistantId}\", assistantId)\n .get(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: { agentId: assistantId },\n }),\n );\n\n return ConvertFromWire.convertAgentOutput(response);\n}\n\n/** Modifies an existing agent. */\nexport async function updateAgent(\n context: Client,\n assistantId: string,\n options: UpdateAgentOptionalParams = {},\n): Promise<AgentOutput> {\n const updateAgentOptions: GeneratedParameters.UpdateAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertUpdateAgentOptions(options),\n },\n };\n\n validateUpdateAgentParameters(assistantId, updateAgentOptions);\n const response = await TracingUtility.withSpan(\n \"UpdateAgent\",\n updateAgentOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/assistants/{assistantId}\", assistantId)\n .post(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) => traceStartCreateOrUpdateAgent(span, updatedOptions, assistantId),\n traceEndCreateOrUpdateAgent,\n );\n return ConvertFromWire.convertAgentOutput(response);\n}\n\n/** Deletes an agent. */\nexport async function deleteAgent(\n context: Client,\n assistantId: string,\n options: DeleteAgentOptionalParams = {},\n): Promise<AgentDeletionStatusOutput> {\n const deleteAgentOptions: GeneratedParameters.DeleteAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateAssistantId(assistantId);\n const response = await TracingUtility.withSpan(\n \"DeleteAgent\",\n deleteAgentOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/assistants/{assistantId}\", assistantId)\n .delete(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n traceStartAgentGeneric,\n traceEndAgentGeneric,\n );\n return ConvertFromWire.convertAgentDeletionStatusOutput(response);\n}\n\nfunction validateCreateAgentParameters(\n options: GeneratedParameters.CreateAgentParameters | GeneratedParameters.UpdateAgentParameters,\n): void {\n if (options.body.tools) {\n if (options.body.tools.some((value) => !Object.values(Tools).includes(value.type 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 if (options.body.tool_resources) {\n if (options.body.tool_resources.code_interpreter) {\n if (\n options.body.tool_resources.code_interpreter.file_ids &&\n options.body.tool_resources.code_interpreter.data_sources\n ) {\n throw new Error(\"Only file_ids or data_sources can be provided, not both\");\n }\n if (\n options.body.tool_resources.code_interpreter.file_ids &&\n options.body.tool_resources.code_interpreter.file_ids.length > 20\n ) {\n throw new Error(\"A maximum of 20 file IDs are allowed\");\n }\n if (options.body.tool_resources.code_interpreter.data_sources) {\n validateVectorStoreDataType(options.body.tool_resources.code_interpreter.data_sources);\n }\n }\n if (options.body.tool_resources.file_search) {\n if (\n options.body.tool_resources.file_search.vector_store_ids &&\n options.body.tool_resources.file_search.vector_store_ids.length > 1\n ) {\n throw new Error(\"Only one vector store ID is allowed\");\n }\n if (options.body.tool_resources.file_search.vector_stores) {\n if (options.body.tool_resources.file_search.vector_stores.length > 1) {\n throw new Error(\"Only one vector store is allowed\");\n }\n validateVectorStoreDataType(\n options.body.tool_resources.file_search.vector_stores[0]?.configuration.data_sources,\n );\n }\n }\n if (options.body.tool_resources.azure_ai_search) {\n if (\n options.body.tool_resources.azure_ai_search.indexes &&\n options.body.tool_resources.azure_ai_search.indexes.length > 1\n ) {\n throw new Error(\"Only one index is allowed\");\n }\n }\n }\n if (options.body.temperature && (options.body.temperature < 0 || options.body.temperature > 2)) {\n throw new Error(\"Temperature must be between 0 and 2\");\n }\n if (options.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n}\n\nfunction validateListAgentsParameters(options?: GeneratedParameters.ListAgentsParameters): void {\n if (options?.queryParameters?.limit) {\n validateLimit(options.queryParameters.limit);\n }\n if (options?.queryParameters?.order) {\n validateOrder(options.queryParameters.order);\n }\n}\n\nfunction validateAssistantId(assistantId: string): void {\n if (!assistantId) {\n throw new Error(\"Assistant ID is required\");\n }\n}\n\nfunction validateUpdateAgentParameters(\n assistantId: string,\n options?: GeneratedParameters.UpdateAgentParameters,\n): void {\n validateAssistantId(assistantId);\n if (options) {\n validateCreateAgentParameters(options);\n }\n}\n"]}
1
+ {"version":3,"file":"assistants.js","sourceRoot":"","sources":["../../../src/agents/assistants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAM9E,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AASjF,OAAO,KAAK,eAAe,MAAM,iDAAiD,CAAC;AACnF,OAAO,KAAK,eAAe,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;AAEjC,IAAK,KAWJ;AAXD,WAAK,KAAK;IACR,6CAAoC,CAAA;IACpC,mCAA0B,CAAA;IAC1B,8BAAqB,CAAA;IACrB,yCAAgC,CAAA;IAChC,gDAAuC,CAAA;IACvC,6C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,2BAA2B,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;IACH,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC;QAC/F,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC1B,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC;AAED,SAAS,4BAA4B,CAAC,OAAkD;;IACtF,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,0CAAE,KAAK,EAAE,CAAC;QACpC,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,eAAe,0CAAE,KAAK,EAAE,CAAC;QACpC,aAAa,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,SAAS,mBAAmB,CAAC,WAAmB;IAC9C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC;AAED,SAAS,6BAA6B,CACpC,WAAmB,EACnB,OAAmD;IAEnD,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACjC,IAAI,OAAO,EAAE,CAAC;QACZ,6BAA6B,CAAC,OAAO,CAAC,CAAC;IACzC,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 AgentDeletionStatusOutput,\n AgentOutput,\n OpenAIPageableListOfAgentOutput,\n} from \"../customization/outputModels.js\";\nimport {\n validateLimit,\n validateMetadata,\n validateOrder,\n validateVectorStoreDataType,\n} from \"./inputValidations.js\";\nimport { TracingUtility } from \"../tracing.js\";\nimport { traceEndCreateOrUpdateAgent, traceStartCreateOrUpdateAgent } from \"./assistantsTrace.js\";\nimport { traceEndAgentGeneric, traceStartAgentGeneric } from \"./traceUtility.js\";\nimport type {\n CreateAgentOptionalParams,\n DeleteAgentOptionalParams,\n GetAgentOptionalParams,\n ListAgentsOptionalParams,\n UpdateAgentOptionalParams,\n} from \"./customModels.js\";\nimport type * as GeneratedParameters from \"../generated/src/parameters.js\";\nimport * as ConvertFromWire from \"../customization/convertOutputModelsFromWire.js\";\nimport * as ConverterToWire from \"../customization/convertModelsToWrite.js\";\nimport { convertToListQueryParameters } from \"../customization/convertParametersToWire.js\";\nimport { createOpenAIError } from \"./openAIError.js\";\n\nconst expectedStatuses = [\"200\"];\n\nenum Tools {\n CodeInterpreter = \"code_interpreter\",\n FileSearch = \"file_search\",\n Function = \"function\",\n BingGrounding = \"bing_grounding\",\n BingCustomSearch = \"bing_custom_search\",\n MicrosoftFabric = \"fabric_dataagent\",\n SharepointGrounding = \"sharepoint_grounding\",\n AzureAISearch = \"azure_ai_search\",\n OpenApi = \"openapi\",\n AzureFunction = \"azure_function\",\n}\n\n/** Creates a new agent. */\nexport async function createAgent(\n context: Client,\n model: string,\n options: CreateAgentOptionalParams = {},\n): Promise<AgentOutput> {\n const createOptions: GeneratedParameters.CreateAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertCreateAgentOptions({ ...options, model }),\n },\n };\n\n validateCreateAgentParameters(createOptions);\n const response = await TracingUtility.withSpan(\n \"CreateAgent\",\n createOptions,\n async (updatedOptions) => {\n const result = await context.path(\"/assistants\").post(updatedOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n traceStartCreateOrUpdateAgent,\n traceEndCreateOrUpdateAgent,\n );\n return ConvertFromWire.convertAgentOutput(response);\n}\n\n/** Gets a list of agents that were previously created. */\nexport async function listAgents(\n context: Client,\n options: ListAgentsOptionalParams = {},\n): Promise<OpenAIPageableListOfAgentOutput> {\n const listAgentsOptions: GeneratedParameters.ListAgentsParameters = {\n ...operationOptionsToRequestParameters(options),\n queryParameters: convertToListQueryParameters(options),\n };\n\n validateListAgentsParameters(listAgentsOptions);\n const response = await TracingUtility.withSpan(\n \"ListAgents\",\n listAgentsOptions || {},\n async (updateOptions) => {\n const result = await context.path(\"/assistants\").get(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n );\n\n return ConvertFromWire.convertOpenAIPageableListOfAgentOutput(response);\n}\n\n/** Retrieves an existing agent. */\nexport async function getAgent(\n context: Client,\n assistantId: string,\n options: GetAgentOptionalParams = {},\n): Promise<AgentOutput> {\n const getAgentOptions: GeneratedParameters.GetAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateAssistantId(assistantId);\n const response = await TracingUtility.withSpan(\n \"GetAgent\",\n getAgentOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/assistants/{assistantId}\", assistantId)\n .get(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: { agentId: assistantId },\n }),\n );\n\n return ConvertFromWire.convertAgentOutput(response);\n}\n\n/** Modifies an existing agent. */\nexport async function updateAgent(\n context: Client,\n assistantId: string,\n options: UpdateAgentOptionalParams = {},\n): Promise<AgentOutput> {\n const updateAgentOptions: GeneratedParameters.UpdateAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n body: {\n ...ConverterToWire.convertUpdateAgentOptions(options),\n },\n };\n\n validateUpdateAgentParameters(assistantId, updateAgentOptions);\n const response = await TracingUtility.withSpan(\n \"UpdateAgent\",\n updateAgentOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/assistants/{assistantId}\", assistantId)\n .post(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n (span, updatedOptions) => traceStartCreateOrUpdateAgent(span, updatedOptions, assistantId),\n traceEndCreateOrUpdateAgent,\n );\n return ConvertFromWire.convertAgentOutput(response);\n}\n\n/** Deletes an agent. */\nexport async function deleteAgent(\n context: Client,\n assistantId: string,\n options: DeleteAgentOptionalParams = {},\n): Promise<AgentDeletionStatusOutput> {\n const deleteAgentOptions: GeneratedParameters.DeleteAgentParameters = {\n ...operationOptionsToRequestParameters(options),\n };\n\n validateAssistantId(assistantId);\n const response = await TracingUtility.withSpan(\n \"DeleteAgent\",\n deleteAgentOptions,\n async (updateOptions) => {\n const result = await context\n .path(\"/assistants/{assistantId}\", assistantId)\n .delete(updateOptions);\n if (!expectedStatuses.includes(result.status)) {\n throw createOpenAIError(result);\n }\n return result.body;\n },\n traceStartAgentGeneric,\n traceEndAgentGeneric,\n );\n return ConvertFromWire.convertAgentDeletionStatusOutput(response);\n}\n\nfunction validateCreateAgentParameters(\n options: GeneratedParameters.CreateAgentParameters | GeneratedParameters.UpdateAgentParameters,\n): void {\n if (options.body.tools) {\n if (options.body.tools.some((value) => !Object.values(Tools).includes(value.type 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 if (options.body.tool_resources) {\n if (options.body.tool_resources.code_interpreter) {\n if (\n options.body.tool_resources.code_interpreter.file_ids &&\n options.body.tool_resources.code_interpreter.data_sources\n ) {\n throw new Error(\"Only file_ids or data_sources can be provided, not both\");\n }\n if (\n options.body.tool_resources.code_interpreter.file_ids &&\n options.body.tool_resources.code_interpreter.file_ids.length > 20\n ) {\n throw new Error(\"A maximum of 20 file IDs are allowed\");\n }\n if (options.body.tool_resources.code_interpreter.data_sources) {\n validateVectorStoreDataType(options.body.tool_resources.code_interpreter.data_sources);\n }\n }\n if (options.body.tool_resources.file_search) {\n if (\n options.body.tool_resources.file_search.vector_store_ids &&\n options.body.tool_resources.file_search.vector_store_ids.length > 1\n ) {\n throw new Error(\"Only one vector store ID is allowed\");\n }\n if (options.body.tool_resources.file_search.vector_stores) {\n if (options.body.tool_resources.file_search.vector_stores.length > 1) {\n throw new Error(\"Only one vector store is allowed\");\n }\n validateVectorStoreDataType(\n options.body.tool_resources.file_search.vector_stores[0]?.configuration.data_sources,\n );\n }\n }\n if (options.body.tool_resources.azure_ai_search) {\n if (\n options.body.tool_resources.azure_ai_search.indexes &&\n options.body.tool_resources.azure_ai_search.indexes.length > 1\n ) {\n throw new Error(\"Only one index is allowed\");\n }\n }\n }\n if (options.body.temperature && (options.body.temperature < 0 || options.body.temperature > 2)) {\n throw new Error(\"Temperature must be between 0 and 2\");\n }\n if (options.body.metadata) {\n validateMetadata(options.body.metadata);\n }\n}\n\nfunction validateListAgentsParameters(options?: GeneratedParameters.ListAgentsParameters): void {\n if (options?.queryParameters?.limit) {\n validateLimit(options.queryParameters.limit);\n }\n if (options?.queryParameters?.order) {\n validateOrder(options.queryParameters.order);\n }\n}\n\nfunction validateAssistantId(assistantId: string): void {\n if (!assistantId) {\n throw new Error(\"Assistant ID is required\");\n }\n}\n\nfunction validateUpdateAgentParameters(\n assistantId: string,\n options?: GeneratedParameters.UpdateAgentParameters,\n): void {\n validateAssistantId(assistantId);\n if (options) {\n validateCreateAgentParameters(options);\n }\n}\n"]}
@@ -2,7 +2,7 @@ import type { OperationOptions, RequestParameters } from "@azure-rest/core-clien
2
2
  import type { ThreadRunOutput } from "../customization/outputModels.js";
3
3
  import type { AgentEventMessageStream } from "./streamingModels.js";
4
4
  import type { AgentThreadCreationOptions, CreateAgentOptions, CreateAndRunThreadOptions, CreateRunOptions, UpdateAgentOptions, UpdateAgentThreadOptions, VectorStoreFileStatusFilter, VectorStoreOptions, VectorStoreUpdateOptions } from "../customization/models.js";
5
- import type { ListMessagesQueryParamProperties, ListFilesQueryParamProperties } from "../customization/parameters.js";
5
+ import type { ListMessagesQueryParamProperties, ListFilesQueryParamProperties, ListThreadsQueryParamProperties } from "../customization/parameters.js";
6
6
  import type { CreateVectorStoreFileBatchOptions, CreateVectorStoreFileOptions } from "./vectorStoresModels.js";
7
7
  /**
8
8
  * Optional request parameters support passing headers, abort signal, etc.
@@ -114,6 +114,11 @@ export interface UpdateAgentThreadOptionalParams extends UpdateAgentThreadOption
114
114
  */
115
115
  export interface DeleteAgentThreadOptionalParams extends OperationOptions {
116
116
  }
117
+ /**
118
+ * Optional parameters for deleting an agent thread.
119
+ */
120
+ export interface ListAgentThreadOptionalParams extends ListThreadsQueryParamProperties, OperationOptions {
121
+ }
117
122
  /**
118
123
  * Optional parameters for getting an run step.
119
124
  */
@@ -1 +1 @@
1
- {"version":3,"file":"customModels.d.ts","sourceRoot":"","sources":["../../../src/agents/customModels.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,iCAAiC,EACjC,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAA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,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB,EAAE,oBAAoB;IACtF,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"customModels.d.ts","sourceRoot":"","sources":["../../../src/agents/customModels.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,iCAAiC,EACjC,4BAA4B,EAC7B,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,iBAAiB,EACjB,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,gBAAgB,CACzD,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,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qCAAsC,SAAQ,gBAAgB;CAAG;AAElF;;GAEG;AACH,MAAM,WAAW,wCAAyC,SAAQ,gBAAgB;CAAG;AAErF;;GAEG;AACH,MAAM,WAAW,wCACf,SAAQ,iCAAiC,EACvC,gBAAgB,EAChB,oBAAoB;CAAG;AAE3B;;GAEG;AACH,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,EACvC,gBAAgB;CAAG;AAEvB;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB,EAAE,gBAAgB;CAAG;AAE1F;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;CAAG;AAEtE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;CAAG;AAEnE;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB,EAAE,gBAAgB;CAAG;AAE1F;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,6BAA6B,EAAE,gBAAgB;CAAG;AAEnG;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;CAAG;AAErE;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;CAAG;AAElE;;GAEG;AACH,MAAM,WAAW,4BAA6B,SAAQ,gBAAgB;CAAG;AAEzE;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB,EAAE,oBAAoB;IACtF,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"customModels.js","sourceRoot":"","sources":["../../../src/agents/customModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions, RequestParameters } from \"@azure-rest/core-client\";\nimport type { ThreadRunOutput } from \"../customization/outputModels.js\";\nimport type { AgentEventMessageStream } from \"./streamingModels.js\";\nimport type {\n AgentThreadCreationOptions,\n CreateAgentOptions,\n CreateAndRunThreadOptions,\n CreateRunOptions,\n UpdateAgentOptions,\n UpdateAgentThreadOptions,\n VectorStoreFileStatusFilter,\n VectorStoreOptions,\n VectorStoreUpdateOptions,\n} from \"../customization/models.js\";\nimport type {\n ListMessagesQueryParamProperties,\n ListFilesQueryParamProperties,\n} from \"../customization/parameters.js\";\nimport type {\n CreateVectorStoreFileBatchOptions,\n CreateVectorStoreFileOptions,\n} from \"./vectorStoresModels.js\";\n\n/**\n * Optional request parameters support passing headers, abort signal, etc.\n */\nexport type OptionalRequestParameters = Pick<\n RequestParameters,\n \"headers\" | \"timeout\" | \"abortSignal\" | \"tracingOptions\"\n>;\n\n/**\n * Request options for list requests.\n */\nexport interface ListQueryParameters {\n /**\n * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n */\n limit?: number;\n\n /**\n * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.\n */\n order?: \"asc\" | \"desc\";\n\n /**\n * A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n */\n after?: string;\n\n /**\n * A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n */\n before?: string;\n}\n\n/**\n * Options for configuring polling behavior.\n */\nexport interface PollingOptions {\n /**\n * The interval, in milliseconds, to wait between polling attempts. If not specified, a default interval of 1000ms will be used.\n */\n sleepIntervalInMs?: number;\n}\n\n/**\n * Optional parameters configuring polling behavior.\n */\nexport interface PollingOptionsParams {\n /** Options for configuring polling behavior. */\n pollingOptions?: PollingOptions;\n}\n\n/**\n * Agent run response with support to stream.\n */\nexport type AgentRunResponse = PromiseLike<ThreadRunOutput> & {\n /**\n * Function to start streaming the agent event messages.\n * @returns A promise that resolves to an AgentEventMessageStream.\n */\n stream: () => Promise<AgentEventMessageStream>;\n};\n\n/**\n * Optional parameters for creating and running a thread, excluding the assistantId.\n */\nexport type CreateRunOptionalParams = Omit<CreateRunOptions & OperationOptions, \"assistantId\"> &\n OperationOptions;\n\n/**\n * Optional parameters for creating and running a thread, excluding the assistantId.\n */\nexport type CreateAndRunThreadOptionalParams = Omit<CreateAndRunThreadOptions, \"assistantId\"> &\n OperationOptions;\n\n/**\n * Optional parameters for listing run queries.\n */\nexport interface ListRunQueryOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for getting a run.\n */\nexport interface GetRunOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for canceling a run.\n */\nexport interface CancelRunOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for submitting tool outputs to a run.\n */\nexport interface SubmitToolOutputsToRunOptionalParams extends OperationOptions {\n /**\n * Whether to stream the tool outputs.\n */\n stream?: boolean;\n}\n\n/**\n * Optional parameters for updating a run.\n */\nexport interface UpdateRunOptionalParams extends OperationOptions {\n /** Metadata to update in the run. */\n metadata?: Record<string, string> | null;\n}\n\n/**\n * Optional parameters for creating an agent thread.\n */\nexport interface CreateAgentThreadOptionalParams\n extends AgentThreadCreationOptions,\n OperationOptions {}\n\n/**\n * Optional parameters for getting an agent thread.\n */\nexport interface GetAgentThreadOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for updating an agent thread.\n */\nexport interface UpdateAgentThreadOptionalParams\n extends UpdateAgentThreadOptions,\n OperationOptions {}\n\n/**\n * Optional parameters for deleting an agent thread.\n */\nexport interface DeleteAgentThreadOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting an run step.\n */\nexport interface GetRunStepOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing run steps.\n */\nexport interface ListRunStepsOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for creating a message.\n */\nexport interface CreateMessageOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for updating a message.\n */\nexport interface UpdateMessageOptionalParams extends OperationOptions {\n /** Metadata to update in the message. */\n metadata?: Record<string, string> | null;\n}\n\n/**\n * Optional parameters for listing messages.\n */\nexport interface ListMessagesOptionalParams\n extends ListMessagesQueryParamProperties,\n OperationOptions {}\n\n/**\n * Optional parameters creating vector store.\n */\nexport interface CreateVectorStoreOptionalParams\n extends VectorStoreOptions,\n OperationOptions,\n PollingOptionsParams {}\n\n/**\n * Optional parameters for listing vector stores.\n */\nexport interface ListVectorStoresOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for updating a vector store.\n */\nexport interface UpdateVectorStoreOptionalParams\n extends VectorStoreUpdateOptions,\n OperationOptions {}\n\n/**\n * Optional parameters for deleting a vector store.\n */\nexport interface DeleteVectorStoreOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting a vector store.\n */\nexport interface GetVectorStoreOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing vector store files.\n */\nexport interface ListVectorStoreFilesOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for creating a vector store file.\n */\nexport interface CreateVectorStoreFileOptionalParams\n extends CreateVectorStoreFileOptions,\n OperationOptions,\n PollingOptionsParams {}\n\n/**\n * Optional parameters for getting a vector store file.\n */\nexport interface GetVectorStoreFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for deleting a vector store file.\n */\nexport interface DeleteVectorStoreFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing vector store file batches.\n */\nexport interface ListVectorStoreFileBatchFilesOptionalParams\n extends ListQueryParameters,\n OperationOptions {\n /** Filter by file status. */\n filter?: VectorStoreFileStatusFilter;\n}\n\n/**\n * Optional parameters for getting a vector store file batch.\n */\nexport interface GetVectorStoreFileBatchOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for canceling a vector store file batch.\n */\nexport interface CancelVectorStoreFileBatchOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for creating a vector store file batch.\n */\nexport interface CreateVectorStoreFileBatchOptionalParams\n extends CreateVectorStoreFileBatchOptions,\n OperationOptions,\n PollingOptionsParams {}\n\n/**\n * Optional parameters for creating agent.\n */\nexport interface CreateAgentOptionalParams\n extends Omit<CreateAgentOptions, \"model\">,\n OperationOptions {}\n\n/**\n * Optional parameters for updating agent.\n */\nexport interface UpdateAgentOptionalParams extends UpdateAgentOptions, OperationOptions {}\n\n/**\n * Optional parameters for deleting agent.\n */\nexport interface DeleteAgentOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting agent.\n */\nexport interface GetAgentOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing agents.\n */\nexport interface ListAgentsOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for listing files.\n */\nexport interface ListFilesOptionalParams extends ListFilesQueryParamProperties, OperationOptions {}\n\n/**\n * Optional parameters for deleting a file.\n */\nexport interface DeleteFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting a file.\n */\nexport interface GetFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting file content.\n */\nexport interface GetFileContentOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for uploading a file.\n */\nexport interface UploadFileOptionalParams extends OperationOptions, PollingOptionsParams {\n /** The name of the file. */\n fileName?: string;\n}\n"]}
1
+ {"version":3,"file":"customModels.js","sourceRoot":"","sources":["../../../src/agents/customModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationOptions, RequestParameters } from \"@azure-rest/core-client\";\nimport type { ThreadRunOutput } from \"../customization/outputModels.js\";\nimport type { AgentEventMessageStream } from \"./streamingModels.js\";\nimport type {\n AgentThreadCreationOptions,\n CreateAgentOptions,\n CreateAndRunThreadOptions,\n CreateRunOptions,\n UpdateAgentOptions,\n UpdateAgentThreadOptions,\n VectorStoreFileStatusFilter,\n VectorStoreOptions,\n VectorStoreUpdateOptions,\n} from \"../customization/models.js\";\nimport type {\n ListMessagesQueryParamProperties,\n ListFilesQueryParamProperties,\n ListThreadsQueryParamProperties,\n} from \"../customization/parameters.js\";\nimport type {\n CreateVectorStoreFileBatchOptions,\n CreateVectorStoreFileOptions,\n} from \"./vectorStoresModels.js\";\n\n/**\n * Optional request parameters support passing headers, abort signal, etc.\n */\nexport type OptionalRequestParameters = Pick<\n RequestParameters,\n \"headers\" | \"timeout\" | \"abortSignal\" | \"tracingOptions\"\n>;\n\n/**\n * Request options for list requests.\n */\nexport interface ListQueryParameters {\n /**\n * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n */\n limit?: number;\n\n /**\n * Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.\n */\n order?: \"asc\" | \"desc\";\n\n /**\n * A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n */\n after?: string;\n\n /**\n * A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n */\n before?: string;\n}\n\n/**\n * Options for configuring polling behavior.\n */\nexport interface PollingOptions {\n /**\n * The interval, in milliseconds, to wait between polling attempts. If not specified, a default interval of 1000ms will be used.\n */\n sleepIntervalInMs?: number;\n}\n\n/**\n * Optional parameters configuring polling behavior.\n */\nexport interface PollingOptionsParams {\n /** Options for configuring polling behavior. */\n pollingOptions?: PollingOptions;\n}\n\n/**\n * Agent run response with support to stream.\n */\nexport type AgentRunResponse = PromiseLike<ThreadRunOutput> & {\n /**\n * Function to start streaming the agent event messages.\n * @returns A promise that resolves to an AgentEventMessageStream.\n */\n stream: () => Promise<AgentEventMessageStream>;\n};\n\n/**\n * Optional parameters for creating and running a thread, excluding the assistantId.\n */\nexport type CreateRunOptionalParams = Omit<CreateRunOptions & OperationOptions, \"assistantId\"> &\n OperationOptions;\n\n/**\n * Optional parameters for creating and running a thread, excluding the assistantId.\n */\nexport type CreateAndRunThreadOptionalParams = Omit<CreateAndRunThreadOptions, \"assistantId\"> &\n OperationOptions;\n\n/**\n * Optional parameters for listing run queries.\n */\nexport interface ListRunQueryOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for getting a run.\n */\nexport interface GetRunOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for canceling a run.\n */\nexport interface CancelRunOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for submitting tool outputs to a run.\n */\nexport interface SubmitToolOutputsToRunOptionalParams extends OperationOptions {\n /**\n * Whether to stream the tool outputs.\n */\n stream?: boolean;\n}\n\n/**\n * Optional parameters for updating a run.\n */\nexport interface UpdateRunOptionalParams extends OperationOptions {\n /** Metadata to update in the run. */\n metadata?: Record<string, string> | null;\n}\n\n/**\n * Optional parameters for creating an agent thread.\n */\nexport interface CreateAgentThreadOptionalParams\n extends AgentThreadCreationOptions,\n OperationOptions {}\n\n/**\n * Optional parameters for getting an agent thread.\n */\nexport interface GetAgentThreadOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for updating an agent thread.\n */\nexport interface UpdateAgentThreadOptionalParams\n extends UpdateAgentThreadOptions,\n OperationOptions {}\n\n/**\n * Optional parameters for deleting an agent thread.\n */\nexport interface DeleteAgentThreadOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for deleting an agent thread.\n */\nexport interface ListAgentThreadOptionalParams\n extends ListThreadsQueryParamProperties,\n OperationOptions {}\n/**\n * Optional parameters for getting an run step.\n */\nexport interface GetRunStepOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing run steps.\n */\nexport interface ListRunStepsOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for creating a message.\n */\nexport interface CreateMessageOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for updating a message.\n */\nexport interface UpdateMessageOptionalParams extends OperationOptions {\n /** Metadata to update in the message. */\n metadata?: Record<string, string> | null;\n}\n\n/**\n * Optional parameters for listing messages.\n */\nexport interface ListMessagesOptionalParams\n extends ListMessagesQueryParamProperties,\n OperationOptions {}\n\n/**\n * Optional parameters creating vector store.\n */\nexport interface CreateVectorStoreOptionalParams\n extends VectorStoreOptions,\n OperationOptions,\n PollingOptionsParams {}\n\n/**\n * Optional parameters for listing vector stores.\n */\nexport interface ListVectorStoresOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for updating a vector store.\n */\nexport interface UpdateVectorStoreOptionalParams\n extends VectorStoreUpdateOptions,\n OperationOptions {}\n\n/**\n * Optional parameters for deleting a vector store.\n */\nexport interface DeleteVectorStoreOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting a vector store.\n */\nexport interface GetVectorStoreOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing vector store files.\n */\nexport interface ListVectorStoreFilesOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for creating a vector store file.\n */\nexport interface CreateVectorStoreFileOptionalParams\n extends CreateVectorStoreFileOptions,\n OperationOptions,\n PollingOptionsParams {}\n\n/**\n * Optional parameters for getting a vector store file.\n */\nexport interface GetVectorStoreFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for deleting a vector store file.\n */\nexport interface DeleteVectorStoreFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing vector store file batches.\n */\nexport interface ListVectorStoreFileBatchFilesOptionalParams\n extends ListQueryParameters,\n OperationOptions {\n /** Filter by file status. */\n filter?: VectorStoreFileStatusFilter;\n}\n\n/**\n * Optional parameters for getting a vector store file batch.\n */\nexport interface GetVectorStoreFileBatchOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for canceling a vector store file batch.\n */\nexport interface CancelVectorStoreFileBatchOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for creating a vector store file batch.\n */\nexport interface CreateVectorStoreFileBatchOptionalParams\n extends CreateVectorStoreFileBatchOptions,\n OperationOptions,\n PollingOptionsParams {}\n\n/**\n * Optional parameters for creating agent.\n */\nexport interface CreateAgentOptionalParams\n extends Omit<CreateAgentOptions, \"model\">,\n OperationOptions {}\n\n/**\n * Optional parameters for updating agent.\n */\nexport interface UpdateAgentOptionalParams extends UpdateAgentOptions, OperationOptions {}\n\n/**\n * Optional parameters for deleting agent.\n */\nexport interface DeleteAgentOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting agent.\n */\nexport interface GetAgentOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for listing agents.\n */\nexport interface ListAgentsOptionalParams extends ListQueryParameters, OperationOptions {}\n\n/**\n * Optional parameters for listing files.\n */\nexport interface ListFilesOptionalParams extends ListFilesQueryParamProperties, OperationOptions {}\n\n/**\n * Optional parameters for deleting a file.\n */\nexport interface DeleteFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting a file.\n */\nexport interface GetFileOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for getting file content.\n */\nexport interface GetFileContentOptionalParams extends OperationOptions {}\n\n/**\n * Optional parameters for uploading a file.\n */\nexport interface UploadFileOptionalParams extends OperationOptions, PollingOptionsParams {\n /** The name of the file. */\n fileName?: string;\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  import { type Client, type StreamableMethod } from "@azure-rest/core-client";
2
2
  import type { FileDeletionStatusOutput, FileListResponseOutput, OpenAIFileOutput } from "../customization/outputModels.js";
3
- import type { OpenAIPageableListOfThreadRunOutput, ThreadRunOutput, AgentThreadOutput, RunStepOutput, OpenAIPageableListOfRunStepOutput, ThreadMessageOutput, ThreadDeletionStatusOutput, OpenAIPageableListOfThreadMessageOutput, OpenAIPageableListOfVectorStoreOutput, VectorStoreOutput, VectorStoreFileOutput, VectorStoreDeletionStatusOutput, VectorStoreFileDeletionStatusOutput, VectorStoreFileBatchOutput, OpenAIPageableListOfVectorStoreFileOutput, AgentDeletionStatusOutput, AgentOutput, OpenAIPageableListOfAgentOutput } from "../customization/outputModels.js";
3
+ import type { OpenAIPageableListOfThreadRunOutput, ThreadRunOutput, AgentThreadOutput, RunStepOutput, OpenAIPageableListOfRunStepOutput, ThreadMessageOutput, ThreadDeletionStatusOutput, OpenAIPageableListOfThreadMessageOutput, OpenAIPageableListOfVectorStoreOutput, VectorStoreOutput, VectorStoreFileOutput, VectorStoreDeletionStatusOutput, VectorStoreFileDeletionStatusOutput, VectorStoreFileBatchOutput, OpenAIPageableListOfVectorStoreFileOutput, AgentDeletionStatusOutput, AgentOutput, OpenAIPageableListOfAgentOutput, OpenAIPageableListOfAgentThreadOutput } from "../customization/outputModels.js";
4
4
  import type { FilePurpose } from "../customization/models.js";
5
- import type { AgentRunResponse, CreateRunOptionalParams, GetRunOptionalParams, CancelRunOptionalParams, SubmitToolOutputsToRunOptionalParams, UpdateRunOptionalParams, ListRunQueryOptionalParams, CreateAndRunThreadOptionalParams, CreateAgentThreadOptionalParams, GetAgentThreadOptionalParams, UpdateAgentThreadOptionalParams, DeleteAgentThreadOptionalParams, GetRunStepOptionalParams, CreateMessageOptionalParams, ListMessagesOptionalParams, UpdateMessageOptionalParams, UpdateVectorStoreOptionalParams, DeleteVectorStoreOptionalParams, CreateVectorStoreOptionalParams, CreateVectorStoreFileOptionalParams, ListVectorStoreFilesOptionalParams, GetVectorStoreFileOptionalParams, DeleteVectorStoreFileOptionalParams, CreateVectorStoreFileBatchOptionalParams, GetVectorStoreFileBatchOptionalParams, ListVectorStoreFileBatchFilesOptionalParams, CreateAgentOptionalParams, ListAgentsOptionalParams, GetAgentOptionalParams, UpdateAgentOptionalParams, DeleteFileOptionalParams, GetFileOptionalParams, GetFileContentOptionalParams, ListFilesOptionalParams, UploadFileOptionalParams, CancelVectorStoreFileBatchOptionalParams, DeleteAgentOptionalParams } from "./customModels.js";
5
+ import type { AgentRunResponse, CreateRunOptionalParams, GetRunOptionalParams, CancelRunOptionalParams, SubmitToolOutputsToRunOptionalParams, UpdateRunOptionalParams, ListRunQueryOptionalParams, CreateAndRunThreadOptionalParams, CreateAgentThreadOptionalParams, GetAgentThreadOptionalParams, UpdateAgentThreadOptionalParams, DeleteAgentThreadOptionalParams, GetRunStepOptionalParams, CreateMessageOptionalParams, ListMessagesOptionalParams, UpdateMessageOptionalParams, UpdateVectorStoreOptionalParams, DeleteVectorStoreOptionalParams, CreateVectorStoreOptionalParams, CreateVectorStoreFileOptionalParams, ListVectorStoreFilesOptionalParams, GetVectorStoreFileOptionalParams, DeleteVectorStoreFileOptionalParams, CreateVectorStoreFileBatchOptionalParams, GetVectorStoreFileBatchOptionalParams, ListVectorStoreFileBatchFilesOptionalParams, CreateAgentOptionalParams, ListAgentsOptionalParams, GetAgentOptionalParams, UpdateAgentOptionalParams, DeleteFileOptionalParams, GetFileOptionalParams, GetFileContentOptionalParams, ListFilesOptionalParams, UploadFileOptionalParams, CancelVectorStoreFileBatchOptionalParams, DeleteAgentOptionalParams, ListAgentThreadOptionalParams } from "./customModels.js";
6
6
  import type { ThreadMessageOptions, ToolOutput } from "../customization/models.js";
7
7
  import type { PollerLike, OperationState } from "@azure/core-lro";
8
8
  /**
@@ -27,6 +27,8 @@ export interface AgentsOperations {
27
27
  updateThread: (threadId: string, options?: UpdateAgentThreadOptionalParams) => Promise<AgentThreadOutput>;
28
28
  /** Deletes an existing thread. */
29
29
  deleteThread: (threadId: string, options?: DeleteAgentThreadOptionalParams) => Promise<ThreadDeletionStatusOutput>;
30
+ /** Gets a list of threads that were previously created. */
31
+ listThreads: (options?: ListAgentThreadOptionalParams) => Promise<OpenAIPageableListOfAgentThreadOutput>;
30
32
  /** Creates and starts a new run of the specified thread using the specified agent. */
31
33
  createRun: (threadId: string, assistantId: string, options?: CreateRunOptionalParams) => AgentRunResponse;
32
34
  /** Gets a list of runs for a specified thread. */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,g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ID,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,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,qCAAqC,EACtC,MAAM,kCAAkC,CAAC;AAqB1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAwB9D,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,oCAAoC,EACpC,uBAAuB,EACvB,0BAA0B,EAC1B,gCAAgC,EAChC,+BAA+B,EAC/B,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EAExB,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAG3B,+BAA+B,EAC/B,+BAA+B,EAC/B,+BAA+B,EAC/B,mCAAmC,EACnC,kCAAkC,EAClC,gCAAgC,EAChC,mCAAmC,EACnC,wCAAwC,EACxC,qCAAqC,EACrC,2CAA2C,EAC3C,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,wBAAwB,EACxB,wCAAwC,EAC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,UAAU,EAAE,CACV,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,wBAAwB,KAC/B,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5B,kDAAkD;IAClD,YAAY,EAAE,CACZ,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,0BAA0B,KACjC,OAAO,CAAC,iCAAiC,CAAC,CAAC;CACjD;AAwID,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAIrE"}
@@ -2,7 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { createAgent, deleteAgent, getAgent, listAgents, updateAgent } from "./assistants.js";
4
4
  import { deleteFile, getFile, getFileContent, listFiles, uploadFile, uploadFileAndPoll, } from "./files.js";
5
- import { createThread, deleteThread, getThread, updateThread } from "./threads.js";
5
+ import { createThread, deleteThread, getThread, listThreads, updateThread } from "./threads.js";
6
6
  import { cancelRun, createRun, createThreadAndRun, getRun, listRuns, submitToolOutputsToRun, updateRun, } from "./runs.js";
7
7
  import { createMessage, listMessages, updateMessage } from "./messages.js";
8
8
  import { createVectorStore, createVectorStoreAndPoll, deleteVectorStore, getVectorStore, listVectorStores, modifyVectorStore, } from "./vectorStores.js";
@@ -20,6 +20,7 @@ function getAgents(context) {
20
20
  getThread: (threadId, options) => getThread(context, threadId, options),
21
21
  updateThread: (threadId, options) => updateThread(context, threadId, options),
22
22
  deleteThread: (threadId, options) => deleteThread(context, threadId, options),
23
+ listThreads: (options) => listThreads(context, options),
23
24
  createRun: (threadId, assistantId, options) => createRun(context, threadId, assistantId, options !== null && options !== void 0 ? options : {}),
24
25
  listRuns: (threadId, options) => listRuns(context, threadId, options !== null && options !== void 0 ? options : {}),
25
26
  getRun: (threadId, runId, options) => getRun(context, threadId, runId, options),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ag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AAE,CAAC,QAAgB,EAAE,KAAa,EAAE,OAAoC,EAAE,EAAE,CACtF,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,CAAC;KAClD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAe;IACjD,yBACK,SAAS,CAAC,OAAO,CAAC,EACrB;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { type Client, type StreamableMethod } from \"@azure-rest/core-client\";\nimport type {\n FileDeletionStatusOutput,\n FileListResponseOutput,\n OpenAIFileOutput,\n} from \"../customization/outputModels.js\";\nimport 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} from \"../customization/outputModels.js\";\nimport { createAgent, deleteAgent, getAgent, listAgents, updateAgent } from \"./assistants.js\";\nimport {\n deleteFile,\n getFile,\n getFileContent,\n listFiles,\n uploadFile,\n uploadFileAndPoll,\n} from \"./files.js\";\nimport { createThread, deleteThread, getThread, updateThread } from \"./threads.js\";\nimport {\n cancelRun,\n createRun,\n createThreadAndRun,\n getRun,\n listRuns,\n submitToolOutputsToRun,\n updateRun,\n} from \"./runs.js\";\nimport { createMessage, listMessages, updateMessage } from \"./messages.js\";\nimport type { FilePurpose } from \"../customization/models.js\";\nimport {\n createVectorStore,\n createVectorStoreAndPoll,\n deleteVectorStore,\n getVectorStore,\n listVectorStores,\n modifyVectorStore,\n} from \"./vectorStores.js\";\nimport { getRunStep, listRunSteps } from \"./runSteps.js\";\nimport {\n createVectorStoreFile,\n createVectorStoreFileAndPoll,\n deleteVectorStoreFile,\n getVectorStoreFile,\n listVectorStoreFiles,\n} from \"./vectorStoresFiles.js\";\nimport {\n cancelVectorStoreFileBatch,\n createVectorStoreFileBatch,\n createVectorStoreFileBatchAndPoll,\n getVectorStoreFileBatch,\n listVectorStoreFileBatchFiles,\n} from \"./vectorStoresFileBatches.js\";\nimport 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 CancelVectorStoreFileBatchOptionalParams,\n DeleteAgentOptionalParams,\n} from \"./customModels.js\";\nimport type { ThreadMessageOptions, ToolOutput } from \"../customization/models.js\";\nimport type { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/**\n * Agents Interface Contains operations for creating, listing, updating, and deleting agents, threads, runs, messages, and files.\n */\nexport interface AgentsOperations {\n /** Creates a new agent. */\n createAgent: (model: string, options?: CreateAgentOptionalParams) => Promise<AgentOutput>;\n\n /** Gets a list of agents that were previously created. */\n listAgents: (options?: ListAgentsOptionalParams) => Promise<OpenAIPageableListOfAgentOutput>;\n /** Retrieves an existing agent. */\n getAgent: (assistantId: string, options?: GetAgentOptionalParams) => Promise<AgentOutput>;\n /** Modifies an existing agent. */\n updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) => Promise<AgentOutput>;\n /** Deletes an agent. */\n deleteAgent: (\n assistantId: string,\n options?: DeleteAgentOptionalParams,\n ) => Promise<AgentDeletionStatusOutput>;\n\n /** Creates a new thread. Threads contain messages and can be run by agents. */\n createThread: (options?: CreateAgentThreadOptionalParams) => Promise<AgentThreadOutput>;\n /** Gets information about an existing thread. */\n getThread: (\n threadId: string,\n options?: GetAgentThreadOptionalParams,\n ) => Promise<AgentThreadOutput>;\n /** Modifies an existing thread. */\n updateThread: (\n threadId: string,\n options?: UpdateAgentThreadOptionalParams,\n ) => Promise<AgentThreadOutput>;\n /** Deletes an existing thread. */\n deleteThread: (\n threadId: string,\n options?: DeleteAgentThreadOptionalParams,\n ) => Promise<ThreadDeletionStatusOutput>;\n\n /** Creates and starts a new run of the specified thread using the specified agent. */\n createRun: (\n threadId: string,\n assistantId: string,\n options?: CreateRunOptionalParams,\n ) => AgentRunResponse;\n\n /** Gets a list of runs for a specified thread. */\n listRuns: (\n threadId: string,\n options?: ListRunQueryOptionalParams,\n ) => Promise<OpenAIPageableListOfThreadRunOutput>;\n /** Gets an existing run from an existing thread. */\n getRun: (\n threadId: string,\n runId: string,\n options?: GetRunOptionalParams,\n ) => Promise<ThreadRunOutput>;\n /** Modifies an existing thread run. */\n updateRun: (\n threadId: string,\n runId: string,\n options?: UpdateRunOptionalParams,\n ) => Promise<ThreadRunOutput>;\n /** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */\n submitToolOutputsToRun: (\n threadId: string,\n runId: string,\n toolOutputs: Array<ToolOutput>,\n options?: SubmitToolOutputsToRunOptionalParams,\n ) => AgentRunResponse;\n\n /** Cancels a run of an in progress thread. */\n cancelRun: (\n threadId: string,\n runId: string,\n options?: CancelRunOptionalParams,\n ) => Promise<ThreadRunOutput>;\n /** Creates a new thread and immediately starts a run of that thread. */\n createThreadAndRun: (\n assistantId: string,\n options?: CreateAndRunThreadOptionalParams,\n ) => AgentRunResponse;\n\n /** Creates a new message on a specified thread. */\n createMessage: (\n threadId: string,\n messageOptions: ThreadMessageOptions,\n options?: CreateMessageOptionalParams,\n ) => Promise<ThreadMessageOutput>;\n /** Gets a list of messages that exist on a thread. */\n listMessages: (\n threadId: string,\n options?: ListMessagesOptionalParams,\n ) => Promise<OpenAIPageableListOfThreadMessageOutput>;\n /** Modifies an existing message on an existing thread. */\n updateMessage: (\n threadId: string,\n messageId: string,\n options?: UpdateMessageOptionalParams,\n ) => Promise<ThreadMessageOutput>;\n\n /** Gets a list of previously uploaded files. */\n listFiles: (options?: ListFilesOptionalParams) => Promise<FileListResponseOutput>;\n /** Uploads a file for use by other operations. */\n uploadFile: (\n data: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => PollerLike<OperationState<OpenAIFileOutput>, OpenAIFileOutput>;\n\n /** Uploads a file for use by other operations. */\n uploadFileAndPoll: (\n data: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => PollerLike<OperationState<OpenAIFileOutput>, OpenAIFileOutput>;\n /** Delete a previously uploaded file. */\n deleteFile: (\n fileId: string,\n options?: DeleteFileOptionalParams,\n ) => Promise<FileDeletionStatusOutput>;\n /** Returns information about a specific file. Does not retrieve file content. */\n getFile: (fileId: string, options?: GetFileOptionalParams) => Promise<OpenAIFileOutput>;\n /** Returns the content of a specific file. */\n getFileContent: (\n fileId: string,\n options?: GetFileContentOptionalParams,\n ) => StreamableMethod<string | Uint8Array>;\n\n /** Returns a list of vector stores. */\n listVectorStores: (\n options?: DeleteVectorStoreOptionalParams,\n ) => Promise<OpenAIPageableListOfVectorStoreOutput>;\n /** Creates a vector store. */\n createVectorStore: (\n options?: CreateVectorStoreOptionalParams,\n ) => PollerLike<OperationState<VectorStoreOutput>, VectorStoreOutput>;\n /** Returns the vector store object object matching the specific ID. */\n getVectorStore: (\n vectorStoreId: string,\n options?: DeleteVectorStoreOptionalParams,\n ) => Promise<VectorStoreOutput>;\n /** The ID of the vector store to modify. */\n modifyVectorStore: (\n vectorStoreId: string,\n options?: UpdateVectorStoreOptionalParams,\n ) => Promise<VectorStoreOutput>;\n /** Deletes the vector store object matching the specified ID. */\n deleteVectorStore: (\n vectorStoreId: string,\n options?: DeleteVectorStoreOptionalParams,\n ) => Promise<VectorStoreDeletionStatusOutput>;\n\n /** Create vector store and poll. */\n createVectorStoreAndPoll: (\n options?: CreateVectorStoreOptionalParams,\n ) => PollerLike<OperationState<VectorStoreOutput>, VectorStoreOutput>;\n\n /** Create a vector store file by attching a file to a vector store. */\n createVectorStoreFile: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileOutput>, VectorStoreFileOutput>;\n /** Retrieves a vector store file. */\n getVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: GetVectorStoreFileOptionalParams,\n ) => Promise<VectorStoreFileOutput>;\n /** Returns a list of vector store files. */\n listVectorStoreFiles: (\n vectorStoreId: string,\n options?: ListVectorStoreFilesOptionalParams,\n ) => Promise<OpenAIPageableListOfVectorStoreFileOutput>;\n /**\n * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted.\n * To delete the file, use the delete file endpoint.\n */\n deleteVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: DeleteVectorStoreFileOptionalParams,\n ) => Promise<VectorStoreFileDeletionStatusOutput>;\n /** Create a vector store file by attaching a file to a vector store and poll. */\n createVectorStoreFileAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileOutput>, VectorStoreFileOutput>;\n\n /** Create a vector store file batch. */\n createVectorStoreFileBatch: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileBatchOutput>, VectorStoreFileBatchOutput>;\n /** Retrieve a vector store file batch. */\n getVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: GetVectorStoreFileBatchOptionalParams,\n ) => Promise<VectorStoreFileBatchOutput>;\n /** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */\n cancelVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: CancelVectorStoreFileBatchOptionalParams,\n ) => Promise<VectorStoreFileBatchOutput>;\n /** Returns a list of vector store files in a batch. */\n listVectorStoreFileBatchFiles: (\n vectorStoreId: string,\n batchId: string,\n options?: ListVectorStoreFileBatchFilesOptionalParams,\n ) => Promise<OpenAIPageableListOfVectorStoreFileOutput>;\n /** Create a vector store file batch and poll. */\n createVectorStoreFileBatchAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileBatchOutput>, VectorStoreFileBatchOutput>;\n\n /** Gets a single run step from a thread run. */\n getRunStep: (\n threadId: string,\n runId: string,\n stepId: string,\n options?: GetRunStepOptionalParams,\n ) => Promise<RunStepOutput>;\n /** Gets a list of run steps from a thread run. */\n listRunSteps: (\n threadId: string,\n runId: string,\n options?: ListRunQueryOptionalParams,\n ) => Promise<OpenAIPageableListOfRunStepOutput>;\n}\n\nfunction getAgents(context: Client): AgentsOperations {\n return {\n createAgent: (model: string, options?: CreateAgentOptionalParams) =>\n createAgent(context, model, options),\n listAgents: (options?: ListAgentsOptionalParams) => listAgents(context, options),\n getAgent: (assistantId: string, options?: GetAgentOptionalParams) =>\n getAgent(context, assistantId, options),\n updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) =>\n updateAgent(context, assistantId, options),\n deleteAgent: (assistantId: string, options?: DeleteAgentOptionalParams) =>\n deleteAgent(context, assistantId, options),\n\n createThread: (options?: CreateAgentThreadOptionalParams) => createThread(context, options),\n getThread: (threadId: string, options?: GetAgentThreadOptionalParams) =>\n getThread(context, threadId, options),\n updateThread: (threadId: string, options?: UpdateAgentThreadOptionalParams) =>\n updateThread(context, threadId, options),\n deleteThread: (threadId: string, options?: DeleteAgentThreadOptionalParams) =>\n deleteThread(context, threadId, options),\n\n createRun: (threadId: string, assistantId: string, options?: CreateRunOptionalParams) =>\n createRun(context, threadId, assistantId, options ?? {}),\n listRuns: (threadId: string, options?: ListRunQueryOptionalParams) =>\n listRuns(context, threadId, options ?? {}),\n getRun: (threadId: string, runId: string, options?: GetRunOptionalParams) =>\n getRun(context, threadId, runId, options),\n updateRun: (threadId: string, runId: string, options?: UpdateRunOptionalParams) =>\n updateRun(context, threadId, runId, options),\n submitToolOutputsToRun: (\n threadId: string,\n runId: string,\n toolOutputs: Array<ToolOutput>,\n options?: SubmitToolOutputsToRunOptionalParams,\n ) => submitToolOutputsToRun(context, threadId, runId, toolOutputs, options),\n cancelRun: (threadId: string, runId: string, options?: CancelRunOptionalParams) =>\n cancelRun(context, threadId, runId, options),\n createThreadAndRun: (assistantId: string, options?: CreateAndRunThreadOptionalParams) =>\n createThreadAndRun(context, assistantId, options ?? {}),\n\n createMessage: (\n threadId: string,\n messageOptions: ThreadMessageOptions,\n options?: CreateMessageOptionalParams,\n ) => createMessage(context, threadId, messageOptions, options),\n listMessages: (threadId: string, options?: ListMessagesOptionalParams) =>\n listMessages(context, threadId, options),\n updateMessage: (threadId: string, messageId: string, options?: UpdateMessageOptionalParams) =>\n updateMessage(context, threadId, messageId, options),\n\n listFiles: (options?: ListFilesOptionalParams) => listFiles(context, options),\n uploadFile: (\n content: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => uploadFile(context, content, purpose, options),\n uploadFileAndPoll: (\n content: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => uploadFileAndPoll(context, content, purpose, options),\n deleteFile: (fileId: string, options?: DeleteFileOptionalParams) =>\n deleteFile(context, fileId, options),\n getFile: (fileId: string, options?: GetFileOptionalParams) => getFile(context, fileId, options),\n getFileContent: (fileId: string, options?: GetFileContentOptionalParams) =>\n getFileContent(context, fileId, options),\n\n listVectorStores: (options?: ListVectorStoresOptionalParams) =>\n listVectorStores(context, options),\n createVectorStore: (options?: CreateVectorStoreOptionalParams) =>\n createVectorStore(context, options),\n getVectorStore: (vectorStoreId: string, options?: GetVectorStoreOptionalParams) =>\n getVectorStore(context, vectorStoreId, options),\n modifyVectorStore: (vectorStoreId: string, options?: UpdateVectorStoreOptionalParams) =>\n modifyVectorStore(context, vectorStoreId, options),\n deleteVectorStore: (vectorStoreId: string, options?: DeleteVectorStoreOptionalParams) =>\n deleteVectorStore(context, vectorStoreId, options),\n createVectorStoreAndPoll: (options?: CreateVectorStoreOptionalParams) =>\n createVectorStoreAndPoll(context, options),\n\n createVectorStoreFile: (vectorStoreId: string, options?: CreateVectorStoreFileOptionalParams) =>\n createVectorStoreFile(context, vectorStoreId, options),\n getVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: GetVectorStoreFileOptionalParams,\n ) => getVectorStoreFile(context, vectorStoreId, fileId, options),\n listVectorStoreFiles: (vectorStoreId: string, options?: ListVectorStoreFilesOptionalParams) =>\n listVectorStoreFiles(context, vectorStoreId, options),\n deleteVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: DeleteVectorStoreFileOptionalParams,\n ) => deleteVectorStoreFile(context, vectorStoreId, fileId, options),\n createVectorStoreFileAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileOptionalParams,\n ) => createVectorStoreFileAndPoll(context, vectorStoreId, options),\n\n createVectorStoreFileBatch: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => createVectorStoreFileBatch(context, vectorStoreId, options),\n getVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: GetVectorStoreFileBatchOptionalParams,\n ) => getVectorStoreFileBatch(context, vectorStoreId, batchId, options),\n cancelVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: CancelVectorStoreFileBatchOptionalParams,\n ) => cancelVectorStoreFileBatch(context, vectorStoreId, batchId, options),\n listVectorStoreFileBatchFiles: (\n vectorStoreId: string,\n batchId: string,\n options?: ListVectorStoreFileBatchFilesOptionalParams,\n ) => listVectorStoreFileBatchFiles(context, vectorStoreId, batchId, options),\n createVectorStoreFileBatchAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => createVectorStoreFileBatchAndPoll(context, vectorStoreId, options),\n\n getRunStep: (\n threadId: string,\n runId: string,\n stepId: string,\n options?: GetRunStepOptionalParams,\n ) => getRunStep(context, threadId, runId, stepId, options),\n listRunSteps: (threadId: string, runId: string, options?: ListRunStepsOptionalParams) =>\n listRunSteps(context, threadId, runId, options),\n };\n}\n\nexport function getAgentsOperations(context: Client): AgentsOperations {\n return {\n ...getAgents(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA6BlC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EACL,UAAU,EACV,OAAO,EACP,cAAc,EACd,SAAS,EACT,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAA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esContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { type Client, type StreamableMethod } from \"@azure-rest/core-client\";\nimport type {\n FileDeletionStatusOutput,\n FileListResponseOutput,\n OpenAIFileOutput,\n} from \"../customization/outputModels.js\";\nimport 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 OpenAIPageableListOfAgentThreadOutput,\n} from \"../customization/outputModels.js\";\nimport { createAgent, deleteAgent, getAgent, listAgents, updateAgent } from \"./assistants.js\";\nimport {\n deleteFile,\n getFile,\n getFileContent,\n listFiles,\n uploadFile,\n uploadFileAndPoll,\n} from \"./files.js\";\nimport { createThread, deleteThread, getThread, listThreads, updateThread } from \"./threads.js\";\nimport {\n cancelRun,\n createRun,\n createThreadAndRun,\n getRun,\n listRuns,\n submitToolOutputsToRun,\n updateRun,\n} from \"./runs.js\";\nimport { createMessage, listMessages, updateMessage } from \"./messages.js\";\nimport type { FilePurpose } from \"../customization/models.js\";\nimport {\n createVectorStore,\n createVectorStoreAndPoll,\n deleteVectorStore,\n getVectorStore,\n listVectorStores,\n modifyVectorStore,\n} from \"./vectorStores.js\";\nimport { getRunStep, listRunSteps } from \"./runSteps.js\";\nimport {\n createVectorStoreFile,\n createVectorStoreFileAndPoll,\n deleteVectorStoreFile,\n getVectorStoreFile,\n listVectorStoreFiles,\n} from \"./vectorStoresFiles.js\";\nimport {\n cancelVectorStoreFileBatch,\n createVectorStoreFileBatch,\n createVectorStoreFileBatchAndPoll,\n getVectorStoreFileBatch,\n listVectorStoreFileBatchFiles,\n} from \"./vectorStoresFileBatches.js\";\nimport 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 CancelVectorStoreFileBatchOptionalParams,\n DeleteAgentOptionalParams,\n ListAgentThreadOptionalParams,\n} from \"./customModels.js\";\nimport type { ThreadMessageOptions, ToolOutput } from \"../customization/models.js\";\nimport type { PollerLike, OperationState } from \"@azure/core-lro\";\n\n/**\n * Agents Interface Contains operations for creating, listing, updating, and deleting agents, threads, runs, messages, and files.\n */\nexport interface AgentsOperations {\n /** Creates a new agent. */\n createAgent: (model: string, options?: CreateAgentOptionalParams) => Promise<AgentOutput>;\n\n /** Gets a list of agents that were previously created. */\n listAgents: (options?: ListAgentsOptionalParams) => Promise<OpenAIPageableListOfAgentOutput>;\n /** Retrieves an existing agent. */\n getAgent: (assistantId: string, options?: GetAgentOptionalParams) => Promise<AgentOutput>;\n /** Modifies an existing agent. */\n updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) => Promise<AgentOutput>;\n /** Deletes an agent. */\n deleteAgent: (\n assistantId: string,\n options?: DeleteAgentOptionalParams,\n ) => Promise<AgentDeletionStatusOutput>;\n\n /** Creates a new thread. Threads contain messages and can be run by agents. */\n createThread: (options?: CreateAgentThreadOptionalParams) => Promise<AgentThreadOutput>;\n /** Gets information about an existing thread. */\n getThread: (\n threadId: string,\n options?: GetAgentThreadOptionalParams,\n ) => Promise<AgentThreadOutput>;\n /** Modifies an existing thread. */\n updateThread: (\n threadId: string,\n options?: UpdateAgentThreadOptionalParams,\n ) => Promise<AgentThreadOutput>;\n /** Deletes an existing thread. */\n deleteThread: (\n threadId: string,\n options?: DeleteAgentThreadOptionalParams,\n ) => Promise<ThreadDeletionStatusOutput>;\n /** Gets a list of threads that were previously created. */\n listThreads: (\n options?: ListAgentThreadOptionalParams,\n ) => Promise<OpenAIPageableListOfAgentThreadOutput>;\n\n /** Creates and starts a new run of the specified thread using the specified agent. */\n createRun: (\n threadId: string,\n assistantId: string,\n options?: CreateRunOptionalParams,\n ) => AgentRunResponse;\n\n /** Gets a list of runs for a specified thread. */\n listRuns: (\n threadId: string,\n options?: ListRunQueryOptionalParams,\n ) => Promise<OpenAIPageableListOfThreadRunOutput>;\n /** Gets an existing run from an existing thread. */\n getRun: (\n threadId: string,\n runId: string,\n options?: GetRunOptionalParams,\n ) => Promise<ThreadRunOutput>;\n /** Modifies an existing thread run. */\n updateRun: (\n threadId: string,\n runId: string,\n options?: UpdateRunOptionalParams,\n ) => Promise<ThreadRunOutput>;\n /** Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. */\n submitToolOutputsToRun: (\n threadId: string,\n runId: string,\n toolOutputs: Array<ToolOutput>,\n options?: SubmitToolOutputsToRunOptionalParams,\n ) => AgentRunResponse;\n\n /** Cancels a run of an in progress thread. */\n cancelRun: (\n threadId: string,\n runId: string,\n options?: CancelRunOptionalParams,\n ) => Promise<ThreadRunOutput>;\n /** Creates a new thread and immediately starts a run of that thread. */\n createThreadAndRun: (\n assistantId: string,\n options?: CreateAndRunThreadOptionalParams,\n ) => AgentRunResponse;\n\n /** Creates a new message on a specified thread. */\n createMessage: (\n threadId: string,\n messageOptions: ThreadMessageOptions,\n options?: CreateMessageOptionalParams,\n ) => Promise<ThreadMessageOutput>;\n /** Gets a list of messages that exist on a thread. */\n listMessages: (\n threadId: string,\n options?: ListMessagesOptionalParams,\n ) => Promise<OpenAIPageableListOfThreadMessageOutput>;\n /** Modifies an existing message on an existing thread. */\n updateMessage: (\n threadId: string,\n messageId: string,\n options?: UpdateMessageOptionalParams,\n ) => Promise<ThreadMessageOutput>;\n\n /** Gets a list of previously uploaded files. */\n listFiles: (options?: ListFilesOptionalParams) => Promise<FileListResponseOutput>;\n /** Uploads a file for use by other operations. */\n uploadFile: (\n data: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => PollerLike<OperationState<OpenAIFileOutput>, OpenAIFileOutput>;\n\n /** Uploads a file for use by other operations. */\n uploadFileAndPoll: (\n data: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => PollerLike<OperationState<OpenAIFileOutput>, OpenAIFileOutput>;\n /** Delete a previously uploaded file. */\n deleteFile: (\n fileId: string,\n options?: DeleteFileOptionalParams,\n ) => Promise<FileDeletionStatusOutput>;\n /** Returns information about a specific file. Does not retrieve file content. */\n getFile: (fileId: string, options?: GetFileOptionalParams) => Promise<OpenAIFileOutput>;\n /** Returns the content of a specific file. */\n getFileContent: (\n fileId: string,\n options?: GetFileContentOptionalParams,\n ) => StreamableMethod<string | Uint8Array>;\n\n /** Returns a list of vector stores. */\n listVectorStores: (\n options?: DeleteVectorStoreOptionalParams,\n ) => Promise<OpenAIPageableListOfVectorStoreOutput>;\n /** Creates a vector store. */\n createVectorStore: (\n options?: CreateVectorStoreOptionalParams,\n ) => PollerLike<OperationState<VectorStoreOutput>, VectorStoreOutput>;\n /** Returns the vector store object object matching the specific ID. */\n getVectorStore: (\n vectorStoreId: string,\n options?: DeleteVectorStoreOptionalParams,\n ) => Promise<VectorStoreOutput>;\n /** The ID of the vector store to modify. */\n modifyVectorStore: (\n vectorStoreId: string,\n options?: UpdateVectorStoreOptionalParams,\n ) => Promise<VectorStoreOutput>;\n /** Deletes the vector store object matching the specified ID. */\n deleteVectorStore: (\n vectorStoreId: string,\n options?: DeleteVectorStoreOptionalParams,\n ) => Promise<VectorStoreDeletionStatusOutput>;\n\n /** Create vector store and poll. */\n createVectorStoreAndPoll: (\n options?: CreateVectorStoreOptionalParams,\n ) => PollerLike<OperationState<VectorStoreOutput>, VectorStoreOutput>;\n\n /** Create a vector store file by attching a file to a vector store. */\n createVectorStoreFile: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileOutput>, VectorStoreFileOutput>;\n /** Retrieves a vector store file. */\n getVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: GetVectorStoreFileOptionalParams,\n ) => Promise<VectorStoreFileOutput>;\n /** Returns a list of vector store files. */\n listVectorStoreFiles: (\n vectorStoreId: string,\n options?: ListVectorStoreFilesOptionalParams,\n ) => Promise<OpenAIPageableListOfVectorStoreFileOutput>;\n /**\n * Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted.\n * To delete the file, use the delete file endpoint.\n */\n deleteVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: DeleteVectorStoreFileOptionalParams,\n ) => Promise<VectorStoreFileDeletionStatusOutput>;\n /** Create a vector store file by attaching a file to a vector store and poll. */\n createVectorStoreFileAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileOutput>, VectorStoreFileOutput>;\n\n /** Create a vector store file batch. */\n createVectorStoreFileBatch: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileBatchOutput>, VectorStoreFileBatchOutput>;\n /** Retrieve a vector store file batch. */\n getVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: GetVectorStoreFileBatchOptionalParams,\n ) => Promise<VectorStoreFileBatchOutput>;\n /** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */\n cancelVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: CancelVectorStoreFileBatchOptionalParams,\n ) => Promise<VectorStoreFileBatchOutput>;\n /** Returns a list of vector store files in a batch. */\n listVectorStoreFileBatchFiles: (\n vectorStoreId: string,\n batchId: string,\n options?: ListVectorStoreFileBatchFilesOptionalParams,\n ) => Promise<OpenAIPageableListOfVectorStoreFileOutput>;\n /** Create a vector store file batch and poll. */\n createVectorStoreFileBatchAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => PollerLike<OperationState<VectorStoreFileBatchOutput>, VectorStoreFileBatchOutput>;\n\n /** Gets a single run step from a thread run. */\n getRunStep: (\n threadId: string,\n runId: string,\n stepId: string,\n options?: GetRunStepOptionalParams,\n ) => Promise<RunStepOutput>;\n /** Gets a list of run steps from a thread run. */\n listRunSteps: (\n threadId: string,\n runId: string,\n options?: ListRunQueryOptionalParams,\n ) => Promise<OpenAIPageableListOfRunStepOutput>;\n}\n\nfunction getAgents(context: Client): AgentsOperations {\n return {\n createAgent: (model: string, options?: CreateAgentOptionalParams) =>\n createAgent(context, model, options),\n listAgents: (options?: ListAgentsOptionalParams) => listAgents(context, options),\n getAgent: (assistantId: string, options?: GetAgentOptionalParams) =>\n getAgent(context, assistantId, options),\n updateAgent: (assistantId: string, options: UpdateAgentOptionalParams) =>\n updateAgent(context, assistantId, options),\n deleteAgent: (assistantId: string, options?: DeleteAgentOptionalParams) =>\n deleteAgent(context, assistantId, options),\n\n createThread: (options?: CreateAgentThreadOptionalParams) => createThread(context, options),\n getThread: (threadId: string, options?: GetAgentThreadOptionalParams) =>\n getThread(context, threadId, options),\n updateThread: (threadId: string, options?: UpdateAgentThreadOptionalParams) =>\n updateThread(context, threadId, options),\n deleteThread: (threadId: string, options?: DeleteAgentThreadOptionalParams) =>\n deleteThread(context, threadId, options),\n listThreads: (options?: ListAgentThreadOptionalParams) => listThreads(context, options),\n\n createRun: (threadId: string, assistantId: string, options?: CreateRunOptionalParams) =>\n createRun(context, threadId, assistantId, options ?? {}),\n listRuns: (threadId: string, options?: ListRunQueryOptionalParams) =>\n listRuns(context, threadId, options ?? {}),\n getRun: (threadId: string, runId: string, options?: GetRunOptionalParams) =>\n getRun(context, threadId, runId, options),\n updateRun: (threadId: string, runId: string, options?: UpdateRunOptionalParams) =>\n updateRun(context, threadId, runId, options),\n submitToolOutputsToRun: (\n threadId: string,\n runId: string,\n toolOutputs: Array<ToolOutput>,\n options?: SubmitToolOutputsToRunOptionalParams,\n ) => submitToolOutputsToRun(context, threadId, runId, toolOutputs, options),\n cancelRun: (threadId: string, runId: string, options?: CancelRunOptionalParams) =>\n cancelRun(context, threadId, runId, options),\n createThreadAndRun: (assistantId: string, options?: CreateAndRunThreadOptionalParams) =>\n createThreadAndRun(context, assistantId, options ?? {}),\n\n createMessage: (\n threadId: string,\n messageOptions: ThreadMessageOptions,\n options?: CreateMessageOptionalParams,\n ) => createMessage(context, threadId, messageOptions, options),\n listMessages: (threadId: string, options?: ListMessagesOptionalParams) =>\n listMessages(context, threadId, options),\n updateMessage: (threadId: string, messageId: string, options?: UpdateMessageOptionalParams) =>\n updateMessage(context, threadId, messageId, options),\n\n listFiles: (options?: ListFilesOptionalParams) => listFiles(context, options),\n uploadFile: (\n content: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => uploadFile(context, content, purpose, options),\n uploadFileAndPoll: (\n content: ReadableStream | NodeJS.ReadableStream,\n purpose: FilePurpose,\n options?: UploadFileOptionalParams,\n ) => uploadFileAndPoll(context, content, purpose, options),\n deleteFile: (fileId: string, options?: DeleteFileOptionalParams) =>\n deleteFile(context, fileId, options),\n getFile: (fileId: string, options?: GetFileOptionalParams) => getFile(context, fileId, options),\n getFileContent: (fileId: string, options?: GetFileContentOptionalParams) =>\n getFileContent(context, fileId, options),\n\n listVectorStores: (options?: ListVectorStoresOptionalParams) =>\n listVectorStores(context, options),\n createVectorStore: (options?: CreateVectorStoreOptionalParams) =>\n createVectorStore(context, options),\n getVectorStore: (vectorStoreId: string, options?: GetVectorStoreOptionalParams) =>\n getVectorStore(context, vectorStoreId, options),\n modifyVectorStore: (vectorStoreId: string, options?: UpdateVectorStoreOptionalParams) =>\n modifyVectorStore(context, vectorStoreId, options),\n deleteVectorStore: (vectorStoreId: string, options?: DeleteVectorStoreOptionalParams) =>\n deleteVectorStore(context, vectorStoreId, options),\n createVectorStoreAndPoll: (options?: CreateVectorStoreOptionalParams) =>\n createVectorStoreAndPoll(context, options),\n\n createVectorStoreFile: (vectorStoreId: string, options?: CreateVectorStoreFileOptionalParams) =>\n createVectorStoreFile(context, vectorStoreId, options),\n getVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: GetVectorStoreFileOptionalParams,\n ) => getVectorStoreFile(context, vectorStoreId, fileId, options),\n listVectorStoreFiles: (vectorStoreId: string, options?: ListVectorStoreFilesOptionalParams) =>\n listVectorStoreFiles(context, vectorStoreId, options),\n deleteVectorStoreFile: (\n vectorStoreId: string,\n fileId: string,\n options?: DeleteVectorStoreFileOptionalParams,\n ) => deleteVectorStoreFile(context, vectorStoreId, fileId, options),\n createVectorStoreFileAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileOptionalParams,\n ) => createVectorStoreFileAndPoll(context, vectorStoreId, options),\n\n createVectorStoreFileBatch: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => createVectorStoreFileBatch(context, vectorStoreId, options),\n getVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: GetVectorStoreFileBatchOptionalParams,\n ) => getVectorStoreFileBatch(context, vectorStoreId, batchId, options),\n cancelVectorStoreFileBatch: (\n vectorStoreId: string,\n batchId: string,\n options?: CancelVectorStoreFileBatchOptionalParams,\n ) => cancelVectorStoreFileBatch(context, vectorStoreId, batchId, options),\n listVectorStoreFileBatchFiles: (\n vectorStoreId: string,\n batchId: string,\n options?: ListVectorStoreFileBatchFilesOptionalParams,\n ) => listVectorStoreFileBatchFiles(context, vectorStoreId, batchId, options),\n createVectorStoreFileBatchAndPoll: (\n vectorStoreId: string,\n options?: CreateVectorStoreFileBatchOptionalParams,\n ) => createVectorStoreFileBatchAndPoll(context, vectorStoreId, options),\n\n getRunStep: (\n threadId: string,\n runId: string,\n stepId: string,\n options?: GetRunStepOptionalParams,\n ) => getRunStep(context, threadId, runId, stepId, options),\n listRunSteps: (threadId: string, runId: string, options?: ListRunStepsOptionalParams) =>\n listRunSteps(context, threadId, runId, options),\n };\n}\n\nexport function getAgentsOperations(context: Client): AgentsOperations {\n return {\n ...getAgents(context),\n };\n}\n"]}