@azure/ai-agents 1.0.0-beta.5 → 1.0.0
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.
- package/README.md +2 -26
- package/dist/browser/agentsClient.d.ts +2 -2
- package/dist/browser/agentsClient.d.ts.map +1 -1
- package/dist/browser/agentsClient.js.map +1 -1
- package/dist/browser/api/agentsContext.d.ts +2 -2
- package/dist/browser/api/agentsContext.d.ts.map +1 -1
- package/dist/browser/api/agentsContext.js +12 -24
- package/dist/browser/api/agentsContext.js.map +1 -1
- package/dist/browser/api/files/operations.d.ts +4 -4
- package/dist/browser/api/files/operations.d.ts.map +1 -1
- package/dist/browser/api/files/operations.js +21 -8
- package/dist/browser/api/files/operations.js.map +1 -1
- package/dist/browser/api/files/options.d.ts +3 -3
- package/dist/browser/api/files/options.d.ts.map +1 -1
- package/dist/browser/api/files/options.js.map +1 -1
- package/dist/browser/api/messages/operations.d.ts.map +1 -1
- package/dist/browser/api/messages/operations.js +10 -4
- package/dist/browser/api/messages/operations.js.map +1 -1
- package/dist/browser/api/operations.d.ts +7 -6
- package/dist/browser/api/operations.d.ts.map +1 -1
- package/dist/browser/api/operations.js +22 -10
- package/dist/browser/api/operations.js.map +1 -1
- package/dist/browser/api/options.d.ts +2 -2
- package/dist/browser/api/options.d.ts.map +1 -1
- package/dist/browser/api/options.js.map +1 -1
- package/dist/browser/api/runSteps/operations.d.ts.map +1 -1
- package/dist/browser/api/runSteps/operations.js +7 -3
- package/dist/browser/api/runSteps/operations.js.map +1 -1
- package/dist/browser/api/runs/operations.d.ts.map +1 -1
- package/dist/browser/api/runs/operations.js +21 -9
- package/dist/browser/api/runs/operations.js.map +1 -1
- package/dist/browser/api/runs/options.d.ts +3 -3
- package/dist/browser/api/runs/options.d.ts.map +1 -1
- package/dist/browser/api/runs/options.js.map +1 -1
- package/dist/browser/api/threads/operations.d.ts.map +1 -1
- package/dist/browser/api/threads/operations.js +16 -6
- package/dist/browser/api/threads/operations.js.map +1 -1
- package/dist/browser/api/threads/options.d.ts +2 -2
- package/dist/browser/api/threads/options.d.ts.map +1 -1
- package/dist/browser/api/threads/options.js.map +1 -1
- package/dist/browser/api/vectorStoreFileBatches/operations.d.ts +6 -6
- package/dist/browser/api/vectorStoreFileBatches/operations.d.ts.map +1 -1
- package/dist/browser/api/vectorStoreFileBatches/operations.js +29 -11
- package/dist/browser/api/vectorStoreFileBatches/operations.js.map +1 -1
- package/dist/browser/api/vectorStoreFileBatches/options.d.ts +3 -3
- package/dist/browser/api/vectorStoreFileBatches/options.d.ts.map +1 -1
- package/dist/browser/api/vectorStoreFileBatches/options.js.map +1 -1
- package/dist/browser/api/vectorStoreFiles/operations.d.ts.map +1 -1
- package/dist/browser/api/vectorStoreFiles/operations.js +13 -5
- package/dist/browser/api/vectorStoreFiles/operations.js.map +1 -1
- package/dist/browser/api/vectorStores/operations.d.ts.map +1 -1
- package/dist/browser/api/vectorStores/operations.js +16 -6
- package/dist/browser/api/vectorStores/operations.js.map +1 -1
- package/dist/browser/classic/runSteps/index.d.ts +0 -1
- package/dist/browser/classic/runSteps/index.d.ts.map +1 -1
- package/dist/browser/classic/runSteps/index.js.map +1 -1
- package/dist/browser/classic/runs/index.d.ts +1 -1
- package/dist/browser/classic/runs/index.d.ts.map +1 -1
- package/dist/browser/classic/runs/index.js.map +1 -1
- package/dist/browser/classic/vectorStoreFileBatches/index.d.ts +5 -5
- package/dist/browser/classic/vectorStoreFileBatches/index.d.ts.map +1 -1
- package/dist/browser/classic/vectorStoreFileBatches/index.js.map +1 -1
- package/dist/browser/classic/vectorStoreFiles/index.d.ts +5 -5
- package/dist/browser/classic/vectorStoreFiles/index.d.ts.map +1 -1
- package/dist/browser/classic/vectorStoreFiles/index.js +2 -0
- package/dist/browser/classic/vectorStoreFiles/index.js.map +1 -1
- package/dist/browser/classic/vectorStores/index.d.ts.map +1 -1
- package/dist/browser/classic/vectorStores/index.js.map +1 -1
- package/dist/browser/constants.d.ts +1 -1
- package/dist/browser/constants.d.ts.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/index.d.ts +3 -3
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/index.d.ts +1 -1
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +41 -161
- package/dist/browser/models/models.d.ts.map +1 -1
- package/dist/browser/models/models.js +34 -217
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/browser/static-helpers/pagingHelpers.d.ts.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/utils.d.ts +1 -50
- package/dist/browser/utils.d.ts.map +1 -1
- package/dist/browser/utils.js +0 -81
- package/dist/browser/utils.js.map +1 -1
- package/dist/commonjs/agentsClient.d.ts +2 -2
- package/dist/commonjs/agentsClient.d.ts.map +1 -1
- package/dist/commonjs/agentsClient.js.map +1 -1
- package/dist/commonjs/api/agentsContext.d.ts +2 -2
- package/dist/commonjs/api/agentsContext.d.ts.map +1 -1
- package/dist/commonjs/api/agentsContext.js +12 -24
- package/dist/commonjs/api/agentsContext.js.map +1 -1
- package/dist/commonjs/api/files/operations.d.ts +4 -4
- package/dist/commonjs/api/files/operations.d.ts.map +1 -1
- package/dist/commonjs/api/files/operations.js +19 -6
- package/dist/commonjs/api/files/operations.js.map +1 -1
- package/dist/commonjs/api/files/options.d.ts +3 -3
- package/dist/commonjs/api/files/options.d.ts.map +1 -1
- package/dist/commonjs/api/files/options.js.map +1 -1
- package/dist/commonjs/api/messages/operations.d.ts.map +1 -1
- package/dist/commonjs/api/messages/operations.js +9 -3
- package/dist/commonjs/api/messages/operations.js.map +1 -1
- package/dist/commonjs/api/operations.d.ts +7 -6
- package/dist/commonjs/api/operations.d.ts.map +1 -1
- package/dist/commonjs/api/operations.js +19 -7
- package/dist/commonjs/api/operations.js.map +1 -1
- package/dist/commonjs/api/options.d.ts +2 -2
- package/dist/commonjs/api/options.d.ts.map +1 -1
- package/dist/commonjs/api/options.js.map +1 -1
- package/dist/commonjs/api/runSteps/operations.d.ts.map +1 -1
- package/dist/commonjs/api/runSteps/operations.js +6 -2
- package/dist/commonjs/api/runSteps/operations.js.map +1 -1
- package/dist/commonjs/api/runs/operations.d.ts.map +1 -1
- package/dist/commonjs/api/runs/operations.js +20 -8
- package/dist/commonjs/api/runs/operations.js.map +1 -1
- package/dist/commonjs/api/runs/options.d.ts +3 -3
- package/dist/commonjs/api/runs/options.d.ts.map +1 -1
- package/dist/commonjs/api/runs/options.js.map +1 -1
- package/dist/commonjs/api/threads/operations.d.ts.map +1 -1
- package/dist/commonjs/api/threads/operations.js +15 -5
- package/dist/commonjs/api/threads/operations.js.map +1 -1
- package/dist/commonjs/api/threads/options.d.ts +2 -2
- package/dist/commonjs/api/threads/options.d.ts.map +1 -1
- package/dist/commonjs/api/threads/options.js.map +1 -1
- package/dist/commonjs/api/vectorStoreFileBatches/operations.d.ts +6 -6
- package/dist/commonjs/api/vectorStoreFileBatches/operations.d.ts.map +1 -1
- package/dist/commonjs/api/vectorStoreFileBatches/operations.js +26 -8
- package/dist/commonjs/api/vectorStoreFileBatches/operations.js.map +1 -1
- package/dist/commonjs/api/vectorStoreFileBatches/options.d.ts +3 -3
- package/dist/commonjs/api/vectorStoreFileBatches/options.d.ts.map +1 -1
- package/dist/commonjs/api/vectorStoreFileBatches/options.js.map +1 -1
- package/dist/commonjs/api/vectorStoreFiles/operations.d.ts.map +1 -1
- package/dist/commonjs/api/vectorStoreFiles/operations.js +12 -4
- package/dist/commonjs/api/vectorStoreFiles/operations.js.map +1 -1
- package/dist/commonjs/api/vectorStores/operations.d.ts.map +1 -1
- package/dist/commonjs/api/vectorStores/operations.js +15 -5
- package/dist/commonjs/api/vectorStores/operations.js.map +1 -1
- package/dist/commonjs/classic/runSteps/index.d.ts +0 -1
- package/dist/commonjs/classic/runSteps/index.d.ts.map +1 -1
- package/dist/commonjs/classic/runSteps/index.js.map +1 -1
- package/dist/commonjs/classic/runs/index.d.ts +1 -1
- package/dist/commonjs/classic/runs/index.d.ts.map +1 -1
- package/dist/commonjs/classic/runs/index.js.map +1 -1
- package/dist/commonjs/classic/vectorStoreFileBatches/index.d.ts +5 -5
- package/dist/commonjs/classic/vectorStoreFileBatches/index.d.ts.map +1 -1
- package/dist/commonjs/classic/vectorStoreFileBatches/index.js.map +1 -1
- package/dist/commonjs/classic/vectorStoreFiles/index.d.ts +5 -5
- package/dist/commonjs/classic/vectorStoreFiles/index.d.ts.map +1 -1
- package/dist/commonjs/classic/vectorStoreFiles/index.js +2 -0
- package/dist/commonjs/classic/vectorStoreFiles/index.js.map +1 -1
- package/dist/commonjs/classic/vectorStores/index.d.ts.map +1 -1
- package/dist/commonjs/classic/vectorStores/index.js.map +1 -1
- package/dist/commonjs/constants.d.ts +1 -1
- package/dist/commonjs/constants.d.ts.map +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/index.d.ts +3 -3
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -1
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +2 -2
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/models.d.ts +41 -161
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +42 -248
- package/dist/commonjs/models/models.js.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/commonjs/utils.d.ts +1 -50
- package/dist/commonjs/utils.d.ts.map +1 -1
- package/dist/commonjs/utils.js +0 -81
- package/dist/commonjs/utils.js.map +1 -1
- package/dist/esm/agentsClient.d.ts +2 -2
- package/dist/esm/agentsClient.d.ts.map +1 -1
- package/dist/esm/agentsClient.js.map +1 -1
- package/dist/esm/api/agentsContext.d.ts +2 -2
- package/dist/esm/api/agentsContext.d.ts.map +1 -1
- package/dist/esm/api/agentsContext.js +12 -24
- package/dist/esm/api/agentsContext.js.map +1 -1
- package/dist/esm/api/files/operations.d.ts +4 -4
- package/dist/esm/api/files/operations.d.ts.map +1 -1
- package/dist/esm/api/files/operations.js +21 -8
- package/dist/esm/api/files/operations.js.map +1 -1
- package/dist/esm/api/files/options.d.ts +3 -3
- package/dist/esm/api/files/options.d.ts.map +1 -1
- package/dist/esm/api/files/options.js.map +1 -1
- package/dist/esm/api/messages/operations.d.ts.map +1 -1
- package/dist/esm/api/messages/operations.js +10 -4
- package/dist/esm/api/messages/operations.js.map +1 -1
- package/dist/esm/api/operations.d.ts +7 -6
- package/dist/esm/api/operations.d.ts.map +1 -1
- package/dist/esm/api/operations.js +22 -10
- package/dist/esm/api/operations.js.map +1 -1
- package/dist/esm/api/options.d.ts +2 -2
- package/dist/esm/api/options.d.ts.map +1 -1
- package/dist/esm/api/options.js.map +1 -1
- package/dist/esm/api/runSteps/operations.d.ts.map +1 -1
- package/dist/esm/api/runSteps/operations.js +7 -3
- package/dist/esm/api/runSteps/operations.js.map +1 -1
- package/dist/esm/api/runs/operations.d.ts.map +1 -1
- package/dist/esm/api/runs/operations.js +21 -9
- package/dist/esm/api/runs/operations.js.map +1 -1
- package/dist/esm/api/runs/options.d.ts +3 -3
- package/dist/esm/api/runs/options.d.ts.map +1 -1
- package/dist/esm/api/runs/options.js.map +1 -1
- package/dist/esm/api/threads/operations.d.ts.map +1 -1
- package/dist/esm/api/threads/operations.js +16 -6
- package/dist/esm/api/threads/operations.js.map +1 -1
- package/dist/esm/api/threads/options.d.ts +2 -2
- package/dist/esm/api/threads/options.d.ts.map +1 -1
- package/dist/esm/api/threads/options.js.map +1 -1
- package/dist/esm/api/vectorStoreFileBatches/operations.d.ts +6 -6
- package/dist/esm/api/vectorStoreFileBatches/operations.d.ts.map +1 -1
- package/dist/esm/api/vectorStoreFileBatches/operations.js +29 -11
- package/dist/esm/api/vectorStoreFileBatches/operations.js.map +1 -1
- package/dist/esm/api/vectorStoreFileBatches/options.d.ts +3 -3
- package/dist/esm/api/vectorStoreFileBatches/options.d.ts.map +1 -1
- package/dist/esm/api/vectorStoreFileBatches/options.js.map +1 -1
- package/dist/esm/api/vectorStoreFiles/operations.d.ts.map +1 -1
- package/dist/esm/api/vectorStoreFiles/operations.js +13 -5
- package/dist/esm/api/vectorStoreFiles/operations.js.map +1 -1
- package/dist/esm/api/vectorStores/operations.d.ts.map +1 -1
- package/dist/esm/api/vectorStores/operations.js +16 -6
- package/dist/esm/api/vectorStores/operations.js.map +1 -1
- package/dist/esm/classic/runSteps/index.d.ts +0 -1
- package/dist/esm/classic/runSteps/index.d.ts.map +1 -1
- package/dist/esm/classic/runSteps/index.js.map +1 -1
- package/dist/esm/classic/runs/index.d.ts +1 -1
- package/dist/esm/classic/runs/index.d.ts.map +1 -1
- package/dist/esm/classic/runs/index.js.map +1 -1
- package/dist/esm/classic/vectorStoreFileBatches/index.d.ts +5 -5
- package/dist/esm/classic/vectorStoreFileBatches/index.d.ts.map +1 -1
- package/dist/esm/classic/vectorStoreFileBatches/index.js.map +1 -1
- package/dist/esm/classic/vectorStoreFiles/index.d.ts +5 -5
- package/dist/esm/classic/vectorStoreFiles/index.d.ts.map +1 -1
- package/dist/esm/classic/vectorStoreFiles/index.js +2 -0
- package/dist/esm/classic/vectorStoreFiles/index.js.map +1 -1
- package/dist/esm/classic/vectorStores/index.d.ts.map +1 -1
- package/dist/esm/classic/vectorStores/index.js.map +1 -1
- package/dist/esm/constants.d.ts +1 -1
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -1
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +41 -161
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js +34 -217
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/esm/static-helpers/pagingHelpers.d.ts.map +1 -1
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/esm/utils.d.ts +1 -50
- package/dist/esm/utils.d.ts.map +1 -1
- package/dist/esm/utils.js +0 -81
- package/dist/esm/utils.js.map +1 -1
- package/dist/react-native/agentsClient.d.ts +2 -2
- package/dist/react-native/agentsClient.d.ts.map +1 -1
- package/dist/react-native/agentsClient.js.map +1 -1
- package/dist/react-native/api/agentsContext.d.ts +2 -2
- package/dist/react-native/api/agentsContext.d.ts.map +1 -1
- package/dist/react-native/api/agentsContext.js +12 -24
- package/dist/react-native/api/agentsContext.js.map +1 -1
- package/dist/react-native/api/files/operations.d.ts +4 -4
- package/dist/react-native/api/files/operations.d.ts.map +1 -1
- package/dist/react-native/api/files/operations.js +21 -8
- package/dist/react-native/api/files/operations.js.map +1 -1
- package/dist/react-native/api/files/options.d.ts +3 -3
- package/dist/react-native/api/files/options.d.ts.map +1 -1
- package/dist/react-native/api/files/options.js.map +1 -1
- package/dist/react-native/api/messages/operations.d.ts.map +1 -1
- package/dist/react-native/api/messages/operations.js +10 -4
- package/dist/react-native/api/messages/operations.js.map +1 -1
- package/dist/react-native/api/operations.d.ts +7 -6
- package/dist/react-native/api/operations.d.ts.map +1 -1
- package/dist/react-native/api/operations.js +22 -10
- package/dist/react-native/api/operations.js.map +1 -1
- package/dist/react-native/api/options.d.ts +2 -2
- package/dist/react-native/api/options.d.ts.map +1 -1
- package/dist/react-native/api/options.js.map +1 -1
- package/dist/react-native/api/runSteps/operations.d.ts.map +1 -1
- package/dist/react-native/api/runSteps/operations.js +7 -3
- package/dist/react-native/api/runSteps/operations.js.map +1 -1
- package/dist/react-native/api/runs/operations.d.ts.map +1 -1
- package/dist/react-native/api/runs/operations.js +21 -9
- package/dist/react-native/api/runs/operations.js.map +1 -1
- package/dist/react-native/api/runs/options.d.ts +3 -3
- package/dist/react-native/api/runs/options.d.ts.map +1 -1
- package/dist/react-native/api/runs/options.js.map +1 -1
- package/dist/react-native/api/threads/operations.d.ts.map +1 -1
- package/dist/react-native/api/threads/operations.js +16 -6
- package/dist/react-native/api/threads/operations.js.map +1 -1
- package/dist/react-native/api/threads/options.d.ts +2 -2
- package/dist/react-native/api/threads/options.d.ts.map +1 -1
- package/dist/react-native/api/threads/options.js.map +1 -1
- package/dist/react-native/api/vectorStoreFileBatches/operations.d.ts +6 -6
- package/dist/react-native/api/vectorStoreFileBatches/operations.d.ts.map +1 -1
- package/dist/react-native/api/vectorStoreFileBatches/operations.js +29 -11
- package/dist/react-native/api/vectorStoreFileBatches/operations.js.map +1 -1
- package/dist/react-native/api/vectorStoreFileBatches/options.d.ts +3 -3
- package/dist/react-native/api/vectorStoreFileBatches/options.d.ts.map +1 -1
- package/dist/react-native/api/vectorStoreFileBatches/options.js.map +1 -1
- package/dist/react-native/api/vectorStoreFiles/operations.d.ts.map +1 -1
- package/dist/react-native/api/vectorStoreFiles/operations.js +13 -5
- package/dist/react-native/api/vectorStoreFiles/operations.js.map +1 -1
- package/dist/react-native/api/vectorStores/operations.d.ts.map +1 -1
- package/dist/react-native/api/vectorStores/operations.js +16 -6
- package/dist/react-native/api/vectorStores/operations.js.map +1 -1
- package/dist/react-native/classic/runSteps/index.d.ts +0 -1
- package/dist/react-native/classic/runSteps/index.d.ts.map +1 -1
- package/dist/react-native/classic/runSteps/index.js.map +1 -1
- package/dist/react-native/classic/runs/index.d.ts +1 -1
- package/dist/react-native/classic/runs/index.d.ts.map +1 -1
- package/dist/react-native/classic/runs/index.js.map +1 -1
- package/dist/react-native/classic/vectorStoreFileBatches/index.d.ts +5 -5
- package/dist/react-native/classic/vectorStoreFileBatches/index.d.ts.map +1 -1
- package/dist/react-native/classic/vectorStoreFileBatches/index.js.map +1 -1
- package/dist/react-native/classic/vectorStoreFiles/index.d.ts +5 -5
- package/dist/react-native/classic/vectorStoreFiles/index.d.ts.map +1 -1
- package/dist/react-native/classic/vectorStoreFiles/index.js +2 -0
- package/dist/react-native/classic/vectorStoreFiles/index.js.map +1 -1
- package/dist/react-native/classic/vectorStores/index.d.ts.map +1 -1
- package/dist/react-native/classic/vectorStores/index.js.map +1 -1
- package/dist/react-native/constants.d.ts +1 -1
- package/dist/react-native/constants.d.ts.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/index.d.ts +3 -3
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/index.d.ts +1 -1
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +41 -161
- package/dist/react-native/models/models.d.ts.map +1 -1
- package/dist/react-native/models/models.js +34 -217
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/utils.d.ts +1 -50
- package/dist/react-native/utils.d.ts.map +1 -1
- package/dist/react-native/utils.js +0 -81
- package/dist/react-native/utils.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/runs/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO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CAAC;QACD,aAAa,EAAE,KAAK,EAAE,UAAqB,EAAE,EAAE;YAC7C,OAAO,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3D,CAAC;QACD,kBAAkB,EAAE,qBAAqB;QACzC,iBAAiB,EAAE,CAAC,MAAiB,EAAE,EAAE;YACvC,OAAO,qBAAqB,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS;gBACnE,CAAC,CAAC,IAAI,KAAK,CAAC,qBAAqB,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;gBAC5D,CAAC,CAAC,SAAS,CAAC;QAChB,CAAC;QACD,YAAY,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,YAAY;KACnD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,MAAiB;IAC9C,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,YAAY,CAAC;QACtB,KAAK,aAAa;YAChB,OAAO,SAAS,CAAC;QACnB,KAAK,iBAAiB;YACpB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB,KAAK,WAAW,CAAC;QACjB,KAAK,SAAS,CAAC;QACf;YACE,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AgentsContext as Client } from \"../index.js\";\nimport type { ThreadRun, _AgentsPagedResultThreadRun, ToolOutput } from \"../../models/models.js\";\nimport {\n toolDefinitionUnionArraySerializer,\n agentsResponseFormatOptionSerializer,\n threadMessageOptionsArraySerializer,\n truncationObjectSerializer,\n agentsToolChoiceOptionSerializer,\n threadRunDeserializer,\n _agentsPagedResultThreadRunDeserializer,\n toolOutputArraySerializer,\n} from \"../../models/models.js\";\nimport type {\n RunsCancelRunOptionalParams,\n RunsSubmitToolOutputsToRunOptionalParams,\n RunsUpdateRunOptionalParams,\n RunsGetRunOptionalParams,\n RunsListRunsOptionalParams,\n RunsCreateRunOptionalParams,\n} from \"./options.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type { AgentRunResponse, AgentEventMessageStream } from \"../../models/streamingModels.js\";\nimport { createRunStreaming, submitToolOutputsToRunStreaming } from \"../operations.js\";\nimport type { OperationState, OperationStatus, PollerLike } from \"@azure/core-lro\";\nimport { createPoller } from \"../poller.js\";\n\nexport function _cancelRunSend(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsCancelRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}/cancel{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _cancelRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Cancels a run of an in‐progress thread. */\nexport async function cancelRun(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsCancelRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _cancelRunSend(context, threadId, runId, options);\n return _cancelRunDeserialize(result);\n}\n\nexport function _submitToolOutputsToRunSend(\n context: Client,\n threadId: string,\n runId: string,\n toolOutputs: ToolOutput[],\n options: RunsSubmitToolOutputsToRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}/submit_tool_outputs{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n tool_outputs: toolOutputArraySerializer(toolOutputs),\n stream: false,\n },\n });\n}\n\nexport async function _submitToolOutputsToRunDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Submits outputs from tools as requested by tool calls in a run. */\nexport function submitToolOutputsToRun(\n context: Client,\n threadId: string,\n runId: string,\n toolOutputs: ToolOutput[],\n options: RunsSubmitToolOutputsToRunOptionalParams = { requestOptions: {} },\n): AgentRunResponse {\n async function executeSubmitToolOutputsToRun(): Promise<ThreadRun> {\n const result = await _submitToolOutputsToRunSend(\n context,\n threadId,\n runId,\n toolOutputs,\n options,\n );\n return _submitToolOutputsToRunDeserialize(result);\n }\n\n return {\n then: function (onFulfilled, onRejected) {\n return executeSubmitToolOutputsToRun().then(onFulfilled, onRejected).catch(onRejected);\n },\n async stream(): Promise<AgentEventMessageStream> {\n return submitToolOutputsToRunStreaming(context, threadId, runId, toolOutputs, options);\n },\n };\n}\n\nexport function _updateRunSend(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsUpdateRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: { metadata: options?.metadata },\n });\n}\n\nexport async function _updateRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Modifies an existing thread run. */\nexport async function updateRun(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsUpdateRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _updateRunSend(context, threadId, runId, options);\n return _updateRunDeserialize(result);\n}\n\nexport function _getRunSend(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsGetRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Gets an existing run from an existing thread. */\nexport async function getRun(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsGetRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _getRunSend(context, threadId, runId, options);\n return _getRunDeserialize(result);\n}\n\nexport function _listRunsSend(\n context: Client,\n threadId: string,\n options: RunsListRunsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs{?api%2Dversion,limit,order,after,before}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listRunsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _agentsPagedResultThreadRunDeserializer(result.body);\n}\n\n/** Gets a list of runs for a specified thread. */\nexport function listRuns(\n context: Client,\n threadId: string,\n options: RunsListRunsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<ThreadRun> {\n return buildPagedAsyncIterator(\n context,\n () => _listRunsSend(context, threadId, options),\n _listRunsDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _createRunSend(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs{?api%2Dversion,include%5B%5D}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n \"include%5B%5D\": !options?.include\n ? options?.include\n : options?.include.map((p: any) => {\n return p;\n }),\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n assistant_id: assistantId,\n model: options?.model,\n instructions: options?.instructions,\n additional_instructions: options?.additionalInstructions,\n additional_messages: !options?.additionalMessages\n ? options?.additionalMessages\n : threadMessageOptionsArraySerializer(options?.additionalMessages),\n tools: !options?.tools ? options?.tools : toolDefinitionUnionArraySerializer(options?.tools),\n stream: options?.stream,\n temperature: options?.temperature,\n top_p: options?.topP,\n max_prompt_tokens: options?.maxPromptTokens,\n max_completion_tokens: options?.maxCompletionTokens,\n truncation_strategy: !options?.truncationStrategy\n ? options?.truncationStrategy\n : truncationObjectSerializer(options?.truncationStrategy),\n tool_choice: !options?.toolChoice\n ? options?.toolChoice\n : agentsToolChoiceOptionSerializer(options?.toolChoice),\n response_format: !options?.responseFormat\n ? options?.responseFormat\n : agentsResponseFormatOptionSerializer(options?.responseFormat),\n parallel_tool_calls: options?.parallelToolCalls,\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _createRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Creates a new run for an agent thread (internal implementation). */\nexport async function createRunInternal(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _createRunSend(context, threadId, assistantId, options);\n return _createRunDeserialize(result);\n}\n\n/** Creates a new run for an agent thread. */\nexport function createRun(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): AgentRunResponse {\n async function executeCreateRun(): Promise<ThreadRun> {\n return createRunInternal(context, threadId, assistantId, options);\n }\n\n return {\n then: function (onFulfilled, onRejected) {\n return executeCreateRun().then(onFulfilled, onRejected).catch(onRejected);\n },\n async stream(): Promise<AgentEventMessageStream> {\n return createRunStreaming(context, assistantId, threadId, options);\n },\n };\n}\n\n/** Creates a new run for an agent thread with polling */\nexport function createRunAndPoll(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<ThreadRun>, ThreadRun> {\n return createPoller<ThreadRun>({\n initOperation: async () => {\n return createRunInternal(context, threadId, assistantId, options);\n },\n pollOperation: async (currentRun: ThreadRun) => {\n return getRun(context, threadId, currentRun.id, options);\n },\n getOperationStatus: getLroOperationStatus,\n getOperationError: (result: ThreadRun) => {\n return getLroOperationStatus(result) === \"failed\" && result.lastError\n ? new Error(`Operation failed: ${result.lastError.message}`)\n : undefined;\n },\n intervalInMs: options.pollingOptions?.intervalInMs,\n });\n}\n\nfunction getLroOperationStatus(result: ThreadRun): OperationStatus {\n switch (result.status) {\n case \"queued\":\n return \"notStarted\";\n case \"in_progress\":\n return \"running\";\n case \"requires_action\":\n return \"running\";\n case \"completed\":\n return \"succeeded\";\n case \"cancelled\":\n case \"expired\":\n default:\n return \"failed\";\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/runs/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EACL,kCAAkC,EAClC,oCAAoC,EACpC,wBAAwB,EACxB,mCAAmC,EACnC,0BAA0B,EAC1B,gCAAgC,EAChC,qBAAqB,EACrB,uCAAuC,EACvC,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAUhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,mCAAmC,EAAE,MAAM,yBAAyB,CAAC;AAE/F,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAC;AAEvF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,QAAgB,EAChB,KAAa,EACb,UAAuC,EAAE,cAAc,EAAE,EAAE,EAAE;;IAE7D,MAAM,IAAI,GAAG,iBAAiB,CAC5B,yDAAyD,EACzD;QACE,QAAQ,EAAE,QAAQ;QAClB,KAAK,EAAE,KAAK;QACZ,eAAe,EAAE,OAAO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AQ,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC;QACD,aAAa,EAAE,KAAK,EAAE,UAAqB,EAAE,EAAE;YAC7C,OAAO,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAC3D,CAAC;QACD,kBAAkB,EAAE,qBAAqB;QACzC,iBAAiB,EAAE,CAAC,MAAiB,EAAE,EAAE;YACvC,OAAO,qBAAqB,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS;gBACnE,CAAC,CAAC,IAAI,KAAK,CAAC,qBAAqB,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;gBAC5D,CAAC,CAAC,SAAS,CAAC;QAChB,CAAC;QACD,YAAY,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,YAAY;KACnD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,MAAiB;IAC9C,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,YAAY,CAAC;QACtB,KAAK,aAAa;YAChB,OAAO,SAAS,CAAC;QACnB,KAAK,iBAAiB;YACpB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB,KAAK,WAAW,CAAC;QACjB,KAAK,SAAS,CAAC;QACf;YACE,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AgentsContext as Client } from \"../index.js\";\nimport type { ThreadRun, _AgentsPagedResultThreadRun, ToolOutput } from \"../../models/models.js\";\nimport {\n toolDefinitionUnionArraySerializer,\n agentsResponseFormatOptionSerializer,\n agentV1ErrorDeserializer,\n threadMessageOptionsArraySerializer,\n truncationObjectSerializer,\n agentsToolChoiceOptionSerializer,\n threadRunDeserializer,\n _agentsPagedResultThreadRunDeserializer,\n toolOutputArraySerializer,\n} from \"../../models/models.js\";\nimport type {\n RunsCancelRunOptionalParams,\n RunsSubmitToolOutputsToRunOptionalParams,\n RunsUpdateRunOptionalParams,\n RunsGetRunOptionalParams,\n RunsListRunsOptionalParams,\n RunsCreateRunOptionalParams,\n} from \"./options.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type { AgentRunResponse, AgentEventMessageStream } from \"../../models/streamingModels.js\";\nimport { createRunStreaming, submitToolOutputsToRunStreaming } from \"../operations.js\";\nimport type { OperationState, OperationStatus, PollerLike } from \"@azure/core-lro\";\nimport { createPoller } from \"../poller.js\";\n\nexport function _cancelRunSend(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsCancelRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}/cancel{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _cancelRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Cancels a run of an in‐progress thread. */\nexport async function cancelRun(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsCancelRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _cancelRunSend(context, threadId, runId, options);\n return _cancelRunDeserialize(result);\n}\n\nexport function _submitToolOutputsToRunSend(\n context: Client,\n threadId: string,\n runId: string,\n toolOutputs: ToolOutput[],\n options: RunsSubmitToolOutputsToRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}/submit_tool_outputs{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n tool_outputs: toolOutputArraySerializer(toolOutputs),\n stream: options?.stream ?? false,\n },\n });\n}\n\nexport async function _submitToolOutputsToRunDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Submits outputs from tools as requested by tool calls in a run. */\nexport function submitToolOutputsToRun(\n context: Client,\n threadId: string,\n runId: string,\n toolOutputs: ToolOutput[],\n options: RunsSubmitToolOutputsToRunOptionalParams = { requestOptions: {} },\n): AgentRunResponse {\n async function executeSubmitToolOutputsToRun(): Promise<ThreadRun> {\n const result = await _submitToolOutputsToRunSend(\n context,\n threadId,\n runId,\n toolOutputs,\n options,\n );\n return _submitToolOutputsToRunDeserialize(result);\n }\n\n return {\n then: function (onFulfilled, onRejected) {\n return executeSubmitToolOutputsToRun().then(onFulfilled, onRejected).catch(onRejected);\n },\n async stream(): Promise<AgentEventMessageStream> {\n return submitToolOutputsToRunStreaming(context, threadId, runId, toolOutputs, options);\n },\n };\n}\n\nexport function _updateRunSend(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsUpdateRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: { metadata: options?.metadata },\n });\n}\n\nexport async function _updateRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Modifies an existing thread run. */\nexport async function updateRun(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsUpdateRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _updateRunSend(context, threadId, runId, options);\n return _updateRunDeserialize(result);\n}\n\nexport function _getRunSend(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsGetRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs/{runId}{?api%2Dversion}\",\n {\n threadId: threadId,\n runId: runId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Gets an existing run from an existing thread. */\nexport async function getRun(\n context: Client,\n threadId: string,\n runId: string,\n options: RunsGetRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _getRunSend(context, threadId, runId, options);\n return _getRunDeserialize(result);\n}\n\nexport function _listRunsSend(\n context: Client,\n threadId: string,\n options: RunsListRunsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs{?api%2Dversion,limit,order,after,before}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listRunsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return _agentsPagedResultThreadRunDeserializer(result.body);\n}\n\n/** Gets a list of runs for a specified thread. */\nexport function listRuns(\n context: Client,\n threadId: string,\n options: RunsListRunsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<ThreadRun> {\n return buildPagedAsyncIterator(\n context,\n () => _listRunsSend(context, threadId, options),\n _listRunsDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _createRunSend(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}/runs{?api%2Dversion,include%5B%5D}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n \"include%5B%5D\": !options?.include\n ? options?.include\n : options?.include.map((p: any) => {\n return p;\n }),\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n assistant_id: assistantId,\n model: options?.model,\n instructions: options?.instructions,\n additional_instructions: options?.additionalInstructions,\n additional_messages: !options?.additionalMessages\n ? options?.additionalMessages\n : threadMessageOptionsArraySerializer(options?.additionalMessages),\n tools: !options?.tools ? options?.tools : toolDefinitionUnionArraySerializer(options?.tools),\n stream: options?.stream,\n temperature: options?.temperature,\n top_p: options?.topP,\n max_prompt_tokens: options?.maxPromptTokens,\n max_completion_tokens: options?.maxCompletionTokens,\n truncation_strategy: !options?.truncationStrategy\n ? options?.truncationStrategy\n : truncationObjectSerializer(options?.truncationStrategy),\n tool_choice: !options?.toolChoice\n ? options?.toolChoice\n : agentsToolChoiceOptionSerializer(options?.toolChoice),\n response_format: !options?.responseFormat\n ? options?.responseFormat\n : agentsResponseFormatOptionSerializer(options?.responseFormat),\n parallel_tool_calls: options?.parallelToolCalls,\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _createRunDeserialize(result: PathUncheckedResponse): Promise<ThreadRun> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadRunDeserializer(result.body);\n}\n\n/** Creates a new run for an agent thread (internal implementation). */\nexport async function createRunInternal(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): Promise<ThreadRun> {\n const result = await _createRunSend(context, threadId, assistantId, options);\n return _createRunDeserialize(result);\n}\n\n/** Creates a new run for an agent thread. */\nexport function createRun(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): AgentRunResponse {\n async function executeCreateRun(): Promise<ThreadRun> {\n return createRunInternal(context, threadId, assistantId, options);\n }\n\n return {\n then: function (onFulfilled, onRejected) {\n return executeCreateRun().then(onFulfilled, onRejected).catch(onRejected);\n },\n async stream(): Promise<AgentEventMessageStream> {\n return createRunStreaming(context, assistantId, threadId, options);\n },\n };\n}\n\n/** Creates a new run for an agent thread with polling */\nexport function createRunAndPoll(\n context: Client,\n threadId: string,\n assistantId: string,\n options: RunsCreateRunOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<ThreadRun>, ThreadRun> {\n return createPoller<ThreadRun>({\n initOperation: async () => {\n return createRunInternal(context, threadId, assistantId, options);\n },\n pollOperation: async (currentRun: ThreadRun) => {\n return getRun(context, threadId, currentRun.id, options);\n },\n getOperationStatus: getLroOperationStatus,\n getOperationError: (result: ThreadRun) => {\n return getLroOperationStatus(result) === \"failed\" && result.lastError\n ? new Error(`Operation failed: ${result.lastError.message}`)\n : undefined;\n },\n intervalInMs: options.pollingOptions?.intervalInMs,\n });\n}\n\nfunction getLroOperationStatus(result: ThreadRun): OperationStatus {\n switch (result.status) {\n case \"queued\":\n return \"notStarted\";\n case \"in_progress\":\n return \"running\";\n case \"requires_action\":\n return \"running\";\n case \"completed\":\n return \"succeeded\";\n case \"cancelled\":\n case \"expired\":\n default:\n return \"failed\";\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ToolDefinitionUnion, AgentsResponseFormatOption, ThreadMessageOptions, TruncationObject, AgentsToolChoiceOption, ListSortOrder, RunAdditionalFieldList } from "../../models/models.js";
|
|
2
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
3
|
-
import { PollingOptionsParams } from "../options.js";
|
|
1
|
+
import type { ToolDefinitionUnion, AgentsResponseFormatOption, ThreadMessageOptions, TruncationObject, AgentsToolChoiceOption, ListSortOrder, RunAdditionalFieldList } from "../../models/models.js";
|
|
2
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
3
|
+
import type { PollingOptionsParams } from "../options.js";
|
|
4
4
|
/** Optional parameters. */
|
|
5
5
|
export interface RunsCancelRunOptionalParams extends OperationOptions {
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/runs/options.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/runs/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,2BAA2B;AAC3B,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;CAAG;AAExE,2BAA2B;AAC3B,MAAM,WAAW,wCAAyC,SAAQ,gBAAgB;IAChF,sGAAsG;IACtG,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CACzB;AAED,2BAA2B;AAC3B,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED,2BAA2B;AAC3B,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;CAAG;AAErE,2BAA2B;AAC3B,MAAM,WAAW,0BAA2B,SAAQ,gBAAgB;IAClE,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oRAAoR;IACpR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0RAA0R;IAC1R,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,2BAA2B;AAC3B,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB,EAAE,oBAAoB;IACzF;;;;OAIG;IACH,OAAO,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACnC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,sFAAsF;IACtF,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,sEAAsE;IACtE,kBAAkB,CAAC,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;IACnD,wFAAwF;IACxF,KAAK,CAAC,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAC;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC7C,qEAAqE;IACrE,UAAU,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC3C,uDAAuD;IACvD,cAAc,CAAC,EAAE,0BAA0B,GAAG,IAAI,CAAC;IACnD,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/runs/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n ToolDefinitionUnion,\n AgentsResponseFormatOption,\n ThreadMessageOptions,\n TruncationObject,\n AgentsToolChoiceOption,\n ListSortOrder,\n RunAdditionalFieldList,\n} from \"../../models/models.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { PollingOptionsParams } from \"../options.js\";\n\n/** Optional parameters. */\nexport interface RunsCancelRunOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface RunsSubmitToolOutputsToRunOptionalParams extends OperationOptions {\n /** If true, returns a stream of events that happen during the Run as SSE, terminating at `[DONE]`. */\n stream?: boolean | null;\n}\n\n/** Optional parameters. */\nexport interface RunsUpdateRunOptionalParams extends OperationOptions {\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n\n/** Optional parameters. */\nexport interface RunsGetRunOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface RunsListRunsOptionalParams extends OperationOptions {\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\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 after?: string;\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 before?: string;\n}\n\n/** Optional parameters. */\nexport interface RunsCreateRunOptionalParams extends OperationOptions, PollingOptionsParams {\n /**\n * A list of additional fields to include in the response.\n * Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content`\n * to fetch the file search result content.\n */\n include?: RunAdditionalFieldList[];\n /** The overridden model name that the agent should use to run the thread. */\n model?: string | null;\n /** The overridden system instructions that the agent should use to run the thread. */\n instructions?: string | null;\n /**\n * Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior\n * on a per-run basis without overriding other instructions.\n */\n additionalInstructions?: string | null;\n /** Adds additional messages to the thread before creating the run. */\n additionalMessages?: ThreadMessageOptions[] | null;\n /** The overridden list of enabled tools that the agent should use to run the thread. */\n tools?: ToolDefinitionUnion[] | null;\n /**\n * If `true`, returns a stream of events that happen during the Run as server-sent events,\n * terminating when the Run enters a terminal state with a `data: [DONE]` message.\n */\n stream?: boolean;\n /**\n * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n * more random, while lower values like 0.2 will make it more focused and deterministic.\n */\n temperature?: number | null;\n /**\n * An alternative to sampling with temperature, called nucleus sampling, where the model\n * considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens\n * comprising the top 10% probability mass are considered.\n *\n * We generally recommend altering this or temperature but not both.\n */\n topP?: number | null;\n /**\n * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only\n * the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified,\n * the run will end with status `incomplete`. See `incomplete_details` for more info.\n */\n maxPromptTokens?: number | null;\n /**\n * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort\n * to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of\n * completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n */\n maxCompletionTokens?: number | null;\n /** The strategy to use for dropping messages as the context windows moves forward. */\n truncationStrategy?: TruncationObject | null;\n /** Controls whether or not and which tool is called by the model. */\n toolChoice?: AgentsToolChoiceOption | null;\n /** Specifies the format that the model must output. */\n responseFormat?: AgentsResponseFormatOption | null;\n /** If `true` functions will run in parallel during tool use. */\n parallelToolCalls?: boolean;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/runs/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ToolDefinitionUnion,\n AgentsResponseFormatOption,\n ThreadMessageOptions,\n TruncationObject,\n AgentsToolChoiceOption,\n ListSortOrder,\n RunAdditionalFieldList,\n} from \"../../models/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PollingOptionsParams } from \"../options.js\";\n\n/** Optional parameters. */\nexport interface RunsCancelRunOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface RunsSubmitToolOutputsToRunOptionalParams extends OperationOptions {\n /** If true, returns a stream of events that happen during the Run as SSE, terminating at `[DONE]`. */\n stream?: boolean | null;\n}\n\n/** Optional parameters. */\nexport interface RunsUpdateRunOptionalParams extends OperationOptions {\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n\n/** Optional parameters. */\nexport interface RunsGetRunOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface RunsListRunsOptionalParams extends OperationOptions {\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\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 after?: string;\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 before?: string;\n}\n\n/** Optional parameters. */\nexport interface RunsCreateRunOptionalParams extends OperationOptions, PollingOptionsParams {\n /**\n * A list of additional fields to include in the response.\n * Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content`\n * to fetch the file search result content.\n */\n include?: RunAdditionalFieldList[];\n /** The overridden model name that the agent should use to run the thread. */\n model?: string | null;\n /** The overridden system instructions that the agent should use to run the thread. */\n instructions?: string | null;\n /**\n * Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior\n * on a per-run basis without overriding other instructions.\n */\n additionalInstructions?: string | null;\n /** Adds additional messages to the thread before creating the run. */\n additionalMessages?: ThreadMessageOptions[] | null;\n /** The overridden list of enabled tools that the agent should use to run the thread. */\n tools?: ToolDefinitionUnion[] | null;\n /**\n * If `true`, returns a stream of events that happen during the Run as server-sent events,\n * terminating when the Run enters a terminal state with a `data: [DONE]` message.\n */\n stream?: boolean;\n /**\n * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output\n * more random, while lower values like 0.2 will make it more focused and deterministic.\n */\n temperature?: number | null;\n /**\n * An alternative to sampling with temperature, called nucleus sampling, where the model\n * considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens\n * comprising the top 10% probability mass are considered.\n *\n * We generally recommend altering this or temperature but not both.\n */\n topP?: number | null;\n /**\n * The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only\n * the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified,\n * the run will end with status `incomplete`. See `incomplete_details` for more info.\n */\n maxPromptTokens?: number | null;\n /**\n * The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort\n * to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of\n * completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n */\n maxCompletionTokens?: number | null;\n /** The strategy to use for dropping messages as the context windows moves forward. */\n truncationStrategy?: TruncationObject | null;\n /** Controls whether or not and which tool is called by the model. */\n toolChoice?: AgentsToolChoiceOption | null;\n /** Specifies the format that the model must output. */\n responseFormat?: AgentsResponseFormatOption | null;\n /** If `true` functions will run in parallel during tool use. */\n parallelToolCalls?: boolean;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/threads/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/threads/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAIL,WAAW,EAEX,6BAA6B,EAE7B,oBAAoB,EAErB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,8BAA8B,EAC9B,gCAAgC,EAChC,iCAAiC,EAClC,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,yBAAyB,CAAC;AAEjC,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iCAA0D,GAClE,gBAAgB,CAkBlB;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAS/B;AAED,kCAAkC;AAClC,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iCAA0D,GAClE,OAAO,CAAC,oBAAoB,CAAC,CAG/B;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,iCAA0D,GAClE,gBAAgB,CAyBlB;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,GAC5B,OAA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3
|
-
import { toolResourcesSerializer, threadMessageOptionsArraySerializer, agentThreadDeserializer, _agentsPagedResultAgentThreadDeserializer, threadDeletionStatusDeserializer, } from "../../models/models.js";
|
|
3
|
+
import { toolResourcesSerializer, agentV1ErrorDeserializer, threadMessageOptionsArraySerializer, agentThreadDeserializer, _agentsPagedResultAgentThreadDeserializer, threadDeletionStatusDeserializer, } from "../../models/models.js";
|
|
4
4
|
import { buildPagedAsyncIterator, } from "../../static-helpers/pagingHelpers.js";
|
|
5
5
|
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
|
|
6
6
|
import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
|
|
@@ -17,7 +17,9 @@ export function _deleteThreadSend(context, threadId, options = { requestOptions:
|
|
|
17
17
|
export async function _deleteThreadDeserialize(result) {
|
|
18
18
|
const expectedStatuses = ["200"];
|
|
19
19
|
if (!expectedStatuses.includes(result.status)) {
|
|
20
|
-
|
|
20
|
+
const error = createRestError(result);
|
|
21
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
22
|
+
throw error;
|
|
21
23
|
}
|
|
22
24
|
return threadDeletionStatusDeserializer(result.body);
|
|
23
25
|
}
|
|
@@ -44,7 +46,9 @@ export function _updateThreadSend(context, threadId, options = { requestOptions:
|
|
|
44
46
|
export async function _updateThreadDeserialize(result) {
|
|
45
47
|
const expectedStatuses = ["200"];
|
|
46
48
|
if (!expectedStatuses.includes(result.status)) {
|
|
47
|
-
|
|
49
|
+
const error = createRestError(result);
|
|
50
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
51
|
+
throw error;
|
|
48
52
|
}
|
|
49
53
|
return agentThreadDeserializer(result.body);
|
|
50
54
|
}
|
|
@@ -66,7 +70,9 @@ export function _getThreadSend(context, threadId, options = { requestOptions: {}
|
|
|
66
70
|
export async function _getThreadDeserialize(result) {
|
|
67
71
|
const expectedStatuses = ["200"];
|
|
68
72
|
if (!expectedStatuses.includes(result.status)) {
|
|
69
|
-
|
|
73
|
+
const error = createRestError(result);
|
|
74
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
75
|
+
throw error;
|
|
70
76
|
}
|
|
71
77
|
return agentThreadDeserializer(result.body);
|
|
72
78
|
}
|
|
@@ -91,7 +97,9 @@ export function _listThreadsSend(context, options = { requestOptions: {} }) {
|
|
|
91
97
|
export async function _listThreadsDeserialize(result) {
|
|
92
98
|
const expectedStatuses = ["200"];
|
|
93
99
|
if (!expectedStatuses.includes(result.status)) {
|
|
94
|
-
|
|
100
|
+
const error = createRestError(result);
|
|
101
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
102
|
+
throw error;
|
|
95
103
|
}
|
|
96
104
|
return _agentsPagedResultAgentThreadDeserializer(result.body);
|
|
97
105
|
}
|
|
@@ -119,7 +127,9 @@ export function _createThreadSend(context, options = { requestOptions: {} }) {
|
|
|
119
127
|
export async function _createThreadDeserialize(result) {
|
|
120
128
|
const expectedStatuses = ["200"];
|
|
121
129
|
if (!expectedStatuses.includes(result.status)) {
|
|
122
|
-
|
|
130
|
+
const error = createRestError(result);
|
|
131
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
132
|
+
throw error;
|
|
123
133
|
}
|
|
124
134
|
return agentThreadDeserializer(result.body);
|
|
125
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/threads/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,uBAAuB,EACvB,mCAAmC,EAEnC,uBAAuB,EAEvB,yCAAyC,EAEzC,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,iBAAiB,C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,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAe,EACf,UAA6C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEnE,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AgentsContext as Client } from \"../index.js\";\nimport {\n toolResourcesSerializer,\n threadMessageOptionsArraySerializer,\n AgentThread,\n agentThreadDeserializer,\n _AgentsPagedResultAgentThread,\n _agentsPagedResultAgentThreadDeserializer,\n ThreadDeletionStatus,\n threadDeletionStatusDeserializer,\n} from \"../../models/models.js\";\nimport {\n ThreadsDeleteThreadOptionalParams,\n ThreadsUpdateThreadOptionalParams,\n ThreadsGetThreadOptionalParams,\n ThreadsListThreadsOptionalParams,\n ThreadsCreateThreadOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _deleteThreadSend(\n context: Client,\n threadId: string,\n options: ThreadsDeleteThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}{?api%2Dversion}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteThreadDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadDeletionStatus> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return threadDeletionStatusDeserializer(result.body);\n}\n\n/** Deletes an existing thread. */\nexport async function deleteThread(\n context: Client,\n threadId: string,\n options: ThreadsDeleteThreadOptionalParams = { requestOptions: {} },\n): Promise<ThreadDeletionStatus> {\n const result = await _deleteThreadSend(context, threadId, options);\n return _deleteThreadDeserialize(result);\n}\n\nexport function _updateThreadSend(\n context: Client,\n threadId: string,\n options: ThreadsUpdateThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}{?api%2Dversion}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n tool_resources: !options?.toolResources\n ? options?.toolResources\n : toolResourcesSerializer(options?.toolResources),\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _updateThreadDeserialize(\n result: PathUncheckedResponse,\n): Promise<AgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return agentThreadDeserializer(result.body);\n}\n\n/** Modifies an existing thread. */\nexport async function updateThread(\n context: Client,\n threadId: string,\n options: ThreadsUpdateThreadOptionalParams = { requestOptions: {} },\n): Promise<AgentThread> {\n const result = await _updateThreadSend(context, threadId, options);\n return _updateThreadDeserialize(result);\n}\n\nexport function _getThreadSend(\n context: Client,\n threadId: string,\n options: ThreadsGetThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}{?api%2Dversion}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getThreadDeserialize(result: PathUncheckedResponse): Promise<AgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return agentThreadDeserializer(result.body);\n}\n\n/** Gets information about an existing thread. */\nexport async function getThread(\n context: Client,\n threadId: string,\n options: ThreadsGetThreadOptionalParams = { requestOptions: {} },\n): Promise<AgentThread> {\n const result = await _getThreadSend(context, threadId, options);\n return _getThreadDeserialize(result);\n}\n\nexport function _listThreadsSend(\n context: Client,\n options: ThreadsListThreadsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads{?api%2Dversion,limit,order,after,before}\",\n {\n \"api%2Dversion\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listThreadsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultAgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _agentsPagedResultAgentThreadDeserializer(result.body);\n}\n\n/** Gets a list of threads that were previously created. */\nexport function listThreads(\n context: Client,\n options: ThreadsListThreadsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<AgentThread> {\n return buildPagedAsyncIterator(\n context,\n () => _listThreadsSend(context, options),\n _listThreadsDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _createThreadSend(\n context: Client,\n options: ThreadsCreateThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n messages: !options?.messages\n ? options?.messages\n : threadMessageOptionsArraySerializer(options?.messages),\n tool_resources: !options?.toolResources\n ? options?.toolResources\n : toolResourcesSerializer(options?.toolResources),\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _createThreadDeserialize(\n result: PathUncheckedResponse,\n): Promise<AgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return agentThreadDeserializer(result.body);\n}\n\n/** Creates a new thread. Threads contain messages and can be run by agents. */\nexport async function createThread(\n context: Client,\n options: ThreadsCreateThreadOptionalParams = { requestOptions: {} },\n): Promise<AgentThread> {\n const result = await _createThreadSend(context, options);\n return _createThreadDeserialize(result);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/threads/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,mCAAmC,EAEnC,uBAAuB,EAEvB,yCAAyC,EAEzC,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,iBAAiB,CAC/B,OAAe,EACf,QAAgB,EAChB,UAA6C,EAAE,cAAc,EAAE,EAAE,EAAE;;IAEnE,MAAM,IAA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,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC;YACnD,QAAQ,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ;SAC5B,IACD,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,wBAAwB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACtD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,uBAAuB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAED,+EAA+E;AAC/E,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,OAAe,EACf,UAA6C,EAAE,cAAc,EAAE,EAAE,EAAE;IAEnE,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzD,OAAO,wBAAwB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AgentsContext as Client } from \"../index.js\";\nimport {\n toolResourcesSerializer,\n agentV1ErrorDeserializer,\n threadMessageOptionsArraySerializer,\n AgentThread,\n agentThreadDeserializer,\n _AgentsPagedResultAgentThread,\n _agentsPagedResultAgentThreadDeserializer,\n ThreadDeletionStatus,\n threadDeletionStatusDeserializer,\n} from \"../../models/models.js\";\nimport {\n ThreadsDeleteThreadOptionalParams,\n ThreadsUpdateThreadOptionalParams,\n ThreadsGetThreadOptionalParams,\n ThreadsListThreadsOptionalParams,\n ThreadsCreateThreadOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _deleteThreadSend(\n context: Client,\n threadId: string,\n options: ThreadsDeleteThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}{?api%2Dversion}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).delete({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _deleteThreadDeserialize(\n result: PathUncheckedResponse,\n): Promise<ThreadDeletionStatus> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return threadDeletionStatusDeserializer(result.body);\n}\n\n/** Deletes an existing thread. */\nexport async function deleteThread(\n context: Client,\n threadId: string,\n options: ThreadsDeleteThreadOptionalParams = { requestOptions: {} },\n): Promise<ThreadDeletionStatus> {\n const result = await _deleteThreadSend(context, threadId, options);\n return _deleteThreadDeserialize(result);\n}\n\nexport function _updateThreadSend(\n context: Client,\n threadId: string,\n options: ThreadsUpdateThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}{?api%2Dversion}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n tool_resources: !options?.toolResources\n ? options?.toolResources\n : toolResourcesSerializer(options?.toolResources),\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _updateThreadDeserialize(\n result: PathUncheckedResponse,\n): Promise<AgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return agentThreadDeserializer(result.body);\n}\n\n/** Modifies an existing thread. */\nexport async function updateThread(\n context: Client,\n threadId: string,\n options: ThreadsUpdateThreadOptionalParams = { requestOptions: {} },\n): Promise<AgentThread> {\n const result = await _updateThreadSend(context, threadId, options);\n return _updateThreadDeserialize(result);\n}\n\nexport function _getThreadSend(\n context: Client,\n threadId: string,\n options: ThreadsGetThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads/{threadId}{?api%2Dversion}\",\n {\n threadId: threadId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getThreadDeserialize(result: PathUncheckedResponse): Promise<AgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return agentThreadDeserializer(result.body);\n}\n\n/** Gets information about an existing thread. */\nexport async function getThread(\n context: Client,\n threadId: string,\n options: ThreadsGetThreadOptionalParams = { requestOptions: {} },\n): Promise<AgentThread> {\n const result = await _getThreadSend(context, threadId, options);\n return _getThreadDeserialize(result);\n}\n\nexport function _listThreadsSend(\n context: Client,\n options: ThreadsListThreadsOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads{?api%2Dversion,limit,order,after,before}\",\n {\n \"api%2Dversion\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listThreadsDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultAgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return _agentsPagedResultAgentThreadDeserializer(result.body);\n}\n\n/** Gets a list of threads that were previously created. */\nexport function listThreads(\n context: Client,\n options: ThreadsListThreadsOptionalParams = { requestOptions: {} },\n): PagedAsyncIterableIterator<AgentThread> {\n return buildPagedAsyncIterator(\n context,\n () => _listThreadsSend(context, options),\n _listThreadsDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _createThreadSend(\n context: Client,\n options: ThreadsCreateThreadOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/threads{?api%2Dversion}\",\n {\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: {\n messages: !options?.messages\n ? options?.messages\n : threadMessageOptionsArraySerializer(options?.messages),\n tool_resources: !options?.toolResources\n ? options?.toolResources\n : toolResourcesSerializer(options?.toolResources),\n metadata: options?.metadata,\n },\n });\n}\n\nexport async function _createThreadDeserialize(\n result: PathUncheckedResponse,\n): Promise<AgentThread> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return agentThreadDeserializer(result.body);\n}\n\n/** Creates a new thread. Threads contain messages and can be run by agents. */\nexport async function createThread(\n context: Client,\n options: ThreadsCreateThreadOptionalParams = { requestOptions: {} },\n): Promise<AgentThread> {\n const result = await _createThreadSend(context, options);\n return _createThreadDeserialize(result);\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ToolResources, ThreadMessageOptions, ListSortOrder } from "../../models/models.js";
|
|
2
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
1
|
+
import type { ToolResources, ThreadMessageOptions, ListSortOrder } from "../../models/models.js";
|
|
2
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
3
3
|
/** Optional parameters. */
|
|
4
4
|
export interface ThreadsDeleteThreadOptionalParams extends OperationOptions {
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/threads/options.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/threads/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACjG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,2BAA2B;AAC3B,MAAM,WAAW,iCAAkC,SAAQ,gBAAgB;CAAG;AAE9E,2BAA2B;AAC3B,MAAM,WAAW,iCAAkC,SAAQ,gBAAgB;IACzE;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C;AAED,2BAA2B;AAC3B,MAAM,WAAW,8BAA+B,SAAQ,gBAAgB;CAAG;AAE3E,2BAA2B;AAC3B,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB;IACxE,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oRAAoR;IACpR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0RAA0R;IAC1R,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,2BAA2B;AAC3B,MAAM,WAAW,iCAAkC,SAAQ,gBAAgB;IACzE,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,yPAAyP;IACzP,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/threads/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ToolResources, ThreadMessageOptions, ListSortOrder } from \"../../models/models.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface ThreadsDeleteThreadOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ThreadsUpdateThreadOptionalParams extends OperationOptions {\n /**\n * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\n * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\n * a list of vector store IDs\n */\n toolResources?: ToolResources | null;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n\n/** Optional parameters. */\nexport interface ThreadsGetThreadOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ThreadsListThreadsOptionalParams extends OperationOptions {\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\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 after?: string;\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 before?: string;\n}\n\n/** Optional parameters. */\nexport interface ThreadsCreateThreadOptionalParams extends OperationOptions {\n /** The initial messages to associate with the new thread. */\n messages?: ThreadMessageOptions[];\n /**\n * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\n * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\n * a list of vector store IDs.\n */\n toolResources?: ToolResources | null;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/threads/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ToolResources, ThreadMessageOptions, ListSortOrder } from \"../../models/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface ThreadsDeleteThreadOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ThreadsUpdateThreadOptionalParams extends OperationOptions {\n /**\n * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\n * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\n * a list of vector store IDs\n */\n toolResources?: ToolResources | null;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n\n/** Optional parameters. */\nexport interface ThreadsGetThreadOptionalParams extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface ThreadsListThreadsOptionalParams extends OperationOptions {\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\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 after?: string;\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 before?: string;\n}\n\n/** Optional parameters. */\nexport interface ThreadsCreateThreadOptionalParams extends OperationOptions {\n /** The initial messages to associate with the new thread. */\n messages?: ThreadMessageOptions[];\n /**\n * A set of resources that are made available to the agent's tools in this thread. The resources are specific to the\n * type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires\n * a list of vector store IDs.\n */\n toolResources?: ToolResources | null;\n /** A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. */\n metadata?: Record<string, string> | null;\n}\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AgentsContext as Client } from "../index.js";
|
|
2
|
-
import { _AgentsPagedResultVectorStoreFile, VectorStoreFileBatch } from "../../models/models.js";
|
|
3
|
-
import { VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams, VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams, VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams, VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams } from "./options.js";
|
|
4
|
-
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
-
import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
6
|
-
import { OperationState, PollerLike } from "@azure/core-lro";
|
|
1
|
+
import type { AgentsContext as Client } from "../index.js";
|
|
2
|
+
import type { _AgentsPagedResultVectorStoreFile, VectorStoreFileBatch } from "../../models/models.js";
|
|
3
|
+
import type { VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams, VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams, VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams, VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams } from "./options.js";
|
|
4
|
+
import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
|
+
import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
6
|
+
import type { OperationState, PollerLike } from "@azure/core-lro";
|
|
7
7
|
export declare function _listVectorStoreFileBatchFilesSend(context: Client, vectorStoreId: string, batchId: string, options?: VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams): StreamableMethod;
|
|
8
8
|
export declare function _listVectorStoreFileBatchFilesDeserialize(result: PathUncheckedResponse): Promise<_AgentsPagedResultVectorStoreFile>;
|
|
9
9
|
/** Returns a list of vector store files in a batch. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/operations.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EACV,iCAAiC,EACjC,oBAAoB,EACrB,MAAM,wBAAwB,C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ACA,gBAAgB,CAmBlB;AAED,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAS/B;AAED,0CAA0C;AAC1C,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,2DAER,GACA,OAAO,CAAC,oBAAoB,CAAC,CAG/B;AAED,wBAAgB,+BAA+B,CAC7C,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,8DAER,GACA,gBAAgB,CA6BlB;AAED,wBAAsB,sCAAsC,CAC1D,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAS/B;AAED,wCAAwC;AACxC,wBAAsB,kCAAkC,CACtD,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,8DAER,GACA,OAAO,CAAC,oBAAoB,CAAC,CAG/B;AAED,wCAAwC;AACxC,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,8DAAuF,GAC/F,UAAU,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,CAWxE;AAED,iDAAiD;AACjD,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,OAAO,GAAE,8DAAuF,GAC/F,UAAU,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC,CAWxE"}
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { vectorStoreDataSourceArraySerializer, vectorStoreChunkingStrategyRequestUnionSerializer, _agentsPagedResultVectorStoreFileDeserializer, vectorStoreFileBatchDeserializer, } from "../../models/models.js";
|
|
4
|
-
import { buildPagedAsyncIterator
|
|
3
|
+
import { vectorStoreDataSourceArraySerializer, agentV1ErrorDeserializer, vectorStoreChunkingStrategyRequestUnionSerializer, _agentsPagedResultVectorStoreFileDeserializer, vectorStoreFileBatchDeserializer, } from "../../models/models.js";
|
|
4
|
+
import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
5
|
import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
|
|
6
|
-
import { createRestError, operationOptionsToRequestParameters
|
|
6
|
+
import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client";
|
|
7
7
|
import { createPoller } from "../poller.js";
|
|
8
8
|
export function _listVectorStoreFileBatchFilesSend(context, vectorStoreId, batchId, options = {
|
|
9
9
|
requestOptions: {},
|
|
10
10
|
}) {
|
|
11
|
-
var _a;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
var _a, _b;
|
|
12
|
+
const path = expandUrlTemplate("/vector_stores/{vectorStoreId}/file_batches/{batchId}/files{?filter,api%2Dversion,limit,order,after,before}", {
|
|
13
|
+
vectorStoreId: vectorStoreId,
|
|
14
|
+
batchId: batchId,
|
|
15
|
+
filter: options === null || options === void 0 ? void 0 : options.filter,
|
|
16
|
+
"api%2Dversion": context.apiVersion,
|
|
17
|
+
limit: options === null || options === void 0 ? void 0 : options.limit,
|
|
18
|
+
order: options === null || options === void 0 ? void 0 : options.order,
|
|
19
|
+
after: options === null || options === void 0 ? void 0 : options.after,
|
|
20
|
+
before: options === null || options === void 0 ? void 0 : options.before,
|
|
21
|
+
}, {
|
|
22
|
+
allowReserved: (_a = options === null || options === void 0 ? void 0 : options.requestOptions) === null || _a === void 0 ? void 0 : _a.skipUrlEncoding,
|
|
23
|
+
});
|
|
24
|
+
return context.path(path).get(Object.assign(Object.assign({}, operationOptionsToRequestParameters(options)), { headers: Object.assign({ accept: "application/json" }, (_b = options.requestOptions) === null || _b === void 0 ? void 0 : _b.headers) }));
|
|
15
25
|
}
|
|
16
26
|
export async function _listVectorStoreFileBatchFilesDeserialize(result) {
|
|
17
27
|
const expectedStatuses = ["200"];
|
|
18
28
|
if (!expectedStatuses.includes(result.status)) {
|
|
19
|
-
|
|
29
|
+
const error = createRestError(result);
|
|
30
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
31
|
+
throw error;
|
|
20
32
|
}
|
|
21
33
|
return _agentsPagedResultVectorStoreFileDeserializer(result.body);
|
|
22
34
|
}
|
|
@@ -42,7 +54,9 @@ export function _cancelVectorStoreFileBatchSend(context, vectorStoreId, batchId,
|
|
|
42
54
|
export async function _cancelVectorStoreFileBatchDeserialize(result) {
|
|
43
55
|
const expectedStatuses = ["200"];
|
|
44
56
|
if (!expectedStatuses.includes(result.status)) {
|
|
45
|
-
|
|
57
|
+
const error = createRestError(result);
|
|
58
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
59
|
+
throw error;
|
|
46
60
|
}
|
|
47
61
|
return vectorStoreFileBatchDeserializer(result.body);
|
|
48
62
|
}
|
|
@@ -69,7 +83,9 @@ export function _getVectorStoreFileBatchSend(context, vectorStoreId, batchId, op
|
|
|
69
83
|
export async function _getVectorStoreFileBatchDeserialize(result) {
|
|
70
84
|
const expectedStatuses = ["200"];
|
|
71
85
|
if (!expectedStatuses.includes(result.status)) {
|
|
72
|
-
|
|
86
|
+
const error = createRestError(result);
|
|
87
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
88
|
+
throw error;
|
|
73
89
|
}
|
|
74
90
|
return vectorStoreFileBatchDeserializer(result.body);
|
|
75
91
|
}
|
|
@@ -107,7 +123,9 @@ export function _createVectorStoreFileBatchSend(context, vectorStoreId, options
|
|
|
107
123
|
export async function _createVectorStoreFileBatchDeserialize(result) {
|
|
108
124
|
const expectedStatuses = ["200"];
|
|
109
125
|
if (!expectedStatuses.includes(result.status)) {
|
|
110
|
-
|
|
126
|
+
const error = createRestError(result);
|
|
127
|
+
error.details = agentV1ErrorDeserializer(result.body);
|
|
128
|
+
throw error;
|
|
111
129
|
}
|
|
112
130
|
return vectorStoreFileBatchDeserializer(result.body);
|
|
113
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,oCAAoC,EACpC,iDAAiD,EAEjD,6CAA6C,EAE7C,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EAEL,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,MAAM,UAAU,kCAAkC,CAChD,OAAe,EACf,aAAqB,EACrB,OAAe,EACf,UAA6E;IAC3E,cAAc,EAAE,EAAE;CACnB;;IAED,OAAO,OAAO;SACX,IAAI,CAAC,6DAA6D,EAAE,aAAa,EAAE,OAAO,CAAC;SAC3F,GAAG,iCACC,mCAAmC,CAAC,OAAO,CAAC,KAC/C,OAAO,kBACL,MAAM,EAAE,kBAAkB,IACvB,MAAA,OAAO,CAAC,cAAc,0CAAE,OAAO,KAEpC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,yCAAyC,CAC7D,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,6CAA6C,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,6BAA6B,CAC3C,OAAe,EACf,a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,cAAc,0CAAE,YAAY;KACnD,CAAC,CAAC;AACL,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,iCAAiC,CAC/C,OAAe,EACf,aAAqB,EACrB,UAA0E,EAAE,cAAc,EAAE,EAAE,EAAE;;IAEhG,OAAO,YAAY,CAAuB;QACxC,aAAa,EAAE,KAAK,IAAI,EAAE;YACxB,OAAO,kCAAkC,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAC7E,CAAC;QACD,aAAa,EAAE,KAAK,EAAE,aAAmC,EAAE,EAAE;YAC3D,OAAO,uBAAuB,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACpF,CAAC;QACD,kBAAkB,EAAE,qBAAqB;QACzC,YAAY,EAAE,MAAA,OAAO,CAAC,cAAc,0CAAE,YAAY;KACnD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,MAA4B;IACzD,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,aAAa;YAChB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB,KAAK,WAAW;YACd,OAAO,UAAU,CAAC;QACpB;YACE,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AgentsContext as Client } from \"../index.js\";\nimport {\n vectorStoreDataSourceArraySerializer,\n vectorStoreChunkingStrategyRequestUnionSerializer,\n _AgentsPagedResultVectorStoreFile,\n _agentsPagedResultVectorStoreFileDeserializer,\n VectorStoreFileBatch,\n vectorStoreFileBatchDeserializer,\n} from \"../../models/models.js\";\nimport {\n VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams,\n VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams,\n VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams,\n VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams,\n} from \"./options.js\";\nimport {\n PagedAsyncIterableIterator,\n buildPagedAsyncIterator,\n} from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\nimport { OperationState, OperationStatus, PollerLike } from \"@azure/core-lro\";\nimport { createPoller } from \"../poller.js\";\n\nexport function _listVectorStoreFileBatchFilesSend(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n return context\n .path(\"/vector_stores/{vectorStoreId}/file_batches/{batchId}/files\", vectorStoreId, batchId)\n .get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listVectorStoreFileBatchFilesDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultVectorStoreFile> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return _agentsPagedResultVectorStoreFileDeserializer(result.body);\n}\n\n/** Returns a list of vector store files in a batch. */\nexport function listVectorStoreFileBatchFiles(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<VectorStoreFileBatch> {\n return buildPagedAsyncIterator(\n context,\n () => _listVectorStoreFileBatchFilesSend(context, vectorStoreId, batchId, options),\n _listVectorStoreFileBatchFilesDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _cancelVectorStoreFileBatchSend(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel{?api%2Dversion}\",\n {\n vectorStoreId: vectorStoreId,\n batchId: batchId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _cancelVectorStoreFileBatchDeserialize(\n result: PathUncheckedResponse,\n): Promise<VectorStoreFileBatch> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return vectorStoreFileBatchDeserializer(result.body);\n}\n\n/** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */\nexport async function cancelVectorStoreFileBatch(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): Promise<VectorStoreFileBatch> {\n const result = await _cancelVectorStoreFileBatchSend(context, vectorStoreId, batchId, options);\n return _cancelVectorStoreFileBatchDeserialize(result);\n}\n\nexport function _getVectorStoreFileBatchSend(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches/{batchId}{?api%2Dversion}\",\n {\n vectorStoreId: vectorStoreId,\n batchId: batchId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getVectorStoreFileBatchDeserialize(\n result: PathUncheckedResponse,\n): Promise<VectorStoreFileBatch> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return vectorStoreFileBatchDeserializer(result.body);\n}\n\n/** Retrieve a vector store file batch. */\nexport async function getVectorStoreFileBatch(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): Promise<VectorStoreFileBatch> {\n const result = await _getVectorStoreFileBatchSend(context, vectorStoreId, batchId, options);\n return _getVectorStoreFileBatchDeserialize(result);\n}\n\nexport function _createVectorStoreFileBatchSend(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches{?api%2Dversion}\",\n {\n vectorStoreId: vectorStoreId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: {\n file_ids: !options?.fileIds\n ? options?.fileIds\n : options?.fileIds.map((p: any) => {\n return p;\n }),\n data_sources: !options?.dataSources\n ? options?.dataSources\n : vectorStoreDataSourceArraySerializer(options?.dataSources),\n chunking_strategy: !options?.chunkingStrategy\n ? options?.chunkingStrategy\n : vectorStoreChunkingStrategyRequestUnionSerializer(options?.chunkingStrategy),\n },\n });\n}\n\nexport async function _createVectorStoreFileBatchDeserialize(\n result: PathUncheckedResponse,\n): Promise<VectorStoreFileBatch> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n throw createRestError(result);\n }\n\n return vectorStoreFileBatchDeserializer(result.body);\n}\n\n/** Create a vector store file batch. */\nexport async function createVectorStoreFileBatchInternal(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): Promise<VectorStoreFileBatch> {\n const result = await _createVectorStoreFileBatchSend(context, vectorStoreId, options);\n return _createVectorStoreFileBatchDeserialize(result);\n}\n/** Create a vector store file batch. */\nexport function createVectorStoreFileBatch(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<VectorStoreFileBatch>, VectorStoreFileBatch> {\n return createPoller<VectorStoreFileBatch>({\n initOperation: async () => {\n return createVectorStoreFileBatchInternal(context, vectorStoreId, options);\n },\n pollOperation: async (currentResult: VectorStoreFileBatch) => {\n return getVectorStoreFileBatch(context, vectorStoreId, currentResult.id, options);\n },\n getOperationStatus: getLroOperationStatus,\n intervalInMs: options.pollingOptions?.intervalInMs,\n });\n}\n\n/** Create a vector store file batch and poll. */\nexport function createVectorStoreFileBatchAndPoll(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<VectorStoreFileBatch>, VectorStoreFileBatch> {\n return createPoller<VectorStoreFileBatch>({\n initOperation: async () => {\n return createVectorStoreFileBatchInternal(context, vectorStoreId, options);\n },\n pollOperation: async (currentResult: VectorStoreFileBatch) => {\n return getVectorStoreFileBatch(context, vectorStoreId, currentResult.id, options);\n },\n getOperationStatus: getLroOperationStatus,\n intervalInMs: options.pollingOptions?.intervalInMs,\n });\n}\n\nfunction getLroOperationStatus(result: VectorStoreFileBatch): OperationStatus {\n switch (result.status) {\n case \"in_progress\":\n return \"running\";\n case \"completed\":\n return \"succeeded\";\n case \"cancelled\":\n return \"canceled\";\n default:\n return \"failed\";\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EACL,oCAAoC,EACpC,wBAAwB,EACxB,iDAAiD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,cAAc,0CAAE,YAAY;KACnD,CAAC,CAAC;AACL,CAAC;AAED,SAAS,qBAAqB,CAAC,MAA4B;IACzD,QAAQ,MAAM,CAAC,MAAM,EAAE,CAAC;QACtB,KAAK,aAAa;YAChB,OAAO,SAAS,CAAC;QACnB,KAAK,WAAW;YACd,OAAO,WAAW,CAAC;QACrB,KAAK,WAAW;YACd,OAAO,UAAU,CAAC;QACpB;YACE,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AgentsContext as Client } from \"../index.js\";\nimport type {\n _AgentsPagedResultVectorStoreFile,\n VectorStoreFileBatch,\n} from \"../../models/models.js\";\nimport {\n vectorStoreDataSourceArraySerializer,\n agentV1ErrorDeserializer,\n vectorStoreChunkingStrategyRequestUnionSerializer,\n _agentsPagedResultVectorStoreFileDeserializer,\n vectorStoreFileBatchDeserializer,\n} from \"../../models/models.js\";\nimport type {\n VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams,\n VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams,\n VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams,\n VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams,\n} from \"./options.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { buildPagedAsyncIterator } from \"../../static-helpers/pagingHelpers.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport type { StreamableMethod, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError, operationOptionsToRequestParameters } from \"@azure-rest/core-client\";\nimport type { OperationState, OperationStatus, PollerLike } from \"@azure/core-lro\";\nimport { createPoller } from \"../poller.js\";\n\nexport function _listVectorStoreFileBatchFilesSend(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches/{batchId}/files{?filter,api%2Dversion,limit,order,after,before}\",\n {\n vectorStoreId: vectorStoreId,\n batchId: batchId,\n filter: options?.filter,\n \"api%2Dversion\": context.apiVersion,\n limit: options?.limit,\n order: options?.order,\n after: options?.after,\n before: options?.before,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _listVectorStoreFileBatchFilesDeserialize(\n result: PathUncheckedResponse,\n): Promise<_AgentsPagedResultVectorStoreFile> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return _agentsPagedResultVectorStoreFileDeserializer(result.body);\n}\n\n/** Returns a list of vector store files in a batch. */\nexport function listVectorStoreFileBatchFiles(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams = {\n requestOptions: {},\n },\n): PagedAsyncIterableIterator<VectorStoreFileBatch> {\n return buildPagedAsyncIterator(\n context,\n () => _listVectorStoreFileBatchFilesSend(context, vectorStoreId, batchId, options),\n _listVectorStoreFileBatchFilesDeserialize,\n [\"200\"],\n { itemName: \"data\" },\n );\n}\n\nexport function _cancelVectorStoreFileBatchSend(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches/{batchId}/cancel{?api%2Dversion}\",\n {\n vectorStoreId: vectorStoreId,\n batchId: batchId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _cancelVectorStoreFileBatchDeserialize(\n result: PathUncheckedResponse,\n): Promise<VectorStoreFileBatch> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return vectorStoreFileBatchDeserializer(result.body);\n}\n\n/** Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. */\nexport async function cancelVectorStoreFileBatch(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): Promise<VectorStoreFileBatch> {\n const result = await _cancelVectorStoreFileBatchSend(context, vectorStoreId, batchId, options);\n return _cancelVectorStoreFileBatchDeserialize(result);\n}\n\nexport function _getVectorStoreFileBatchSend(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches/{batchId}{?api%2Dversion}\",\n {\n vectorStoreId: vectorStoreId,\n batchId: batchId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).get({\n ...operationOptionsToRequestParameters(options),\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n });\n}\n\nexport async function _getVectorStoreFileBatchDeserialize(\n result: PathUncheckedResponse,\n): Promise<VectorStoreFileBatch> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return vectorStoreFileBatchDeserializer(result.body);\n}\n\n/** Retrieve a vector store file batch. */\nexport async function getVectorStoreFileBatch(\n context: Client,\n vectorStoreId: string,\n batchId: string,\n options: VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): Promise<VectorStoreFileBatch> {\n const result = await _getVectorStoreFileBatchSend(context, vectorStoreId, batchId, options);\n return _getVectorStoreFileBatchDeserialize(result);\n}\n\nexport function _createVectorStoreFileBatchSend(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/vector_stores/{vectorStoreId}/file_batches{?api%2Dversion}\",\n {\n vectorStoreId: vectorStoreId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: { accept: \"application/json\", ...options.requestOptions?.headers },\n body: {\n file_ids: !options?.fileIds\n ? options?.fileIds\n : options?.fileIds.map((p: any) => {\n return p;\n }),\n data_sources: !options?.dataSources\n ? options?.dataSources\n : vectorStoreDataSourceArraySerializer(options?.dataSources),\n chunking_strategy: !options?.chunkingStrategy\n ? options?.chunkingStrategy\n : vectorStoreChunkingStrategyRequestUnionSerializer(options?.chunkingStrategy),\n },\n });\n}\n\nexport async function _createVectorStoreFileBatchDeserialize(\n result: PathUncheckedResponse,\n): Promise<VectorStoreFileBatch> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = agentV1ErrorDeserializer(result.body);\n throw error;\n }\n\n return vectorStoreFileBatchDeserializer(result.body);\n}\n\n/** Create a vector store file batch. */\nexport async function createVectorStoreFileBatchInternal(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = {\n requestOptions: {},\n },\n): Promise<VectorStoreFileBatch> {\n const result = await _createVectorStoreFileBatchSend(context, vectorStoreId, options);\n return _createVectorStoreFileBatchDeserialize(result);\n}\n\n/** Create a vector store file batch. */\nexport function createVectorStoreFileBatch(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<VectorStoreFileBatch>, VectorStoreFileBatch> {\n return createPoller<VectorStoreFileBatch>({\n initOperation: async () => {\n return createVectorStoreFileBatchInternal(context, vectorStoreId, options);\n },\n pollOperation: async (currentResult: VectorStoreFileBatch) => {\n return getVectorStoreFileBatch(context, vectorStoreId, currentResult.id, options);\n },\n getOperationStatus: getLroOperationStatus,\n intervalInMs: options.pollingOptions?.intervalInMs,\n });\n}\n\n/** Create a vector store file batch and poll. */\nexport function createVectorStoreFileBatchAndPoll(\n context: Client,\n vectorStoreId: string,\n options: VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams = { requestOptions: {} },\n): PollerLike<OperationState<VectorStoreFileBatch>, VectorStoreFileBatch> {\n return createPoller<VectorStoreFileBatch>({\n initOperation: async () => {\n return createVectorStoreFileBatchInternal(context, vectorStoreId, options);\n },\n pollOperation: async (currentResult: VectorStoreFileBatch) => {\n return getVectorStoreFileBatch(context, vectorStoreId, currentResult.id, options);\n },\n getOperationStatus: getLroOperationStatus,\n intervalInMs: options.pollingOptions?.intervalInMs,\n });\n}\n\nfunction getLroOperationStatus(result: VectorStoreFileBatch): OperationStatus {\n switch (result.status) {\n case \"in_progress\":\n return \"running\";\n case \"completed\":\n return \"succeeded\";\n case \"cancelled\":\n return \"canceled\";\n default:\n return \"failed\";\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { VectorStoreDataSource, VectorStoreChunkingStrategyRequestUnion, ListSortOrder, VectorStoreFileStatusFilter } from "../../models/models.js";
|
|
2
|
-
import { OperationOptions } from "@azure-rest/core-client";
|
|
3
|
-
import { PollingOptionsParams } from "../options.js";
|
|
1
|
+
import type { VectorStoreDataSource, VectorStoreChunkingStrategyRequestUnion, ListSortOrder, VectorStoreFileStatusFilter } from "../../models/models.js";
|
|
2
|
+
import type { OperationOptions } from "@azure-rest/core-client";
|
|
3
|
+
import type { PollingOptionsParams } from "../options.js";
|
|
4
4
|
/** Optional parameters. */
|
|
5
5
|
export interface VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams extends OperationOptions {
|
|
6
6
|
/** Filter by file status. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/options.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,uCAAuC,EACvC,aAAa,EACb,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,2BAA2B;AAC3B,MAAM,WAAW,iEACf,SAAQ,gBAAgB;IACxB,6BAA6B;IAC7B,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,iHAAiH;IACjH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oRAAoR;IACpR,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0RAA0R;IAC1R,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,2BAA2B;AAC3B,MAAM,WAAW,8DACf,SAAQ,gBAAgB;CAAG;AAE7B,2BAA2B;AAC3B,MAAM,WAAW,2DACf,SAAQ,gBAAgB;CAAG;AAE7B,2BAA2B;AAC3B,MAAM,WAAW,8DACf,SAAQ,gBAAgB,EACtB,oBAAoB;IACtB,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACtC,+FAA+F;IAC/F,gBAAgB,CAAC,EAAE,uCAAuC,CAAC;CAC5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n VectorStoreDataSource,\n VectorStoreChunkingStrategyRequestUnion,\n ListSortOrder,\n VectorStoreFileStatusFilter,\n} from \"../../models/models.js\";\nimport { OperationOptions } from \"@azure-rest/core-client\";\nimport { PollingOptionsParams } from \"../options.js\";\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams\n extends OperationOptions {\n /** Filter by file status. */\n filter?: VectorStoreFileStatusFilter;\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\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 after?: string;\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 before?: string;\n}\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams\n extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams\n extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams\n extends OperationOptions,\n PollingOptionsParams {\n /** List of file identifiers. */\n fileIds?: string[];\n /** List of Azure assets. */\n dataSources?: VectorStoreDataSource[];\n /** The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. */\n chunkingStrategy?: VectorStoreChunkingStrategyRequestUnion;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/vectorStoreFileBatches/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n VectorStoreDataSource,\n VectorStoreChunkingStrategyRequestUnion,\n ListSortOrder,\n VectorStoreFileStatusFilter,\n} from \"../../models/models.js\";\nimport type { OperationOptions } from \"@azure-rest/core-client\";\nimport type { PollingOptionsParams } from \"../options.js\";\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesListVectorStoreFileBatchFilesOptionalParams\n extends OperationOptions {\n /** Filter by file status. */\n filter?: VectorStoreFileStatusFilter;\n /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. */\n limit?: number;\n /** Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. */\n order?: ListSortOrder;\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 after?: string;\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 before?: string;\n}\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesCancelVectorStoreFileBatchOptionalParams\n extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesGetVectorStoreFileBatchOptionalParams\n extends OperationOptions {}\n\n/** Optional parameters. */\nexport interface VectorStoreFileBatchesCreateVectorStoreFileBatchOptionalParams\n extends OperationOptions,\n PollingOptionsParams {\n /** List of file identifiers. */\n fileIds?: string[];\n /** List of Azure assets. */\n dataSources?: VectorStoreDataSource[];\n /** The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. */\n chunkingStrategy?: VectorStoreChunkingStrategyRequestUnion;\n}\n"]}
|