@azure/ai-projects 1.0.1 → 2.0.0-beta.1
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 +115 -39
- package/dist/browser/aiProjectClient.d.ts +39 -36
- package/dist/browser/aiProjectClient.d.ts.map +1 -1
- package/dist/browser/aiProjectClient.js +66 -57
- package/dist/browser/aiProjectClient.js.map +1 -1
- package/dist/browser/api/agents/index.d.ts +3 -0
- package/dist/browser/api/agents/index.d.ts.map +1 -0
- package/dist/browser/api/agents/index.js +4 -0
- package/dist/browser/api/agents/index.js.map +1 -0
- package/dist/browser/api/agents/operations.d.ts +60 -0
- package/dist/browser/api/agents/operations.d.ts.map +1 -0
- package/dist/browser/api/agents/operations.js +412 -0
- package/dist/browser/api/agents/operations.js.map +1 -0
- package/dist/browser/api/agents/options.d.ts +151 -0
- package/dist/browser/api/agents/options.d.ts.map +1 -0
- package/dist/browser/api/agents/options.js.map +1 -0
- package/dist/browser/api/aiProjectContext.d.ts +6 -13
- package/dist/browser/api/aiProjectContext.d.ts.map +1 -1
- package/dist/browser/api/aiProjectContext.js +10 -17
- package/dist/browser/api/aiProjectContext.js.map +1 -1
- package/dist/browser/api/connections/index.d.ts +1 -1
- package/dist/browser/api/connections/index.d.ts.map +1 -1
- package/dist/browser/api/connections/index.js +1 -1
- package/dist/browser/api/connections/index.js.map +1 -1
- package/dist/browser/api/connections/operations.d.ts +1 -1
- package/dist/browser/api/connections/operations.d.ts.map +1 -1
- package/dist/browser/api/connections/operations.js +1 -1
- package/dist/browser/api/connections/operations.js.map +1 -1
- package/dist/browser/api/datasets/operations.d.ts +8 -13
- package/dist/browser/api/datasets/operations.d.ts.map +1 -1
- package/dist/browser/api/datasets/operations.js +129 -141
- package/dist/browser/api/datasets/operations.js.map +1 -1
- package/dist/browser/api/deployments/operations.d.ts +1 -1
- package/dist/browser/api/deployments/operations.d.ts.map +1 -1
- package/dist/browser/api/deployments/operations.js +1 -1
- package/dist/browser/api/deployments/operations.js.map +1 -1
- package/dist/browser/api/evaluationRules/index.d.ts +3 -0
- package/dist/browser/api/evaluationRules/index.d.ts.map +1 -0
- package/dist/browser/api/evaluationRules/index.js +4 -0
- package/dist/browser/api/evaluationRules/index.js.map +1 -0
- package/dist/browser/api/evaluationRules/operations.d.ts +22 -0
- package/dist/browser/api/evaluationRules/operations.d.ts.map +1 -0
- package/dist/browser/api/evaluationRules/operations.js +126 -0
- package/dist/browser/api/evaluationRules/operations.js.map +1 -0
- package/dist/browser/api/evaluationRules/options.d.ts +27 -0
- package/dist/browser/api/evaluationRules/options.d.ts.map +1 -0
- package/dist/browser/api/evaluationRules/options.js.map +1 -0
- package/dist/browser/api/evaluationTaxonomies/index.d.ts +3 -0
- package/dist/browser/api/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/browser/api/evaluationTaxonomies/index.js +4 -0
- package/dist/browser/api/evaluationTaxonomies/index.js.map +1 -0
- package/dist/browser/api/evaluationTaxonomies/operations.d.ts +26 -0
- package/dist/browser/api/evaluationTaxonomies/operations.d.ts.map +1 -0
- package/dist/browser/api/evaluationTaxonomies/operations.js +154 -0
- package/dist/browser/api/evaluationTaxonomies/operations.js.map +1 -0
- package/dist/browser/api/evaluationTaxonomies/options.d.ts +27 -0
- package/dist/browser/api/evaluationTaxonomies/options.d.ts.map +1 -0
- package/dist/browser/api/evaluationTaxonomies/options.js.map +1 -0
- package/dist/browser/api/evaluators/index.d.ts +3 -0
- package/dist/browser/api/evaluators/index.d.ts.map +1 -0
- package/dist/browser/api/evaluators/index.js +4 -0
- package/dist/browser/api/evaluators/index.js.map +1 -0
- package/dist/browser/api/evaluators/operations.d.ts +30 -0
- package/dist/browser/api/evaluators/operations.d.ts.map +1 -0
- package/dist/browser/api/evaluators/operations.js +171 -0
- package/dist/browser/api/evaluators/operations.js.map +1 -0
- package/dist/browser/api/evaluators/options.d.ts +29 -0
- package/dist/browser/api/evaluators/options.d.ts.map +1 -0
- package/dist/browser/api/evaluators/options.js +4 -0
- package/dist/browser/api/evaluators/options.js.map +1 -0
- package/dist/browser/api/index.d.ts.map +1 -1
- package/dist/browser/api/index.js +2 -0
- package/dist/browser/api/index.js.map +1 -1
- package/dist/browser/api/indexes/operations.d.ts +3 -8
- package/dist/browser/api/indexes/operations.d.ts.map +1 -1
- package/dist/browser/api/indexes/operations.js +4 -16
- package/dist/browser/api/indexes/operations.js.map +1 -1
- package/dist/browser/api/insights/index.d.ts +3 -0
- package/dist/browser/api/insights/index.d.ts.map +1 -0
- package/dist/browser/api/insights/index.js +4 -0
- package/dist/browser/api/insights/index.js.map +1 -0
- package/dist/browser/api/insights/operations.d.ts +18 -0
- package/dist/browser/api/insights/operations.d.ts.map +1 -0
- package/dist/browser/api/insights/operations.js +109 -0
- package/dist/browser/api/insights/operations.js.map +1 -0
- package/dist/browser/api/insights/options.d.ts +32 -0
- package/dist/browser/api/insights/options.d.ts.map +1 -0
- package/dist/browser/api/insights/options.js +4 -0
- package/dist/browser/api/insights/options.js.map +1 -0
- package/dist/browser/api/memoryStores/index.d.ts +3 -0
- package/dist/browser/api/memoryStores/index.d.ts.map +1 -0
- package/dist/browser/api/memoryStores/index.js +4 -0
- package/dist/browser/api/memoryStores/index.js.map +1 -0
- package/dist/browser/api/memoryStores/operations.d.ts +43 -0
- package/dist/browser/api/memoryStores/operations.d.ts.map +1 -0
- package/dist/browser/api/memoryStores/operations.js +306 -0
- package/dist/browser/api/memoryStores/operations.js.map +1 -0
- package/dist/browser/api/memoryStores/options.d.ts +83 -0
- package/dist/browser/api/memoryStores/options.d.ts.map +1 -0
- package/dist/browser/api/memoryStores/options.js +4 -0
- package/dist/browser/api/memoryStores/options.js.map +1 -0
- package/dist/browser/api/redTeams/index.d.ts +3 -0
- package/dist/browser/api/redTeams/index.d.ts.map +1 -0
- package/dist/browser/api/redTeams/index.js +4 -0
- package/dist/browser/api/redTeams/index.js.map +1 -0
- package/dist/browser/api/redTeams/operations.d.ts +18 -0
- package/dist/browser/api/redTeams/operations.d.ts.map +1 -0
- package/dist/browser/api/redTeams/operations.js +93 -0
- package/dist/browser/api/redTeams/operations.js.map +1 -0
- package/dist/browser/api/redTeams/options.d.ts +15 -0
- package/dist/browser/api/redTeams/options.d.ts.map +1 -0
- package/dist/browser/api/redTeams/options.js +4 -0
- package/dist/browser/api/redTeams/options.js.map +1 -0
- package/dist/browser/api/schedules/index.d.ts +3 -0
- package/dist/browser/api/schedules/index.d.ts.map +1 -0
- package/dist/browser/api/schedules/index.js +4 -0
- package/dist/browser/api/schedules/index.js.map +1 -0
- package/dist/browser/api/schedules/operations.d.ts +30 -0
- package/dist/browser/api/schedules/operations.d.ts.map +1 -0
- package/dist/browser/api/schedules/operations.js +178 -0
- package/dist/browser/api/schedules/operations.js.map +1 -0
- package/dist/browser/api/schedules/options.d.ts +26 -0
- package/dist/browser/api/schedules/options.d.ts.map +1 -0
- package/dist/browser/api/schedules/options.js +4 -0
- package/dist/browser/api/schedules/options.js.map +1 -0
- package/dist/browser/classic/agents/index.d.ts +39 -0
- package/dist/browser/classic/agents/index.d.ts.map +1 -0
- package/dist/browser/classic/agents/index.js +43 -0
- package/dist/browser/classic/agents/index.js.map +1 -0
- package/dist/browser/classic/connections/index.d.ts +1 -1
- package/dist/browser/classic/connections/index.d.ts.map +1 -1
- package/dist/browser/classic/connections/index.js.map +1 -1
- package/dist/browser/classic/datasets/index.d.ts +4 -9
- package/dist/browser/classic/datasets/index.d.ts.map +1 -1
- package/dist/browser/classic/datasets/index.js +0 -1
- package/dist/browser/classic/datasets/index.js.map +1 -1
- package/dist/browser/classic/deployments/index.d.ts +1 -1
- package/dist/browser/classic/deployments/index.d.ts.map +1 -1
- package/dist/browser/classic/deployments/index.js.map +1 -1
- package/dist/browser/classic/evaluationRules/index.d.ts +17 -0
- package/dist/browser/classic/evaluationRules/index.d.ts.map +1 -0
- package/dist/browser/classic/evaluationRules/index.js +17 -0
- package/dist/browser/classic/evaluationRules/index.js.map +1 -0
- package/dist/browser/classic/evaluationTaxonomies/index.d.ts +19 -0
- package/dist/browser/classic/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/browser/classic/evaluationTaxonomies/index.js +18 -0
- package/dist/browser/classic/evaluationTaxonomies/index.js.map +1 -0
- package/dist/browser/classic/evaluators/index.d.ts +21 -0
- package/dist/browser/classic/evaluators/index.d.ts.map +1 -0
- package/dist/browser/classic/evaluators/index.js +25 -0
- package/dist/browser/classic/evaluators/index.js.map +1 -0
- package/dist/browser/classic/index.d.ts +8 -1
- package/dist/browser/classic/index.d.ts.map +1 -1
- package/dist/browser/classic/index.js.map +1 -1
- package/dist/browser/classic/indexes/index.d.ts +3 -8
- package/dist/browser/classic/indexes/index.d.ts.map +1 -1
- package/dist/browser/classic/indexes/index.js +0 -1
- package/dist/browser/classic/indexes/index.js.map +1 -1
- package/dist/browser/classic/insights/index.d.ts +15 -0
- package/dist/browser/classic/insights/index.d.ts.map +1 -0
- package/dist/browser/classic/insights/index.js +16 -0
- package/dist/browser/classic/insights/index.js.map +1 -0
- package/dist/browser/classic/memoryStores/index.d.ts +28 -0
- package/dist/browser/classic/memoryStores/index.d.ts.map +1 -0
- package/dist/browser/classic/memoryStores/index.js +22 -0
- package/dist/browser/classic/memoryStores/index.js.map +1 -0
- package/dist/browser/classic/redTeams/index.d.ts +15 -0
- package/dist/browser/classic/redTeams/index.d.ts.map +1 -0
- package/dist/browser/classic/redTeams/index.js +16 -0
- package/dist/browser/classic/redTeams/index.js.map +1 -0
- package/dist/browser/classic/schedules/index.d.ts +21 -0
- package/dist/browser/classic/schedules/index.d.ts.map +1 -0
- package/dist/browser/classic/schedules/index.js +19 -0
- package/dist/browser/classic/schedules/index.js.map +1 -0
- 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 +11 -5
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +2 -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 +1 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +3081 -24
- package/dist/browser/models/models.d.ts.map +1 -1
- package/dist/browser/models/models.js +3778 -266
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/overwriteOpenAIClient.d.ts +3 -0
- package/dist/browser/overwriteOpenAIClient.d.ts.map +1 -0
- package/dist/browser/overwriteOpenAIClient.js +14 -0
- package/dist/browser/overwriteOpenAIClient.js.map +1 -0
- package/dist/browser/restorePollerHelpers.d.ts +24 -0
- package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
- package/dist/browser/restorePollerHelpers.js +91 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.js +79 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/serialization/serialize-record.d.ts +2 -0
- package/dist/browser/static-helpers/serialization/serialize-record.d.ts.map +1 -0
- package/dist/browser/static-helpers/serialization/serialize-record.js +20 -0
- package/dist/browser/static-helpers/serialization/serialize-record.js.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts.map +1 -1
- package/dist/browser/static-helpers/urlTemplate.js +22 -12
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/aiProjectClient.d.ts +39 -36
- package/dist/commonjs/aiProjectClient.d.ts.map +1 -1
- package/dist/commonjs/aiProjectClient.js +71 -61
- package/dist/commonjs/aiProjectClient.js.map +1 -1
- package/dist/commonjs/api/agents/index.d.ts +3 -0
- package/dist/commonjs/api/agents/index.d.ts.map +1 -0
- package/dist/commonjs/api/agents/index.js +19 -0
- package/dist/commonjs/api/agents/index.js.map +1 -0
- package/dist/commonjs/api/agents/operations.d.ts +60 -0
- package/dist/commonjs/api/agents/operations.d.ts.map +1 -0
- package/dist/commonjs/api/agents/operations.js +450 -0
- package/dist/commonjs/api/agents/operations.js.map +1 -0
- package/dist/commonjs/api/agents/options.d.ts +151 -0
- package/dist/commonjs/api/agents/options.d.ts.map +1 -0
- package/dist/commonjs/api/agents/options.js.map +1 -0
- package/dist/commonjs/api/aiProjectContext.d.ts +6 -13
- package/dist/commonjs/api/aiProjectContext.d.ts.map +1 -1
- package/dist/commonjs/api/aiProjectContext.js +10 -17
- package/dist/commonjs/api/aiProjectContext.js.map +1 -1
- package/dist/commonjs/api/connections/index.d.ts +1 -1
- package/dist/commonjs/api/connections/index.d.ts.map +1 -1
- package/dist/commonjs/api/connections/index.js +1 -2
- package/dist/commonjs/api/connections/index.js.map +1 -1
- package/dist/commonjs/api/connections/operations.d.ts +1 -1
- package/dist/commonjs/api/connections/operations.d.ts.map +1 -1
- package/dist/commonjs/api/connections/operations.js +1 -1
- package/dist/commonjs/api/connections/operations.js.map +1 -1
- package/dist/commonjs/api/datasets/operations.d.ts +8 -13
- package/dist/commonjs/api/datasets/operations.d.ts.map +1 -1
- package/dist/commonjs/api/datasets/operations.js +130 -142
- package/dist/commonjs/api/datasets/operations.js.map +1 -1
- package/dist/commonjs/api/deployments/operations.d.ts +1 -1
- package/dist/commonjs/api/deployments/operations.d.ts.map +1 -1
- package/dist/commonjs/api/deployments/operations.js +1 -1
- package/dist/commonjs/api/deployments/operations.js.map +1 -1
- package/dist/commonjs/api/evaluationRules/index.d.ts +3 -0
- package/dist/commonjs/api/evaluationRules/index.d.ts.map +1 -0
- package/dist/commonjs/api/evaluationRules/index.js +11 -0
- package/dist/commonjs/api/evaluationRules/index.js.map +1 -0
- package/dist/commonjs/api/evaluationRules/operations.d.ts +22 -0
- package/dist/commonjs/api/evaluationRules/operations.d.ts.map +1 -0
- package/dist/commonjs/api/evaluationRules/operations.js +140 -0
- package/dist/commonjs/api/evaluationRules/operations.js.map +1 -0
- package/dist/commonjs/api/evaluationRules/options.d.ts +27 -0
- package/dist/commonjs/api/evaluationRules/options.d.ts.map +1 -0
- package/dist/commonjs/api/evaluationRules/options.js +5 -0
- package/dist/commonjs/api/evaluationRules/options.js.map +1 -0
- package/dist/commonjs/api/evaluationTaxonomies/index.d.ts +3 -0
- package/dist/commonjs/api/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/commonjs/api/evaluationTaxonomies/index.js +12 -0
- package/dist/commonjs/api/evaluationTaxonomies/index.js.map +1 -0
- package/dist/commonjs/api/evaluationTaxonomies/operations.d.ts +26 -0
- package/dist/commonjs/api/evaluationTaxonomies/operations.d.ts.map +1 -0
- package/dist/commonjs/api/evaluationTaxonomies/operations.js +171 -0
- package/dist/commonjs/api/evaluationTaxonomies/operations.js.map +1 -0
- package/dist/commonjs/api/evaluationTaxonomies/options.d.ts +27 -0
- package/dist/commonjs/api/evaluationTaxonomies/options.d.ts.map +1 -0
- package/dist/commonjs/api/evaluationTaxonomies/options.js +5 -0
- package/dist/commonjs/api/evaluationTaxonomies/options.js.map +1 -0
- package/dist/commonjs/api/evaluators/index.d.ts +3 -0
- package/dist/commonjs/api/evaluators/index.d.ts.map +1 -0
- package/dist/commonjs/api/evaluators/index.js +13 -0
- package/dist/commonjs/api/evaluators/index.js.map +1 -0
- package/dist/commonjs/api/evaluators/operations.d.ts +30 -0
- package/dist/commonjs/api/evaluators/operations.d.ts.map +1 -0
- package/dist/commonjs/api/evaluators/operations.js +191 -0
- package/dist/commonjs/api/evaluators/operations.js.map +1 -0
- package/dist/commonjs/api/evaluators/options.d.ts +29 -0
- package/dist/commonjs/api/evaluators/options.d.ts.map +1 -0
- package/dist/commonjs/api/evaluators/options.js +5 -0
- package/dist/commonjs/api/evaluators/options.js.map +1 -0
- package/dist/commonjs/api/index.d.ts.map +1 -1
- package/dist/commonjs/api/index.js +2 -0
- package/dist/commonjs/api/index.js.map +1 -1
- package/dist/commonjs/api/indexes/operations.d.ts +3 -8
- package/dist/commonjs/api/indexes/operations.d.ts.map +1 -1
- package/dist/commonjs/api/indexes/operations.js +4 -16
- package/dist/commonjs/api/indexes/operations.js.map +1 -1
- package/dist/commonjs/api/insights/index.d.ts +3 -0
- package/dist/commonjs/api/insights/index.d.ts.map +1 -0
- package/dist/commonjs/api/insights/index.js +10 -0
- package/dist/commonjs/api/insights/index.js.map +1 -0
- package/dist/commonjs/api/insights/operations.d.ts +18 -0
- package/dist/commonjs/api/insights/operations.d.ts.map +1 -0
- package/dist/commonjs/api/insights/operations.js +120 -0
- package/dist/commonjs/api/insights/operations.js.map +1 -0
- package/dist/commonjs/api/insights/options.d.ts +32 -0
- package/dist/commonjs/api/insights/options.d.ts.map +1 -0
- package/dist/commonjs/api/insights/options.js +5 -0
- package/dist/commonjs/api/insights/options.js.map +1 -0
- package/dist/commonjs/api/memoryStores/index.d.ts +3 -0
- package/dist/commonjs/api/memoryStores/index.d.ts.map +1 -0
- package/dist/commonjs/api/memoryStores/index.js +16 -0
- package/dist/commonjs/api/memoryStores/index.js.map +1 -0
- package/dist/commonjs/api/memoryStores/operations.d.ts +43 -0
- package/dist/commonjs/api/memoryStores/operations.d.ts.map +1 -0
- package/dist/commonjs/api/memoryStores/operations.js +335 -0
- package/dist/commonjs/api/memoryStores/operations.js.map +1 -0
- package/dist/commonjs/api/memoryStores/options.d.ts +83 -0
- package/dist/commonjs/api/memoryStores/options.d.ts.map +1 -0
- package/dist/commonjs/api/memoryStores/options.js +5 -0
- package/dist/commonjs/api/memoryStores/options.js.map +1 -0
- package/dist/commonjs/api/redTeams/index.d.ts +3 -0
- package/dist/commonjs/api/redTeams/index.d.ts.map +1 -0
- package/dist/commonjs/api/redTeams/index.js +10 -0
- package/dist/commonjs/api/redTeams/index.js.map +1 -0
- package/dist/commonjs/api/redTeams/operations.d.ts +18 -0
- package/dist/commonjs/api/redTeams/operations.d.ts.map +1 -0
- package/dist/commonjs/api/redTeams/operations.js +104 -0
- package/dist/commonjs/api/redTeams/operations.js.map +1 -0
- package/dist/commonjs/api/redTeams/options.d.ts +15 -0
- package/dist/commonjs/api/redTeams/options.d.ts.map +1 -0
- package/dist/commonjs/api/redTeams/options.js +5 -0
- package/dist/commonjs/api/redTeams/options.js.map +1 -0
- package/dist/commonjs/api/schedules/index.d.ts +3 -0
- package/dist/commonjs/api/schedules/index.d.ts.map +1 -0
- package/dist/commonjs/api/schedules/index.js +13 -0
- package/dist/commonjs/api/schedules/index.js.map +1 -0
- package/dist/commonjs/api/schedules/operations.d.ts +30 -0
- package/dist/commonjs/api/schedules/operations.d.ts.map +1 -0
- package/dist/commonjs/api/schedules/operations.js +198 -0
- package/dist/commonjs/api/schedules/operations.js.map +1 -0
- package/dist/commonjs/api/schedules/options.d.ts +26 -0
- package/dist/commonjs/api/schedules/options.d.ts.map +1 -0
- package/dist/commonjs/api/schedules/options.js +5 -0
- package/dist/commonjs/api/schedules/options.js.map +1 -0
- package/dist/commonjs/classic/agents/index.d.ts +39 -0
- package/dist/commonjs/classic/agents/index.d.ts.map +1 -0
- package/dist/commonjs/classic/agents/index.js +46 -0
- package/dist/commonjs/classic/agents/index.js.map +1 -0
- package/dist/commonjs/classic/connections/index.d.ts +1 -1
- package/dist/commonjs/classic/connections/index.d.ts.map +1 -1
- package/dist/commonjs/classic/connections/index.js.map +1 -1
- package/dist/commonjs/classic/datasets/index.d.ts +4 -9
- package/dist/commonjs/classic/datasets/index.d.ts.map +1 -1
- package/dist/commonjs/classic/datasets/index.js +0 -1
- package/dist/commonjs/classic/datasets/index.js.map +1 -1
- package/dist/commonjs/classic/deployments/index.d.ts +1 -1
- package/dist/commonjs/classic/deployments/index.d.ts.map +1 -1
- package/dist/commonjs/classic/deployments/index.js.map +1 -1
- package/dist/commonjs/classic/evaluationRules/index.d.ts +17 -0
- package/dist/commonjs/classic/evaluationRules/index.d.ts.map +1 -0
- package/dist/commonjs/classic/evaluationRules/index.js +20 -0
- package/dist/commonjs/classic/evaluationRules/index.js.map +1 -0
- package/dist/commonjs/classic/evaluationTaxonomies/index.d.ts +19 -0
- package/dist/commonjs/classic/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/commonjs/classic/evaluationTaxonomies/index.js +21 -0
- package/dist/commonjs/classic/evaluationTaxonomies/index.js.map +1 -0
- package/dist/commonjs/classic/evaluators/index.d.ts +21 -0
- package/dist/commonjs/classic/evaluators/index.d.ts.map +1 -0
- package/dist/commonjs/classic/evaluators/index.js +28 -0
- package/dist/commonjs/classic/evaluators/index.js.map +1 -0
- package/dist/commonjs/classic/index.d.ts +8 -1
- package/dist/commonjs/classic/index.d.ts.map +1 -1
- package/dist/commonjs/classic/index.js.map +1 -1
- package/dist/commonjs/classic/indexes/index.d.ts +3 -8
- package/dist/commonjs/classic/indexes/index.d.ts.map +1 -1
- package/dist/commonjs/classic/indexes/index.js +0 -1
- package/dist/commonjs/classic/indexes/index.js.map +1 -1
- package/dist/commonjs/classic/insights/index.d.ts +15 -0
- package/dist/commonjs/classic/insights/index.d.ts.map +1 -0
- package/dist/commonjs/classic/insights/index.js +19 -0
- package/dist/commonjs/classic/insights/index.js.map +1 -0
- package/dist/commonjs/classic/memoryStores/index.d.ts +28 -0
- package/dist/commonjs/classic/memoryStores/index.d.ts.map +1 -0
- package/dist/commonjs/classic/memoryStores/index.js +25 -0
- package/dist/commonjs/classic/memoryStores/index.js.map +1 -0
- package/dist/commonjs/classic/redTeams/index.d.ts +15 -0
- package/dist/commonjs/classic/redTeams/index.d.ts.map +1 -0
- package/dist/commonjs/classic/redTeams/index.js +19 -0
- package/dist/commonjs/classic/redTeams/index.js.map +1 -0
- package/dist/commonjs/classic/schedules/index.d.ts +21 -0
- package/dist/commonjs/classic/schedules/index.d.ts.map +1 -0
- package/dist/commonjs/classic/schedules/index.js +22 -0
- package/dist/commonjs/classic/schedules/index.js.map +1 -0
- 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 +11 -5
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +4 -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 +3081 -24
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +4263 -270
- package/dist/commonjs/models/models.js.map +1 -1
- package/dist/commonjs/overwriteOpenAIClient.d.ts +3 -0
- package/dist/commonjs/overwriteOpenAIClient.d.ts.map +1 -0
- package/dist/commonjs/overwriteOpenAIClient.js +17 -0
- package/dist/commonjs/overwriteOpenAIClient.js.map +1 -0
- package/dist/commonjs/restorePollerHelpers.d.ts +24 -0
- package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
- package/dist/commonjs/restorePollerHelpers.js +94 -0
- package/dist/commonjs/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +82 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/serialization/serialize-record.d.ts +2 -0
- package/dist/commonjs/static-helpers/serialization/serialize-record.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/serialization/serialize-record.js +23 -0
- package/dist/commonjs/static-helpers/serialization/serialize-record.js.map +1 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts.map +1 -1
- package/dist/commonjs/static-helpers/urlTemplate.js +22 -12
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/aiProjectClient.d.ts +39 -36
- package/dist/esm/aiProjectClient.d.ts.map +1 -1
- package/dist/esm/aiProjectClient.js +66 -57
- package/dist/esm/aiProjectClient.js.map +1 -1
- package/dist/esm/api/agents/index.d.ts +3 -0
- package/dist/esm/api/agents/index.d.ts.map +1 -0
- package/dist/esm/api/agents/index.js +4 -0
- package/dist/esm/api/agents/index.js.map +1 -0
- package/dist/esm/api/agents/operations.d.ts +60 -0
- package/dist/esm/api/agents/operations.d.ts.map +1 -0
- package/dist/esm/api/agents/operations.js +412 -0
- package/dist/esm/api/agents/operations.js.map +1 -0
- package/dist/esm/api/agents/options.d.ts +151 -0
- package/dist/esm/api/agents/options.d.ts.map +1 -0
- package/dist/esm/api/agents/options.js +4 -0
- package/dist/esm/api/agents/options.js.map +1 -0
- package/dist/esm/api/aiProjectContext.d.ts +6 -13
- package/dist/esm/api/aiProjectContext.d.ts.map +1 -1
- package/dist/esm/api/aiProjectContext.js +10 -17
- package/dist/esm/api/aiProjectContext.js.map +1 -1
- package/dist/esm/api/connections/index.d.ts +1 -1
- package/dist/esm/api/connections/index.d.ts.map +1 -1
- package/dist/esm/api/connections/index.js +1 -1
- package/dist/esm/api/connections/index.js.map +1 -1
- package/dist/esm/api/connections/operations.d.ts +1 -1
- package/dist/esm/api/connections/operations.d.ts.map +1 -1
- package/dist/esm/api/connections/operations.js +1 -1
- package/dist/esm/api/connections/operations.js.map +1 -1
- package/dist/esm/api/datasets/operations.d.ts +8 -13
- package/dist/esm/api/datasets/operations.d.ts.map +1 -1
- package/dist/esm/api/datasets/operations.js +129 -141
- package/dist/esm/api/datasets/operations.js.map +1 -1
- package/dist/esm/api/deployments/operations.d.ts +1 -1
- package/dist/esm/api/deployments/operations.d.ts.map +1 -1
- package/dist/esm/api/deployments/operations.js +1 -1
- package/dist/esm/api/deployments/operations.js.map +1 -1
- package/dist/esm/api/evaluationRules/index.d.ts +3 -0
- package/dist/esm/api/evaluationRules/index.d.ts.map +1 -0
- package/dist/esm/api/evaluationRules/index.js +4 -0
- package/dist/esm/api/evaluationRules/index.js.map +1 -0
- package/dist/esm/api/evaluationRules/operations.d.ts +22 -0
- package/dist/esm/api/evaluationRules/operations.d.ts.map +1 -0
- package/dist/esm/api/evaluationRules/operations.js +126 -0
- package/dist/esm/api/evaluationRules/operations.js.map +1 -0
- package/dist/esm/api/evaluationRules/options.d.ts +27 -0
- package/dist/esm/api/evaluationRules/options.d.ts.map +1 -0
- package/dist/esm/api/evaluationRules/options.js +4 -0
- package/dist/esm/api/evaluationRules/options.js.map +1 -0
- package/dist/esm/api/evaluationTaxonomies/index.d.ts +3 -0
- package/dist/esm/api/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/esm/api/evaluationTaxonomies/index.js +4 -0
- package/dist/esm/api/evaluationTaxonomies/index.js.map +1 -0
- package/dist/esm/api/evaluationTaxonomies/operations.d.ts +26 -0
- package/dist/esm/api/evaluationTaxonomies/operations.d.ts.map +1 -0
- package/dist/esm/api/evaluationTaxonomies/operations.js +154 -0
- package/dist/esm/api/evaluationTaxonomies/operations.js.map +1 -0
- package/dist/esm/api/evaluationTaxonomies/options.d.ts +27 -0
- package/dist/esm/api/evaluationTaxonomies/options.d.ts.map +1 -0
- package/dist/esm/api/evaluationTaxonomies/options.js +4 -0
- package/dist/esm/api/evaluationTaxonomies/options.js.map +1 -0
- package/dist/esm/api/evaluators/index.d.ts +3 -0
- package/dist/esm/api/evaluators/index.d.ts.map +1 -0
- package/dist/esm/api/evaluators/index.js +4 -0
- package/dist/esm/api/evaluators/index.js.map +1 -0
- package/dist/esm/api/evaluators/operations.d.ts +30 -0
- package/dist/esm/api/evaluators/operations.d.ts.map +1 -0
- package/dist/esm/api/evaluators/operations.js +171 -0
- package/dist/esm/api/evaluators/operations.js.map +1 -0
- package/dist/esm/api/evaluators/options.d.ts +29 -0
- package/dist/esm/api/evaluators/options.d.ts.map +1 -0
- package/dist/esm/api/evaluators/options.js +4 -0
- package/dist/esm/api/evaluators/options.js.map +1 -0
- package/dist/esm/api/index.d.ts.map +1 -1
- package/dist/esm/api/index.js +2 -0
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/indexes/operations.d.ts +3 -8
- package/dist/esm/api/indexes/operations.d.ts.map +1 -1
- package/dist/esm/api/indexes/operations.js +4 -16
- package/dist/esm/api/indexes/operations.js.map +1 -1
- package/dist/esm/api/insights/index.d.ts +3 -0
- package/dist/esm/api/insights/index.d.ts.map +1 -0
- package/dist/esm/api/insights/index.js +4 -0
- package/dist/esm/api/insights/index.js.map +1 -0
- package/dist/esm/api/insights/operations.d.ts +18 -0
- package/dist/esm/api/insights/operations.d.ts.map +1 -0
- package/dist/esm/api/insights/operations.js +109 -0
- package/dist/esm/api/insights/operations.js.map +1 -0
- package/dist/esm/api/insights/options.d.ts +32 -0
- package/dist/esm/api/insights/options.d.ts.map +1 -0
- package/dist/esm/api/insights/options.js +4 -0
- package/dist/esm/api/insights/options.js.map +1 -0
- package/dist/esm/api/memoryStores/index.d.ts +3 -0
- package/dist/esm/api/memoryStores/index.d.ts.map +1 -0
- package/dist/esm/api/memoryStores/index.js +4 -0
- package/dist/esm/api/memoryStores/index.js.map +1 -0
- package/dist/esm/api/memoryStores/operations.d.ts +43 -0
- package/dist/esm/api/memoryStores/operations.d.ts.map +1 -0
- package/dist/esm/api/memoryStores/operations.js +306 -0
- package/dist/esm/api/memoryStores/operations.js.map +1 -0
- package/dist/esm/api/memoryStores/options.d.ts +83 -0
- package/dist/esm/api/memoryStores/options.d.ts.map +1 -0
- package/dist/esm/api/memoryStores/options.js +4 -0
- package/dist/esm/api/memoryStores/options.js.map +1 -0
- package/dist/esm/api/redTeams/index.d.ts +3 -0
- package/dist/esm/api/redTeams/index.d.ts.map +1 -0
- package/dist/esm/api/redTeams/index.js +4 -0
- package/dist/esm/api/redTeams/index.js.map +1 -0
- package/dist/esm/api/redTeams/operations.d.ts +18 -0
- package/dist/esm/api/redTeams/operations.d.ts.map +1 -0
- package/dist/esm/api/redTeams/operations.js +93 -0
- package/dist/esm/api/redTeams/operations.js.map +1 -0
- package/dist/esm/api/redTeams/options.d.ts +15 -0
- package/dist/esm/api/redTeams/options.d.ts.map +1 -0
- package/dist/esm/api/redTeams/options.js +4 -0
- package/dist/esm/api/redTeams/options.js.map +1 -0
- package/dist/esm/api/schedules/index.d.ts +3 -0
- package/dist/esm/api/schedules/index.d.ts.map +1 -0
- package/dist/esm/api/schedules/index.js +4 -0
- package/dist/esm/api/schedules/index.js.map +1 -0
- package/dist/esm/api/schedules/operations.d.ts +30 -0
- package/dist/esm/api/schedules/operations.d.ts.map +1 -0
- package/dist/esm/api/schedules/operations.js +178 -0
- package/dist/esm/api/schedules/operations.js.map +1 -0
- package/dist/esm/api/schedules/options.d.ts +26 -0
- package/dist/esm/api/schedules/options.d.ts.map +1 -0
- package/dist/esm/api/schedules/options.js +4 -0
- package/dist/esm/api/schedules/options.js.map +1 -0
- package/dist/esm/classic/agents/index.d.ts +39 -0
- package/dist/esm/classic/agents/index.d.ts.map +1 -0
- package/dist/esm/classic/agents/index.js +43 -0
- package/dist/esm/classic/agents/index.js.map +1 -0
- package/dist/esm/classic/connections/index.d.ts +1 -1
- package/dist/esm/classic/connections/index.d.ts.map +1 -1
- package/dist/esm/classic/connections/index.js.map +1 -1
- package/dist/esm/classic/datasets/index.d.ts +4 -9
- package/dist/esm/classic/datasets/index.d.ts.map +1 -1
- package/dist/esm/classic/datasets/index.js +0 -1
- package/dist/esm/classic/datasets/index.js.map +1 -1
- package/dist/esm/classic/deployments/index.d.ts +1 -1
- package/dist/esm/classic/deployments/index.d.ts.map +1 -1
- package/dist/esm/classic/deployments/index.js.map +1 -1
- package/dist/esm/classic/evaluationRules/index.d.ts +17 -0
- package/dist/esm/classic/evaluationRules/index.d.ts.map +1 -0
- package/dist/esm/classic/evaluationRules/index.js +17 -0
- package/dist/esm/classic/evaluationRules/index.js.map +1 -0
- package/dist/esm/classic/evaluationTaxonomies/index.d.ts +19 -0
- package/dist/esm/classic/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/esm/classic/evaluationTaxonomies/index.js +18 -0
- package/dist/esm/classic/evaluationTaxonomies/index.js.map +1 -0
- package/dist/esm/classic/evaluators/index.d.ts +21 -0
- package/dist/esm/classic/evaluators/index.d.ts.map +1 -0
- package/dist/esm/classic/evaluators/index.js +25 -0
- package/dist/esm/classic/evaluators/index.js.map +1 -0
- package/dist/esm/classic/index.d.ts +8 -1
- package/dist/esm/classic/index.d.ts.map +1 -1
- package/dist/esm/classic/index.js.map +1 -1
- package/dist/esm/classic/indexes/index.d.ts +3 -8
- package/dist/esm/classic/indexes/index.d.ts.map +1 -1
- package/dist/esm/classic/indexes/index.js +0 -1
- package/dist/esm/classic/indexes/index.js.map +1 -1
- package/dist/esm/classic/insights/index.d.ts +15 -0
- package/dist/esm/classic/insights/index.d.ts.map +1 -0
- package/dist/esm/classic/insights/index.js +16 -0
- package/dist/esm/classic/insights/index.js.map +1 -0
- package/dist/esm/classic/memoryStores/index.d.ts +28 -0
- package/dist/esm/classic/memoryStores/index.d.ts.map +1 -0
- package/dist/esm/classic/memoryStores/index.js +22 -0
- package/dist/esm/classic/memoryStores/index.js.map +1 -0
- package/dist/esm/classic/redTeams/index.d.ts +15 -0
- package/dist/esm/classic/redTeams/index.d.ts.map +1 -0
- package/dist/esm/classic/redTeams/index.js +16 -0
- package/dist/esm/classic/redTeams/index.js.map +1 -0
- package/dist/esm/classic/schedules/index.d.ts +21 -0
- package/dist/esm/classic/schedules/index.d.ts.map +1 -0
- package/dist/esm/classic/schedules/index.js +19 -0
- package/dist/esm/classic/schedules/index.js.map +1 -0
- 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 +11 -5
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -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 +1 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +3081 -24
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js +3778 -266
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/overwriteOpenAIClient.d.ts +3 -0
- package/dist/esm/overwriteOpenAIClient.d.ts.map +1 -0
- package/dist/esm/overwriteOpenAIClient.js +14 -0
- package/dist/esm/overwriteOpenAIClient.js.map +1 -0
- package/dist/esm/restorePollerHelpers.d.ts +24 -0
- package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
- package/dist/esm/restorePollerHelpers.js +91 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.js +79 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/serialization/serialize-record.d.ts +2 -0
- package/dist/esm/static-helpers/serialization/serialize-record.d.ts.map +1 -0
- package/dist/esm/static-helpers/serialization/serialize-record.js +20 -0
- package/dist/esm/static-helpers/serialization/serialize-record.js.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts.map +1 -1
- package/dist/esm/static-helpers/urlTemplate.js +22 -12
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
- package/dist/react-native/aiProjectClient.d.ts +39 -36
- package/dist/react-native/aiProjectClient.d.ts.map +1 -1
- package/dist/react-native/aiProjectClient.js +66 -57
- package/dist/react-native/aiProjectClient.js.map +1 -1
- package/dist/react-native/api/agents/index.d.ts +3 -0
- package/dist/react-native/api/agents/index.d.ts.map +1 -0
- package/dist/react-native/api/agents/index.js +4 -0
- package/dist/react-native/api/agents/index.js.map +1 -0
- package/dist/react-native/api/agents/operations.d.ts +60 -0
- package/dist/react-native/api/agents/operations.d.ts.map +1 -0
- package/dist/react-native/api/agents/operations.js +412 -0
- package/dist/react-native/api/agents/operations.js.map +1 -0
- package/dist/react-native/api/agents/options.d.ts +151 -0
- package/dist/react-native/api/agents/options.d.ts.map +1 -0
- package/dist/react-native/api/agents/options.js +4 -0
- package/dist/react-native/api/agents/options.js.map +1 -0
- package/dist/react-native/api/aiProjectContext.d.ts +6 -13
- package/dist/react-native/api/aiProjectContext.d.ts.map +1 -1
- package/dist/react-native/api/aiProjectContext.js +10 -17
- package/dist/react-native/api/aiProjectContext.js.map +1 -1
- package/dist/react-native/api/connections/index.d.ts +1 -1
- package/dist/react-native/api/connections/index.d.ts.map +1 -1
- package/dist/react-native/api/connections/index.js +1 -1
- package/dist/react-native/api/connections/index.js.map +1 -1
- package/dist/react-native/api/connections/operations.d.ts +1 -1
- package/dist/react-native/api/connections/operations.d.ts.map +1 -1
- package/dist/react-native/api/connections/operations.js +1 -1
- package/dist/react-native/api/connections/operations.js.map +1 -1
- package/dist/react-native/api/datasets/operations.d.ts +8 -13
- package/dist/react-native/api/datasets/operations.d.ts.map +1 -1
- package/dist/react-native/api/datasets/operations.js +129 -141
- package/dist/react-native/api/datasets/operations.js.map +1 -1
- package/dist/react-native/api/deployments/operations.d.ts +1 -1
- package/dist/react-native/api/deployments/operations.d.ts.map +1 -1
- package/dist/react-native/api/deployments/operations.js +1 -1
- package/dist/react-native/api/deployments/operations.js.map +1 -1
- package/dist/react-native/api/evaluationRules/index.d.ts +3 -0
- package/dist/react-native/api/evaluationRules/index.d.ts.map +1 -0
- package/dist/react-native/api/evaluationRules/index.js +4 -0
- package/dist/react-native/api/evaluationRules/index.js.map +1 -0
- package/dist/react-native/api/evaluationRules/operations.d.ts +22 -0
- package/dist/react-native/api/evaluationRules/operations.d.ts.map +1 -0
- package/dist/react-native/api/evaluationRules/operations.js +126 -0
- package/dist/react-native/api/evaluationRules/operations.js.map +1 -0
- package/dist/react-native/api/evaluationRules/options.d.ts +27 -0
- package/dist/react-native/api/evaluationRules/options.d.ts.map +1 -0
- package/dist/react-native/api/evaluationRules/options.js +4 -0
- package/dist/react-native/api/evaluationRules/options.js.map +1 -0
- package/dist/react-native/api/evaluationTaxonomies/index.d.ts +3 -0
- package/dist/react-native/api/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/react-native/api/evaluationTaxonomies/index.js +4 -0
- package/dist/react-native/api/evaluationTaxonomies/index.js.map +1 -0
- package/dist/react-native/api/evaluationTaxonomies/operations.d.ts +26 -0
- package/dist/react-native/api/evaluationTaxonomies/operations.d.ts.map +1 -0
- package/dist/react-native/api/evaluationTaxonomies/operations.js +154 -0
- package/dist/react-native/api/evaluationTaxonomies/operations.js.map +1 -0
- package/dist/react-native/api/evaluationTaxonomies/options.d.ts +27 -0
- package/dist/react-native/api/evaluationTaxonomies/options.d.ts.map +1 -0
- package/dist/react-native/api/evaluationTaxonomies/options.js +4 -0
- package/dist/react-native/api/evaluationTaxonomies/options.js.map +1 -0
- package/dist/react-native/api/evaluators/index.d.ts +3 -0
- package/dist/react-native/api/evaluators/index.d.ts.map +1 -0
- package/dist/react-native/api/evaluators/index.js +4 -0
- package/dist/react-native/api/evaluators/index.js.map +1 -0
- package/dist/react-native/api/evaluators/operations.d.ts +30 -0
- package/dist/react-native/api/evaluators/operations.d.ts.map +1 -0
- package/dist/react-native/api/evaluators/operations.js +171 -0
- package/dist/react-native/api/evaluators/operations.js.map +1 -0
- package/dist/react-native/api/evaluators/options.d.ts +29 -0
- package/dist/react-native/api/evaluators/options.d.ts.map +1 -0
- package/dist/react-native/api/evaluators/options.js +4 -0
- package/dist/react-native/api/evaluators/options.js.map +1 -0
- package/dist/react-native/api/index.d.ts.map +1 -1
- package/dist/react-native/api/index.js +2 -0
- package/dist/react-native/api/index.js.map +1 -1
- package/dist/react-native/api/indexes/operations.d.ts +3 -8
- package/dist/react-native/api/indexes/operations.d.ts.map +1 -1
- package/dist/react-native/api/indexes/operations.js +4 -16
- package/dist/react-native/api/indexes/operations.js.map +1 -1
- package/dist/react-native/api/insights/index.d.ts +3 -0
- package/dist/react-native/api/insights/index.d.ts.map +1 -0
- package/dist/react-native/api/insights/index.js +4 -0
- package/dist/react-native/api/insights/index.js.map +1 -0
- package/dist/react-native/api/insights/operations.d.ts +18 -0
- package/dist/react-native/api/insights/operations.d.ts.map +1 -0
- package/dist/react-native/api/insights/operations.js +109 -0
- package/dist/react-native/api/insights/operations.js.map +1 -0
- package/dist/react-native/api/insights/options.d.ts +32 -0
- package/dist/react-native/api/insights/options.d.ts.map +1 -0
- package/dist/react-native/api/insights/options.js +4 -0
- package/dist/react-native/api/insights/options.js.map +1 -0
- package/dist/react-native/api/memoryStores/index.d.ts +3 -0
- package/dist/react-native/api/memoryStores/index.d.ts.map +1 -0
- package/dist/react-native/api/memoryStores/index.js +4 -0
- package/dist/react-native/api/memoryStores/index.js.map +1 -0
- package/dist/react-native/api/memoryStores/operations.d.ts +43 -0
- package/dist/react-native/api/memoryStores/operations.d.ts.map +1 -0
- package/dist/react-native/api/memoryStores/operations.js +306 -0
- package/dist/react-native/api/memoryStores/operations.js.map +1 -0
- package/dist/react-native/api/memoryStores/options.d.ts +83 -0
- package/dist/react-native/api/memoryStores/options.d.ts.map +1 -0
- package/dist/react-native/api/memoryStores/options.js +4 -0
- package/dist/react-native/api/memoryStores/options.js.map +1 -0
- package/dist/react-native/api/redTeams/index.d.ts +3 -0
- package/dist/react-native/api/redTeams/index.d.ts.map +1 -0
- package/dist/react-native/api/redTeams/index.js +4 -0
- package/dist/react-native/api/redTeams/index.js.map +1 -0
- package/dist/react-native/api/redTeams/operations.d.ts +18 -0
- package/dist/react-native/api/redTeams/operations.d.ts.map +1 -0
- package/dist/react-native/api/redTeams/operations.js +93 -0
- package/dist/react-native/api/redTeams/operations.js.map +1 -0
- package/dist/react-native/api/redTeams/options.d.ts +15 -0
- package/dist/react-native/api/redTeams/options.d.ts.map +1 -0
- package/dist/react-native/api/redTeams/options.js +4 -0
- package/dist/react-native/api/redTeams/options.js.map +1 -0
- package/dist/react-native/api/schedules/index.d.ts +3 -0
- package/dist/react-native/api/schedules/index.d.ts.map +1 -0
- package/dist/react-native/api/schedules/index.js +4 -0
- package/dist/react-native/api/schedules/index.js.map +1 -0
- package/dist/react-native/api/schedules/operations.d.ts +30 -0
- package/dist/react-native/api/schedules/operations.d.ts.map +1 -0
- package/dist/react-native/api/schedules/operations.js +178 -0
- package/dist/react-native/api/schedules/operations.js.map +1 -0
- package/dist/react-native/api/schedules/options.d.ts +26 -0
- package/dist/react-native/api/schedules/options.d.ts.map +1 -0
- package/dist/react-native/api/schedules/options.js +4 -0
- package/dist/react-native/api/schedules/options.js.map +1 -0
- package/dist/react-native/classic/agents/index.d.ts +39 -0
- package/dist/react-native/classic/agents/index.d.ts.map +1 -0
- package/dist/react-native/classic/agents/index.js +43 -0
- package/dist/react-native/classic/agents/index.js.map +1 -0
- package/dist/react-native/classic/connections/index.d.ts +1 -1
- package/dist/react-native/classic/connections/index.d.ts.map +1 -1
- package/dist/react-native/classic/connections/index.js.map +1 -1
- package/dist/react-native/classic/datasets/index.d.ts +4 -9
- package/dist/react-native/classic/datasets/index.d.ts.map +1 -1
- package/dist/react-native/classic/datasets/index.js +0 -1
- package/dist/react-native/classic/datasets/index.js.map +1 -1
- package/dist/react-native/classic/deployments/index.d.ts +1 -1
- package/dist/react-native/classic/deployments/index.d.ts.map +1 -1
- package/dist/react-native/classic/deployments/index.js.map +1 -1
- package/dist/react-native/classic/evaluationRules/index.d.ts +17 -0
- package/dist/react-native/classic/evaluationRules/index.d.ts.map +1 -0
- package/dist/react-native/classic/evaluationRules/index.js +17 -0
- package/dist/react-native/classic/evaluationRules/index.js.map +1 -0
- package/dist/react-native/classic/evaluationTaxonomies/index.d.ts +19 -0
- package/dist/react-native/classic/evaluationTaxonomies/index.d.ts.map +1 -0
- package/dist/react-native/classic/evaluationTaxonomies/index.js +18 -0
- package/dist/react-native/classic/evaluationTaxonomies/index.js.map +1 -0
- package/dist/react-native/classic/evaluators/index.d.ts +21 -0
- package/dist/react-native/classic/evaluators/index.d.ts.map +1 -0
- package/dist/react-native/classic/evaluators/index.js +25 -0
- package/dist/react-native/classic/evaluators/index.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +8 -1
- package/dist/react-native/classic/index.d.ts.map +1 -1
- package/dist/react-native/classic/index.js.map +1 -1
- package/dist/react-native/classic/indexes/index.d.ts +3 -8
- package/dist/react-native/classic/indexes/index.d.ts.map +1 -1
- package/dist/react-native/classic/indexes/index.js +0 -1
- package/dist/react-native/classic/indexes/index.js.map +1 -1
- package/dist/react-native/classic/insights/index.d.ts +15 -0
- package/dist/react-native/classic/insights/index.d.ts.map +1 -0
- package/dist/react-native/classic/insights/index.js +16 -0
- package/dist/react-native/classic/insights/index.js.map +1 -0
- package/dist/react-native/classic/memoryStores/index.d.ts +28 -0
- package/dist/react-native/classic/memoryStores/index.d.ts.map +1 -0
- package/dist/react-native/classic/memoryStores/index.js +22 -0
- package/dist/react-native/classic/memoryStores/index.js.map +1 -0
- package/dist/react-native/classic/redTeams/index.d.ts +15 -0
- package/dist/react-native/classic/redTeams/index.d.ts.map +1 -0
- package/dist/react-native/classic/redTeams/index.js +16 -0
- package/dist/react-native/classic/redTeams/index.js.map +1 -0
- package/dist/react-native/classic/schedules/index.d.ts +21 -0
- package/dist/react-native/classic/schedules/index.d.ts.map +1 -0
- package/dist/react-native/classic/schedules/index.js +19 -0
- package/dist/react-native/classic/schedules/index.js.map +1 -0
- 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 +11 -5
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +2 -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 +1 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +3081 -24
- package/dist/react-native/models/models.d.ts.map +1 -1
- package/dist/react-native/models/models.js +3778 -266
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/overwriteOpenAIClient.d.ts +3 -0
- package/dist/react-native/overwriteOpenAIClient.d.ts.map +1 -0
- package/dist/react-native/overwriteOpenAIClient.js +14 -0
- package/dist/react-native/overwriteOpenAIClient.js.map +1 -0
- package/dist/react-native/restorePollerHelpers.d.ts +24 -0
- package/dist/react-native/restorePollerHelpers.d.ts.map +1 -0
- package/dist/react-native/restorePollerHelpers.js +91 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.js +79 -0
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/serialization/serialize-record.d.ts +2 -0
- package/dist/react-native/static-helpers/serialization/serialize-record.d.ts.map +1 -0
- package/dist/react-native/static-helpers/serialization/serialize-record.js +20 -0
- package/dist/react-native/static-helpers/serialization/serialize-record.js.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts.map +1 -1
- package/dist/react-native/static-helpers/urlTemplate.js +22 -12
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
- package/package.json +11 -11
- package/dist/browser/api/inference/operations.d.ts +0 -19
- package/dist/browser/api/inference/operations.d.ts.map +0 -1
- package/dist/browser/api/inference/operations.js +0 -96
- package/dist/browser/api/inference/operations.js.map +0 -1
- package/dist/browser/api/inference/options.d.ts +0 -21
- package/dist/browser/api/inference/options.d.ts.map +0 -1
- package/dist/browser/api/inference/options.js.map +0 -1
- package/dist/browser/api/telemetry/index.d.ts +0 -2
- package/dist/browser/api/telemetry/index.d.ts.map +0 -1
- package/dist/browser/api/telemetry/index.js +0 -4
- package/dist/browser/api/telemetry/index.js.map +0 -1
- package/dist/browser/api/telemetry/operations.d.ts +0 -22
- package/dist/browser/api/telemetry/operations.d.ts.map +0 -1
- package/dist/browser/api/telemetry/operations.js +0 -55
- package/dist/browser/api/telemetry/operations.js.map +0 -1
- package/dist/browser/classic/inference/index.d.ts +0 -11
- package/dist/browser/classic/inference/index.d.ts.map +0 -1
- package/dist/browser/classic/inference/index.js +0 -14
- package/dist/browser/classic/inference/index.js.map +0 -1
- package/dist/browser/classic/telemetry/index.d.ts +0 -8
- package/dist/browser/classic/telemetry/index.d.ts.map +0 -1
- package/dist/browser/classic/telemetry/index.js +0 -13
- package/dist/browser/classic/telemetry/index.js.map +0 -1
- package/dist/commonjs/api/inference/operations.d.ts +0 -19
- package/dist/commonjs/api/inference/operations.d.ts.map +0 -1
- package/dist/commonjs/api/inference/operations.js +0 -99
- package/dist/commonjs/api/inference/operations.js.map +0 -1
- package/dist/commonjs/api/inference/options.d.ts +0 -21
- package/dist/commonjs/api/inference/options.d.ts.map +0 -1
- package/dist/commonjs/api/inference/options.js.map +0 -1
- package/dist/commonjs/api/telemetry/index.d.ts +0 -2
- package/dist/commonjs/api/telemetry/index.d.ts.map +0 -1
- package/dist/commonjs/api/telemetry/index.js +0 -8
- package/dist/commonjs/api/telemetry/index.js.map +0 -1
- package/dist/commonjs/api/telemetry/operations.d.ts +0 -22
- package/dist/commonjs/api/telemetry/operations.d.ts.map +0 -1
- package/dist/commonjs/api/telemetry/operations.js +0 -58
- package/dist/commonjs/api/telemetry/operations.js.map +0 -1
- package/dist/commonjs/classic/inference/index.d.ts +0 -11
- package/dist/commonjs/classic/inference/index.d.ts.map +0 -1
- package/dist/commonjs/classic/inference/index.js +0 -17
- package/dist/commonjs/classic/inference/index.js.map +0 -1
- package/dist/commonjs/classic/telemetry/index.d.ts +0 -8
- package/dist/commonjs/classic/telemetry/index.d.ts.map +0 -1
- package/dist/commonjs/classic/telemetry/index.js +0 -16
- package/dist/commonjs/classic/telemetry/index.js.map +0 -1
- package/dist/esm/api/inference/operations.d.ts +0 -19
- package/dist/esm/api/inference/operations.d.ts.map +0 -1
- package/dist/esm/api/inference/operations.js +0 -96
- package/dist/esm/api/inference/operations.js.map +0 -1
- package/dist/esm/api/inference/options.d.ts +0 -21
- package/dist/esm/api/inference/options.d.ts.map +0 -1
- package/dist/esm/api/inference/options.js.map +0 -1
- package/dist/esm/api/telemetry/index.d.ts +0 -2
- package/dist/esm/api/telemetry/index.d.ts.map +0 -1
- package/dist/esm/api/telemetry/index.js +0 -4
- package/dist/esm/api/telemetry/index.js.map +0 -1
- package/dist/esm/api/telemetry/operations.d.ts +0 -22
- package/dist/esm/api/telemetry/operations.d.ts.map +0 -1
- package/dist/esm/api/telemetry/operations.js +0 -55
- package/dist/esm/api/telemetry/operations.js.map +0 -1
- package/dist/esm/classic/inference/index.d.ts +0 -11
- package/dist/esm/classic/inference/index.d.ts.map +0 -1
- package/dist/esm/classic/inference/index.js +0 -14
- package/dist/esm/classic/inference/index.js.map +0 -1
- package/dist/esm/classic/telemetry/index.d.ts +0 -8
- package/dist/esm/classic/telemetry/index.d.ts.map +0 -1
- package/dist/esm/classic/telemetry/index.js +0 -13
- package/dist/esm/classic/telemetry/index.js.map +0 -1
- package/dist/react-native/api/inference/operations.d.ts +0 -19
- package/dist/react-native/api/inference/operations.d.ts.map +0 -1
- package/dist/react-native/api/inference/operations.js +0 -96
- package/dist/react-native/api/inference/operations.js.map +0 -1
- package/dist/react-native/api/inference/options.d.ts +0 -21
- package/dist/react-native/api/inference/options.d.ts.map +0 -1
- package/dist/react-native/api/inference/options.js.map +0 -1
- package/dist/react-native/api/telemetry/index.d.ts +0 -2
- package/dist/react-native/api/telemetry/index.d.ts.map +0 -1
- package/dist/react-native/api/telemetry/index.js +0 -4
- package/dist/react-native/api/telemetry/index.js.map +0 -1
- package/dist/react-native/api/telemetry/operations.d.ts +0 -22
- package/dist/react-native/api/telemetry/operations.d.ts.map +0 -1
- package/dist/react-native/api/telemetry/operations.js +0 -55
- package/dist/react-native/api/telemetry/operations.js.map +0 -1
- package/dist/react-native/classic/inference/index.d.ts +0 -11
- package/dist/react-native/classic/inference/index.d.ts.map +0 -1
- package/dist/react-native/classic/inference/index.js +0 -14
- package/dist/react-native/classic/inference/index.js.map +0 -1
- package/dist/react-native/classic/telemetry/index.d.ts +0 -8
- package/dist/react-native/classic/telemetry/index.d.ts.map +0 -1
- package/dist/react-native/classic/telemetry/index.js +0 -13
- package/dist/react-native/classic/telemetry/index.js.map +0 -1
- /package/dist/browser/api/{inference → agents}/options.js +0 -0
- /package/dist/{esm/api/inference → browser/api/evaluationRules}/options.js +0 -0
- /package/dist/{react-native/api/inference → browser/api/evaluationTaxonomies}/options.js +0 -0
- /package/dist/commonjs/api/{inference → agents}/options.js +0 -0
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# Azure AI Projects client library for JavaScript
|
|
2
2
|
|
|
3
|
-
The AI Projects client library provides easy access to resources in your
|
|
3
|
+
The AI Projects client library provides easy access to resources in your Microsoft Foundry project.
|
|
4
4
|
Use it to:
|
|
5
5
|
|
|
6
6
|
- **Create and run Agents** using the `.agents` property on the client.
|
|
7
|
-
- **Get an
|
|
7
|
+
- **Get an OpenAI client** using the `.getOpenAIClient.` method.
|
|
8
8
|
- **Enumerate AI Models** deployed to your Foundry Project using the `.deployments` operations.
|
|
9
9
|
- **Enumerate connected Azure resources** in your Foundry project using the `.connections` operations.
|
|
10
10
|
- **Upload documents and create Datasets** to reference them using the `.datasets` operations.
|
|
11
|
+
- **Upload, retrieve, list, and delete files** using the OpenAI client obtained from `.getOpenAIClient()`. upload files to be used for fine-tuning and other AI model operations.
|
|
11
12
|
- **Create and enumerate Search Indexes** using the `.indexes` operations.
|
|
12
|
-
|
|
13
|
+
|
|
14
|
+
The client library uses version `2025-11-15-preview` of the Microsoft Foundry [data plane REST APIs](https://aka.ms/azsdk/azure-ai-projects/rest-api-reference).
|
|
13
15
|
|
|
14
16
|
[Product documentation](https://aka.ms/azsdk/azure-ai-projects/product-doc)
|
|
15
17
|
| [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-projects/samples)
|
|
@@ -26,12 +28,14 @@ Use it to:
|
|
|
26
28
|
- [Key concepts](#key-concepts)
|
|
27
29
|
- [Create and authenticate the client](#create-and-authenticate-the-client)
|
|
28
30
|
- [Examples](#examples)
|
|
31
|
+
- [Performing Responses operations using OpenAI client](#performing-responses-operations-using-openai-client)
|
|
29
32
|
- [Performing Agent operations](#performing-agent-operations)
|
|
30
|
-
- [Get an authenticated AzureOpenAI client](#get-an-authenticated-azureopenai-client)
|
|
31
33
|
- [Deployments operations](#deployments-operations)
|
|
32
34
|
- [Connections operations](#connections-operations)
|
|
33
35
|
- [Dataset operations](#dataset-operations)
|
|
36
|
+
- [Files operations](#files-operations)
|
|
34
37
|
- [Indexes operations](#indexes-operations)
|
|
38
|
+
- [Tracing](#tracing)
|
|
35
39
|
- [Troubleshooting](#troubleshooting)
|
|
36
40
|
- [Exceptions](#exceptions)
|
|
37
41
|
- [Reporting issues](#reporting-issues)
|
|
@@ -44,7 +48,7 @@ Use it to:
|
|
|
44
48
|
|
|
45
49
|
- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
|
|
46
50
|
- An [Azure subscription][azure_sub].
|
|
47
|
-
- A [project in
|
|
51
|
+
- A [project in Microsoft Foundry](https://learn.microsoft.com/azure/ai-studio/how-to/create-projects?tabs=ai-studio).
|
|
48
52
|
|
|
49
53
|
### Authorization
|
|
50
54
|
|
|
@@ -64,64 +68,99 @@ npm install @azure/ai-projects @azure/identity
|
|
|
64
68
|
|
|
65
69
|
### Create and authenticate the client
|
|
66
70
|
|
|
67
|
-
To construct an `AIProjectsClient`, the `
|
|
71
|
+
To construct an `AIProjectsClient`, the `projectEndpoint` can be fetched from [projectEndpoint][ai_project_client_endpoint]. Below we will assume the environment variable `AZURE_AI_PROJECT_ENDPOINT_STRING` was defined to hold this value:
|
|
68
72
|
|
|
69
73
|
```ts snippet:setup
|
|
70
74
|
import { AIProjectClient } from "@azure/ai-projects";
|
|
71
75
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
72
76
|
|
|
73
|
-
const
|
|
74
|
-
|
|
77
|
+
const projectEndpoint =
|
|
78
|
+
process.env["AZURE_AI_PROJECT_ENDPOINT_STRING"] || "<project endpoint string>";
|
|
79
|
+
const client = new AIProjectClient(projectEndpoint, new DefaultAzureCredential());
|
|
75
80
|
```
|
|
76
81
|
|
|
77
|
-
The client uses API version `
|
|
82
|
+
The client uses API version `2025-11-15-preview`, refer to the [API documentation][ai_foundry_data_plane_rest_apis] to learn more about the supported features.
|
|
78
83
|
|
|
79
84
|
## Examples
|
|
80
85
|
|
|
81
|
-
### Performing
|
|
82
|
-
|
|
83
|
-
The `.agents` property on the `AIProjectClient` gives you access to an authenticated `AgentsClient` from the `azure-ai-agents` package. Below we show how to create an agent and delete it. To see what you can do with the `agent` you created, see the [many samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-agents/samples) associated with the `azure-ai-agents` package.
|
|
84
|
-
|
|
85
|
-
```ts snippet:agentsSample
|
|
86
|
-
const agent = await project.agents.createAgent("gpt-4o", {
|
|
87
|
-
name: "my-agent",
|
|
88
|
-
instructions: "You are a helpful agent",
|
|
89
|
-
});
|
|
90
|
-
console.log(`Created agent, agent ID : ${agent.id}`);
|
|
91
|
-
|
|
92
|
-
// Do something with your Agent!
|
|
93
|
-
// See samples here https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/ai/ai-agents/samples
|
|
94
|
-
await project.agents.deleteAgent(agent.id);
|
|
95
|
-
console.log(`Deleted agent, agent ID: ${agent.id}`);
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Get an authenticated AzureOpenAI client
|
|
86
|
+
### Performing Responses operations using OpenAI client
|
|
99
87
|
|
|
100
|
-
Your
|
|
88
|
+
Your Microsoft Foundry project may have one or more OpenAI models deployed that support chat completions. Use the code below to get an authenticated [OpenAI](https://github.com/openai/openai-python?tab=readme-ov-file#microsoft-azure-openai) from the [openai](https://pypi.org/project/openai/) package, and execute a chat completions call.
|
|
101
89
|
|
|
102
90
|
Run the code below. Here we assume `deploymentName` (str) is defined. It's the deployment name of an AI model in your Foundry Project. As shown in the "Models + endpoints" tab, under the "Name" column.
|
|
103
91
|
|
|
104
|
-
Update the `api_version` value with one found in the "Data plane - inference" row [in this table](https://learn.microsoft.com/azure/ai-foundry/openai/reference#api-specs)
|
|
92
|
+
Update the `api_version` value with one found in the "Data plane - inference" row [in this table](https://learn.microsoft.com/azure/ai-foundry/openai/reference#api-specs)..
|
|
105
93
|
|
|
106
|
-
|
|
94
|
+
For openai logging, please refer [OpenAI Logging]( https://github.com/openai/openai-node/tree/master?tab=readme-ov-file#logging).
|
|
107
95
|
|
|
108
96
|
```ts snippet:openAI
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
apiVersion: "2024-10-21",
|
|
112
|
-
});
|
|
113
|
-
const response = await client.chat.completions.create({
|
|
97
|
+
const openAIClient = await project.getOpenAIClient();
|
|
98
|
+
const response = await openAIClient.responses.create({
|
|
114
99
|
model: deploymentName,
|
|
115
|
-
|
|
100
|
+
input: "What is the size of France in square miles?",
|
|
116
101
|
});
|
|
117
102
|
console.log("response = ", JSON.stringify(response, null, 2));
|
|
118
103
|
```
|
|
119
104
|
|
|
120
|
-
See the "
|
|
105
|
+
See the "responses" folder in the [package samples][samples] for additional samples, including streaming responses.
|
|
106
|
+
|
|
107
|
+
### Performing Agent operations
|
|
108
|
+
|
|
109
|
+
The `.agents` property on the `AIProjectsClient` gives you access to all Agent operations. Agents use an extension of the
|
|
110
|
+
OpenAI Responses protocol, so you will likely need to get an `OpenAI` client to do Agent operations, as shown in the example below.
|
|
121
111
|
|
|
112
|
+
```ts snippet:agents
|
|
113
|
+
const openAIClient = await project.getOpenAIClient();
|
|
114
|
+
const agent = await project.agents.createVersion("my-agent-basic", {
|
|
115
|
+
kind: "prompt",
|
|
116
|
+
model: deploymentName,
|
|
117
|
+
instructions: "You are a helpful assistant that answers general questions",
|
|
118
|
+
});
|
|
119
|
+
console.log(`Agent created (id: ${agent.id}, name: ${agent.name}, version: ${agent.version})`);
|
|
120
|
+
const conversation = await openAIClient.conversations.create({
|
|
121
|
+
items: [
|
|
122
|
+
{ type: "message", role: "user", content: "What is the size of France in square miles?" },
|
|
123
|
+
],
|
|
124
|
+
});
|
|
125
|
+
console.log(`Created conversation with initial user message (id: ${conversation.id})`);
|
|
126
|
+
// Generate response using the agent
|
|
127
|
+
console.log("\nGenerating response...");
|
|
128
|
+
const response = await openAIClient.responses.create(
|
|
129
|
+
{
|
|
130
|
+
conversation: conversation.id,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
body: { agent: { name: agent.name, type: "agent_reference" } },
|
|
134
|
+
},
|
|
135
|
+
);
|
|
136
|
+
console.log(`Response output: ${response.output_text}`);
|
|
137
|
+
// Add a second user message to the conversation
|
|
138
|
+
console.log("\nAdding a second user message to the conversation...");
|
|
139
|
+
await openAIClient.conversations.items.create(conversation.id, {
|
|
140
|
+
items: [{ type: "message", role: "user", content: "And what is the capital city?" }],
|
|
141
|
+
});
|
|
142
|
+
console.log("Added a second user message to the conversation");
|
|
143
|
+
// Generate second response
|
|
144
|
+
console.log("\nGenerating second response...");
|
|
145
|
+
const response2 = await openAIClient.responses.create(
|
|
146
|
+
{
|
|
147
|
+
conversation: conversation.id,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
body: { agent: { name: agent.name, type: "agent_reference" } },
|
|
151
|
+
},
|
|
152
|
+
);
|
|
153
|
+
console.log(`Response output: ${response2.output_text}`);
|
|
154
|
+
// Clean up
|
|
155
|
+
console.log("\nCleaning up resources...");
|
|
156
|
+
await openAIClient.conversations.delete(conversation.id);
|
|
157
|
+
console.log("Conversation deleted");
|
|
158
|
+
await project.agents.deleteVersion(agent.name, agent.version);
|
|
159
|
+
console.log("Agent deleted");
|
|
160
|
+
```
|
|
122
161
|
### Deployments operations
|
|
123
162
|
|
|
124
|
-
The code below shows some Deployments operations, which allow you to enumerate the AI models deployed to your
|
|
163
|
+
The code below shows some Deployments operations, which allow you to enumerate the AI models deployed to your Microsoft Foundry Projects. These models can be seen in the "Models + endpoints" tab in your Microsoft Foundry Project. Full samples can be found under the "deployment" folder in the [package samples][samples].
|
|
125
164
|
|
|
126
165
|
```ts snippet:deployments
|
|
127
166
|
import { ModelDeployment } from "@azure/ai-projects";
|
|
@@ -180,7 +219,7 @@ if (deployments.length > 0) {
|
|
|
180
219
|
|
|
181
220
|
### Connections operations
|
|
182
221
|
|
|
183
|
-
The code below shows some Connection operations, which allow you to enumerate the Azure Resources connected to your
|
|
222
|
+
The code below shows some Connection operations, which allow you to enumerate the Azure Resources connected to your Microsoft Foundry Projects. These connections can be seen in the "Management Center", in the "Connected resources" tab in your Microsoft Foundry Project. Full samples can be found under the "connections" folder in the [package samples][samples].
|
|
184
223
|
|
|
185
224
|
```ts snippet:connections
|
|
186
225
|
import { Connection } from "@azure/ai-projects";
|
|
@@ -294,6 +333,38 @@ await project.datasets.delete(datasetName, dataset3.version);
|
|
|
294
333
|
console.log("All specified Datasets have been deleted.");
|
|
295
334
|
```
|
|
296
335
|
|
|
336
|
+
### Files operations
|
|
337
|
+
|
|
338
|
+
The code below shows some Files operations using the OpenAI client, which allow you to upload, retrieve, list, and delete files. These operations are useful for working with files that can be used for fine-tuning and other AI model operations. Full samples can be found under the "files" folder in the [package samples][samples].
|
|
339
|
+
|
|
340
|
+
```ts snippet:files
|
|
341
|
+
const openAIClient = await project.getOpenAIClient();
|
|
342
|
+
console.log("Uploading file");
|
|
343
|
+
const created = await openAIClient.files.create({
|
|
344
|
+
file: fs.createReadStream(filePath),
|
|
345
|
+
purpose: "fine-tune",
|
|
346
|
+
});
|
|
347
|
+
console.log(`Uploaded file with ID: ${created.id}`);
|
|
348
|
+
const uploadedFile = await openAIClient.files.retrieve(created.id);
|
|
349
|
+
console.log("Processed file metadata:\n", JSON.stringify(uploadedFile, null, 2));
|
|
350
|
+
console.log(`Retrieving file content with ID: ${uploadedFile.id}`);
|
|
351
|
+
const contentResponse = await openAIClient.files.content(uploadedFile.id);
|
|
352
|
+
const buf = Buffer.from(await contentResponse.arrayBuffer());
|
|
353
|
+
console.log(buf.toString("utf-8"));
|
|
354
|
+
// 4) List all files
|
|
355
|
+
console.log("Listing all files:");
|
|
356
|
+
const filesList = await openAIClient.files.list();
|
|
357
|
+
for (const f of filesList.data ?? []) {
|
|
358
|
+
console.log(JSON.stringify(f));
|
|
359
|
+
}
|
|
360
|
+
// 5) Delete the file
|
|
361
|
+
console.log(`Deleting file with ID: ${uploadedFile.id}`);
|
|
362
|
+
const deleted = await openAIClient.files.delete(uploadedFile.id);
|
|
363
|
+
console.log(
|
|
364
|
+
`Successfully deleted file: ${deleted?.id || uploadedFile.id}, deleted=${String(deleted?.deleted ?? true)}`,
|
|
365
|
+
);
|
|
366
|
+
```
|
|
367
|
+
|
|
297
368
|
### Indexes operations
|
|
298
369
|
|
|
299
370
|
The code below shows some Indexes operations. Full samples can be found under the "indexes"
|
|
@@ -331,6 +402,11 @@ for await (const i of allIndexes) {
|
|
|
331
402
|
console.log("Delete the Index versions created above:");
|
|
332
403
|
await project.indexes.delete(indexName, version);
|
|
333
404
|
```
|
|
405
|
+
## Tracing
|
|
406
|
+
|
|
407
|
+
**Note:** Tracing functionality is in preliminary preview and is subject to change. Spans, attributes, and events may be modified in future versions.
|
|
408
|
+
|
|
409
|
+
You can add an Application Insights Azure resource to your Microsoft Foundry project. See the Tracing tab in your Microsoft Foundry project. If one was enabled, you can get the Application Insights connection string, configure your AI Projects client, and observe the full execution path through Azure Monitor. Typically, you might want to start tracing before you create a client or Agent.
|
|
334
410
|
|
|
335
411
|
## Troubleshooting
|
|
336
412
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { AzureOpenAI } from "openai";
|
|
1
|
+
import OpenAI from "openai";
|
|
3
2
|
import { AIProjectClientOptionalParams } from "./api/index.js";
|
|
3
|
+
import { AgentsOperations } from "./classic/agents/index.js";
|
|
4
|
+
import { ConnectionsOperations } from "./classic/connections/index.js";
|
|
5
|
+
import { DatasetsOperations } from "./classic/datasets/index.js";
|
|
4
6
|
import { DeploymentsOperations } from "./classic/deployments/index.js";
|
|
7
|
+
import { EvaluationRulesOperations } from "./classic/evaluationRules/index.js";
|
|
8
|
+
import { EvaluationTaxonomiesOperations } from "./classic/evaluationTaxonomies/index.js";
|
|
9
|
+
import { EvaluatorsOperations } from "./classic/evaluators/index.js";
|
|
5
10
|
import { IndexesOperations } from "./classic/indexes/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import type { Pipeline } from "@azure/core-rest-pipeline";
|
|
11
|
+
import { InsightsOperations } from "./classic/insights/index.js";
|
|
12
|
+
import { MemoryStoresOperations } from "./classic/memoryStores/index.js";
|
|
13
|
+
import { RedTeamsOperations } from "./classic/redTeams/index.js";
|
|
14
|
+
import { SchedulesOperations } from "./classic/schedules/index.js";
|
|
11
15
|
import { TokenCredential } from "@azure/core-auth";
|
|
12
16
|
export { AIProjectClientOptionalParams } from "./api/aiProjectContext.js";
|
|
13
17
|
/**
|
|
@@ -19,24 +23,35 @@ export { AIProjectClientOptionalParams } from "./api/aiProjectContext.js";
|
|
|
19
23
|
* @param {string} endpoint - The endpoint to use
|
|
20
24
|
* @param {TokenCredential} credential - The credential to use
|
|
21
25
|
* @param {AIProjectClientOptionalParams} [options] - Optional parameters for the client.
|
|
26
|
+
* @property {RedTeamsOperations} redTeams - The operation groups for redTeams
|
|
22
27
|
* @property {DeploymentsOperations} deployments - The operation groups for deployments
|
|
23
28
|
* @property {IndexesOperations} indexes - The operation groups for indexes
|
|
24
29
|
* @property {DatasetsOperations} datasets - The operation groups for datasets
|
|
25
30
|
* @property {ConnectionsOperations} connections - The operation groups for connections
|
|
26
|
-
* @
|
|
27
|
-
* @property {
|
|
31
|
+
* @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores
|
|
32
|
+
* @property {AgentsOperations} agents - The operation groups for agents
|
|
33
|
+
* @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client
|
|
34
|
+
* @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client
|
|
28
35
|
*/
|
|
29
36
|
export declare class AIProjectClient {
|
|
30
37
|
private _cognitiveScopeClient;
|
|
31
38
|
private _azureScopeClient;
|
|
32
39
|
private _endpoint;
|
|
33
40
|
private _credential;
|
|
34
|
-
private _agents;
|
|
35
41
|
private _options;
|
|
36
|
-
|
|
37
|
-
/** The
|
|
38
|
-
readonly
|
|
39
|
-
|
|
42
|
+
constructor(endpoint: string, credential: TokenCredential, options?: AIProjectClientOptionalParams);
|
|
43
|
+
/** The operation groups for schedules */
|
|
44
|
+
readonly schedules: SchedulesOperations;
|
|
45
|
+
/** The operation groups for insights */
|
|
46
|
+
readonly insights: InsightsOperations;
|
|
47
|
+
/** The operation groups for evaluators */
|
|
48
|
+
readonly evaluators: EvaluatorsOperations;
|
|
49
|
+
/** The operation groups for evaluationTaxonomies */
|
|
50
|
+
readonly evaluationTaxonomies: EvaluationTaxonomiesOperations;
|
|
51
|
+
/** The operation groups for evaluationRules */
|
|
52
|
+
readonly evaluationRules: EvaluationRulesOperations;
|
|
53
|
+
/** The operation groups for redTeams */
|
|
54
|
+
readonly redTeams: RedTeamsOperations;
|
|
40
55
|
/** The operation groups for deployments */
|
|
41
56
|
readonly deployments: DeploymentsOperations;
|
|
42
57
|
/** The operation groups for indexes */
|
|
@@ -45,31 +60,19 @@ export declare class AIProjectClient {
|
|
|
45
60
|
readonly datasets: DatasetsOperations;
|
|
46
61
|
/** The operation groups for connections */
|
|
47
62
|
readonly connections: ConnectionsOperations;
|
|
48
|
-
/** The operation groups for
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* gets the endpoint of the client
|
|
53
|
-
* @returns the endpoint of the client
|
|
54
|
-
*/
|
|
55
|
-
getEndpointUrl(): string;
|
|
56
|
-
/**
|
|
57
|
-
* Gets the Azure OpenAI client for the project.
|
|
58
|
-
* @returns The Azure OpenAI client for the project.
|
|
59
|
-
*/
|
|
60
|
-
getAzureOpenAIClient(options?: GetAzureOpenAIClientOptions): Promise<AzureOpenAI>;
|
|
63
|
+
/** The operation groups for memoryStores */
|
|
64
|
+
readonly memoryStores: MemoryStoresOperations;
|
|
65
|
+
/** The operation groups for agents */
|
|
66
|
+
readonly agents: AgentsOperations;
|
|
61
67
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @
|
|
64
|
-
* @param credential - The credential to use
|
|
65
|
-
* @param options - The parameter for all optional parameters
|
|
68
|
+
* gets the OpenAI client
|
|
69
|
+
* @returns the OpenAI client
|
|
66
70
|
*/
|
|
67
|
-
|
|
71
|
+
getOpenAIClient(): Promise<OpenAI>;
|
|
68
72
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @returns The AgentsClient associated with this AIProjectClient
|
|
73
|
+
* gets the endpoint of the client
|
|
74
|
+
* @returns the endpoint of the client
|
|
72
75
|
*/
|
|
73
|
-
get
|
|
76
|
+
get endpoint(): string;
|
|
74
77
|
}
|
|
75
78
|
//# sourceMappingURL=aiProjectClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProjectClient.d.ts","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"aiProjectClient.d.ts","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"AAIA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAqC,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAwB,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAA0B,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAA6B,MAAM,gCAAgC,CAAC;AAClG,OAAO,EACL,yBAAyB,EAE1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,8BAA8B,EAE/B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAyB,MAAM,4BAA4B,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAA0B,MAAM,6BAA6B,CAAC;AACzF,OAAO,EACL,sBAAsB,EAEvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAA0B,MAAM,6BAA6B,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAA2B,MAAM,8BAA8B,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,qBAAqB,CAAmB;IAChD,OAAO,CAAC,iBAAiB,CAAmB;IAC5C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,QAAQ,CAAgC;gBAG9C,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,GAAE,6BAAkC;IAoC7C,yCAAyC;IACzC,SAAgB,SAAS,EAAE,mBAAmB,CAAC;IAC/C,wCAAwC;IACxC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;IAC7C,0CAA0C;IAC1C,SAAgB,UAAU,EAAE,oBAAoB,CAAC;IACjD,oDAAoD;IACpD,SAAgB,oBAAoB,EAAE,8BAA8B,CAAC;IACrE,+CAA+C;IAC/C,SAAgB,eAAe,EAAE,yBAAyB,CAAC;IAC3D,wCAAwC;IACxC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;IAC7C,2CAA2C;IAC3C,SAAgB,WAAW,EAAE,qBAAqB,CAAC;IACnD,uCAAuC;IACvC,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAC3C,wCAAwC;IACxC,SAAgB,QAAQ,EAAE,kBAAkB,CAAC;IAC7C,2CAA2C;IAC3C,SAAgB,WAAW,EAAE,qBAAqB,CAAC;IACnD,4CAA4C;IAC5C,SAAgB,YAAY,EAAE,sBAAsB,CAAC;IACrD,sCAAsC;IACtC,SAAgB,MAAM,EAAE,gBAAgB,CAAC;IACzC;;;OAGG;IACU,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC;IAc/C;;;OAGG;IACH,IAAW,QAAQ,IAAI,MAAM,CAE5B;CACF"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
/* eslint-disable tsdoc/syntax */
|
|
4
|
-
import
|
|
4
|
+
import OpenAI from "openai";
|
|
5
|
+
import { getBearerTokenProvider } from "@azure/identity";
|
|
5
6
|
import { createAIProject } from "./api/index.js";
|
|
7
|
+
import { _getAgentsOperations } from "./classic/agents/index.js";
|
|
8
|
+
import { _getConnectionsOperations } from "./classic/connections/index.js";
|
|
9
|
+
import { _getDatasetsOperations } from "./classic/datasets/index.js";
|
|
6
10
|
import { _getDeploymentsOperations } from "./classic/deployments/index.js";
|
|
11
|
+
import { _getEvaluationRulesOperations, } from "./classic/evaluationRules/index.js";
|
|
12
|
+
import { _getEvaluationTaxonomiesOperations, } from "./classic/evaluationTaxonomies/index.js";
|
|
13
|
+
import { _getEvaluatorsOperations } from "./classic/evaluators/index.js";
|
|
7
14
|
import { _getIndexesOperations } from "./classic/indexes/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
15
|
+
import { _getInsightsOperations } from "./classic/insights/index.js";
|
|
16
|
+
import { _getMemoryStoresOperations, } from "./classic/memoryStores/index.js";
|
|
17
|
+
import { _getRedTeamsOperations } from "./classic/redTeams/index.js";
|
|
18
|
+
import { _getSchedulesOperations } from "./classic/schedules/index.js";
|
|
19
|
+
import { overwriteOpenAIClient } from "./overwriteOpenAIClient.js";
|
|
12
20
|
/**
|
|
13
21
|
* The main client for the AIProjectClient service. It provides access to the various operations available in the service.
|
|
14
22
|
* @class AIProjectClient
|
|
@@ -18,51 +26,67 @@ import { _getTelemetryOperations } from "./classic/telemetry/index.js";
|
|
|
18
26
|
* @param {string} endpoint - The endpoint to use
|
|
19
27
|
* @param {TokenCredential} credential - The credential to use
|
|
20
28
|
* @param {AIProjectClientOptionalParams} [options] - Optional parameters for the client.
|
|
29
|
+
* @property {RedTeamsOperations} redTeams - The operation groups for redTeams
|
|
21
30
|
* @property {DeploymentsOperations} deployments - The operation groups for deployments
|
|
22
31
|
* @property {IndexesOperations} indexes - The operation groups for indexes
|
|
23
32
|
* @property {DatasetsOperations} datasets - The operation groups for datasets
|
|
24
33
|
* @property {ConnectionsOperations} connections - The operation groups for connections
|
|
25
|
-
* @
|
|
26
|
-
* @property {
|
|
34
|
+
* @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores
|
|
35
|
+
* @property {AgentsOperations} agents - The operation groups for agents
|
|
36
|
+
* @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client
|
|
37
|
+
* @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client
|
|
27
38
|
*/
|
|
28
39
|
export class AIProjectClient {
|
|
29
40
|
_cognitiveScopeClient;
|
|
30
41
|
_azureScopeClient;
|
|
31
42
|
_endpoint;
|
|
32
43
|
_credential;
|
|
33
|
-
_agents;
|
|
34
44
|
_options;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
pipeline;
|
|
38
|
-
constructor(endpointParam, credential, options = {}) {
|
|
39
|
-
this._endpoint = endpointParam;
|
|
45
|
+
constructor(endpoint, credential, options = {}) {
|
|
46
|
+
this._endpoint = endpoint;
|
|
40
47
|
this._credential = credential;
|
|
41
48
|
this._options = options;
|
|
42
49
|
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
43
50
|
const userAgentPrefix = prefixFromOptions
|
|
44
51
|
? `${prefixFromOptions} azsdk-js-client`
|
|
45
52
|
: `azsdk-js-client`;
|
|
46
|
-
this._cognitiveScopeClient = createAIProject(
|
|
53
|
+
this._cognitiveScopeClient = createAIProject(endpoint, this._credential, {
|
|
47
54
|
...options,
|
|
48
55
|
userAgentOptions: { userAgentPrefix },
|
|
49
|
-
});
|
|
50
|
-
this._azureScopeClient = createAIProject(endpointParam, credential, {
|
|
51
|
-
...options,
|
|
52
56
|
credentials: {
|
|
53
57
|
...options.credentials,
|
|
54
|
-
scopes: ["https://
|
|
58
|
+
scopes: ["https://cognitiveservices.azure.com/.default"],
|
|
55
59
|
},
|
|
60
|
+
});
|
|
61
|
+
this._azureScopeClient = createAIProject(endpoint, credential, {
|
|
62
|
+
...options,
|
|
56
63
|
userAgentOptions: { userAgentPrefix },
|
|
57
64
|
});
|
|
58
|
-
this.
|
|
65
|
+
this.schedules = _getSchedulesOperations(this._cognitiveScopeClient);
|
|
66
|
+
this.insights = _getInsightsOperations(this._cognitiveScopeClient);
|
|
67
|
+
this.evaluators = _getEvaluatorsOperations(this._cognitiveScopeClient);
|
|
68
|
+
this.evaluationTaxonomies = _getEvaluationTaxonomiesOperations(this._cognitiveScopeClient);
|
|
69
|
+
this.evaluationRules = _getEvaluationRulesOperations(this._cognitiveScopeClient);
|
|
70
|
+
this.redTeams = _getRedTeamsOperations(this._cognitiveScopeClient);
|
|
59
71
|
this.deployments = _getDeploymentsOperations(this._azureScopeClient);
|
|
60
72
|
this.indexes = _getIndexesOperations(this._azureScopeClient);
|
|
61
73
|
this.datasets = _getDatasetsOperations(this._azureScopeClient, this._options);
|
|
62
74
|
this.connections = _getConnectionsOperations(this._azureScopeClient);
|
|
63
|
-
this.
|
|
64
|
-
this.
|
|
75
|
+
this.memoryStores = _getMemoryStoresOperations(this._cognitiveScopeClient);
|
|
76
|
+
this.agents = _getAgentsOperations(this._azureScopeClient);
|
|
65
77
|
}
|
|
78
|
+
/** The operation groups for schedules */
|
|
79
|
+
schedules;
|
|
80
|
+
/** The operation groups for insights */
|
|
81
|
+
insights;
|
|
82
|
+
/** The operation groups for evaluators */
|
|
83
|
+
evaluators;
|
|
84
|
+
/** The operation groups for evaluationTaxonomies */
|
|
85
|
+
evaluationTaxonomies;
|
|
86
|
+
/** The operation groups for evaluationRules */
|
|
87
|
+
evaluationRules;
|
|
88
|
+
/** The operation groups for redTeams */
|
|
89
|
+
redTeams;
|
|
66
90
|
/** The operation groups for deployments */
|
|
67
91
|
deployments;
|
|
68
92
|
/** The operation groups for indexes */
|
|
@@ -71,47 +95,32 @@ export class AIProjectClient {
|
|
|
71
95
|
datasets;
|
|
72
96
|
/** The operation groups for connections */
|
|
73
97
|
connections;
|
|
74
|
-
/** The operation groups for
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
* gets the endpoint of the client
|
|
79
|
-
* @returns the endpoint of the client
|
|
80
|
-
*/
|
|
81
|
-
getEndpointUrl() {
|
|
82
|
-
return this._endpoint;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Gets the Azure OpenAI client for the project.
|
|
86
|
-
* @returns The Azure OpenAI client for the project.
|
|
87
|
-
*/
|
|
88
|
-
getAzureOpenAIClient(options) {
|
|
89
|
-
return this._inference.azureOpenAI(options);
|
|
90
|
-
}
|
|
98
|
+
/** The operation groups for memoryStores */
|
|
99
|
+
memoryStores;
|
|
100
|
+
/** The operation groups for agents */
|
|
101
|
+
agents;
|
|
91
102
|
/**
|
|
92
|
-
*
|
|
93
|
-
* @
|
|
94
|
-
* @param credential - The credential to use
|
|
95
|
-
* @param options - The parameter for all optional parameters
|
|
103
|
+
* gets the OpenAI client
|
|
104
|
+
* @returns the OpenAI client
|
|
96
105
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
106
|
+
async getOpenAIClient() {
|
|
107
|
+
const scope = "https://ai.azure.com/.default";
|
|
108
|
+
const azureADTokenProvider = await getBearerTokenProvider(this._credential, scope);
|
|
109
|
+
const openAIOptions = {
|
|
110
|
+
apiKey: azureADTokenProvider,
|
|
111
|
+
baseURL: `${this._endpoint}/openai`,
|
|
112
|
+
defaultQuery: { "api-version": this._options?.apiVersion || "2025-11-15-preview" },
|
|
113
|
+
dangerouslyAllowBrowser: true,
|
|
114
|
+
};
|
|
115
|
+
const openaiClient = new OpenAI(openAIOptions);
|
|
116
|
+
return overwriteOpenAIClient(openaiClient);
|
|
99
117
|
}
|
|
100
118
|
/**
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* @returns The AgentsClient associated with this AIProjectClient
|
|
119
|
+
* gets the endpoint of the client
|
|
120
|
+
* @returns the endpoint of the client
|
|
104
121
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const { apiVersion, ...clientOptions } = this._options;
|
|
108
|
-
if (!this._agents) {
|
|
109
|
-
this._agents = new AgentsClient(this._endpoint, this._credential, {
|
|
110
|
-
...clientOptions,
|
|
111
|
-
userAgentOptions: this._cognitiveScopeClient.getUserAgent(),
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
return this._agents;
|
|
122
|
+
get endpoint() {
|
|
123
|
+
return this._endpoint;
|
|
115
124
|
}
|
|
116
125
|
}
|
|
117
126
|
//# sourceMappingURL=aiProjectClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aiProjectClient.js","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport { AgentsClient } from \"@azure/ai-agents\";\nimport type { AzureOpenAI } from \"openai\";\nimport { createAIProject, AIProjectContext, AIProjectClientOptionalParams } from \"./api/index.js\";\nimport { DeploymentsOperations, _getDeploymentsOperations } from \"./classic/deployments/index.js\";\nimport { IndexesOperations, _getIndexesOperations } from \"./classic/indexes/index.js\";\nimport { DatasetsOperations, _getDatasetsOperations } from \"./classic/datasets/index.js\";\nimport { ConnectionsOperations, _getConnectionsOperations } from \"./classic/connections/index.js\";\nimport { InferenceOperations, _getInferenceOperations } from \"./classic/inference/index.js\";\nimport { TelemetryOperations, _getTelemetryOperations } from \"./classic/telemetry/index.js\";\nimport { GetAzureOpenAIClientOptions } from \"./api/inference/options.js\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { AIProjectClientOptionalParams } from \"./api/aiProjectContext.js\";\n\n/**\n * The main client for the AIProjectClient service. It provides access to the various operations available in the service.\n * @class AIProjectClient\n * @extends {AIProjectContext}\n * @description The main client for the AIProjectClient\n * @constructor\n * @param {string} endpoint - The endpoint to use\n * @param {TokenCredential} credential - The credential to use\n * @param {AIProjectClientOptionalParams} [options] - Optional parameters for the client.\n * @property {DeploymentsOperations} deployments - The operation groups for deployments\n * @property {IndexesOperations} indexes - The operation groups for indexes\n * @property {DatasetsOperations} datasets - The operation groups for datasets\n * @property {ConnectionsOperations} connections - The operation groups for connections\n * @method {getAzureOpenAIClient} getAzureOpenAIClient - get the Azure OpenAI client for the project\n * @property {TelemetryOperations} telemetry - The operation groups for telemetry\n */\nexport class AIProjectClient {\n private _cognitiveScopeClient: AIProjectContext;\n private _azureScopeClient: AIProjectContext;\n private _endpoint: string;\n private _credential: TokenCredential;\n private _agents: AgentsClient | undefined;\n private _options: AIProjectClientOptionalParams;\n private readonly _inference: InferenceOperations;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n endpointParam: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ) {\n this._endpoint = endpointParam;\n this._credential = credential;\n this._options = options;\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._cognitiveScopeClient = createAIProject(endpointParam, credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n\n this._azureScopeClient = createAIProject(endpointParam, credential, {\n ...options,\n credentials: {\n ...options.credentials,\n scopes: [\"https://ai.azure.com/.default\"],\n },\n userAgentOptions: { userAgentPrefix },\n });\n\n this.pipeline = this._cognitiveScopeClient.pipeline;\n this.deployments = _getDeploymentsOperations(this._azureScopeClient);\n this.indexes = _getIndexesOperations(this._azureScopeClient);\n this.datasets = _getDatasetsOperations(this._azureScopeClient, this._options);\n this.connections = _getConnectionsOperations(this._azureScopeClient);\n this._inference = _getInferenceOperations(this._cognitiveScopeClient, this.connections);\n this.telemetry = _getTelemetryOperations(this.connections);\n }\n\n /** The operation groups for deployments */\n public readonly deployments: DeploymentsOperations;\n /** The operation groups for indexes */\n public readonly indexes: IndexesOperations;\n /** The operation groups for datasets */\n public readonly datasets: DatasetsOperations;\n /** The operation groups for connections */\n public readonly connections: ConnectionsOperations;\n /** The operation groups for inference */\n /** The operation groups for telemetry */\n public readonly telemetry: TelemetryOperations;\n /**\n * gets the endpoint of the client\n * @returns the endpoint of the client\n */\n public getEndpointUrl(): string {\n return this._endpoint;\n }\n\n /**\n * Gets the Azure OpenAI client for the project.\n * @returns The Azure OpenAI client for the project.\n */\n public getAzureOpenAIClient(options?: GetAzureOpenAIClientOptions): Promise<AzureOpenAI> {\n return this._inference.azureOpenAI(options);\n }\n\n /**\n * Creates a new instance of AzureAIProjectClient\n * @param endpoint - The endpoint to use\n * @param credential - The credential to use\n * @param options - The parameter for all optional parameters\n */\n static fromEndpoint(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ): AIProjectClient {\n return new AIProjectClient(endpoint, credential, options);\n }\n\n /**\n * Get the AgentsClient associated with this AIProjectClient.\n *\n * @returns The AgentsClient associated with this AIProjectClient\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients\n public get agents(): AgentsClient {\n const { apiVersion, ...clientOptions } = this._options;\n\n if (!this._agents) {\n this._agents = new AgentsClient(this._endpoint, this._credential, {\n ...clientOptions,\n userAgentOptions: this._cognitiveScopeClient.getUserAgent(),\n });\n }\n return this._agents;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"aiProjectClient.js","sourceRoot":"","sources":["../../src/aiProjectClient.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport OpenAI from \"openai\";\nimport { getBearerTokenProvider } from \"@azure/identity\";\nimport { createAIProject, AIProjectContext, AIProjectClientOptionalParams } from \"./api/index.js\";\nimport { AgentsOperations, _getAgentsOperations } from \"./classic/agents/index.js\";\nimport { ConnectionsOperations, _getConnectionsOperations } from \"./classic/connections/index.js\";\nimport { DatasetsOperations, _getDatasetsOperations } from \"./classic/datasets/index.js\";\nimport { DeploymentsOperations, _getDeploymentsOperations } from \"./classic/deployments/index.js\";\nimport {\n EvaluationRulesOperations,\n _getEvaluationRulesOperations,\n} from \"./classic/evaluationRules/index.js\";\nimport {\n EvaluationTaxonomiesOperations,\n _getEvaluationTaxonomiesOperations,\n} from \"./classic/evaluationTaxonomies/index.js\";\nimport { EvaluatorsOperations, _getEvaluatorsOperations } from \"./classic/evaluators/index.js\";\nimport { IndexesOperations, _getIndexesOperations } from \"./classic/indexes/index.js\";\nimport { InsightsOperations, _getInsightsOperations } from \"./classic/insights/index.js\";\nimport {\n MemoryStoresOperations,\n _getMemoryStoresOperations,\n} from \"./classic/memoryStores/index.js\";\nimport { RedTeamsOperations, _getRedTeamsOperations } from \"./classic/redTeams/index.js\";\nimport { SchedulesOperations, _getSchedulesOperations } from \"./classic/schedules/index.js\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { overwriteOpenAIClient } from \"./overwriteOpenAIClient.js\";\n\nexport { AIProjectClientOptionalParams } from \"./api/aiProjectContext.js\";\n\n/**\n * The main client for the AIProjectClient service. It provides access to the various operations available in the service.\n * @class AIProjectClient\n * @extends {AIProjectContext}\n * @description The main client for the AIProjectClient\n * @constructor\n * @param {string} endpoint - The endpoint to use\n * @param {TokenCredential} credential - The credential to use\n * @param {AIProjectClientOptionalParams} [options] - Optional parameters for the client.\n * @property {RedTeamsOperations} redTeams - The operation groups for redTeams\n * @property {DeploymentsOperations} deployments - The operation groups for deployments\n * @property {IndexesOperations} indexes - The operation groups for indexes\n * @property {DatasetsOperations} datasets - The operation groups for datasets\n * @property {ConnectionsOperations} connections - The operation groups for connections\n * @property {MemoryStoresOperations} memoryStores - The operation groups for memoryStores\n * @property {AgentsOperations} agents - The operation groups for agents\n * @property {getEndpointUrl} getEndpointUrl - gets the endpoint of the client\n * @property {getOpenAIClient} getOpenAIClient - gets the OpenAI client\n */\nexport class AIProjectClient {\n private _cognitiveScopeClient: AIProjectContext;\n private _azureScopeClient: AIProjectContext;\n private _endpoint: string;\n private _credential: TokenCredential;\n private _options: AIProjectClientOptionalParams;\n\n constructor(\n endpoint: string,\n credential: TokenCredential,\n options: AIProjectClientOptionalParams = {},\n ) {\n this._endpoint = endpoint;\n this._credential = credential;\n this._options = options;\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._cognitiveScopeClient = createAIProject(endpoint, this._credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n credentials: {\n ...options.credentials,\n scopes: [\"https://cognitiveservices.azure.com/.default\"],\n },\n });\n this._azureScopeClient = createAIProject(endpoint, credential, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n\n this.schedules = _getSchedulesOperations(this._cognitiveScopeClient);\n this.insights = _getInsightsOperations(this._cognitiveScopeClient);\n this.evaluators = _getEvaluatorsOperations(this._cognitiveScopeClient);\n this.evaluationTaxonomies = _getEvaluationTaxonomiesOperations(this._cognitiveScopeClient);\n this.evaluationRules = _getEvaluationRulesOperations(this._cognitiveScopeClient);\n this.redTeams = _getRedTeamsOperations(this._cognitiveScopeClient);\n this.deployments = _getDeploymentsOperations(this._azureScopeClient);\n this.indexes = _getIndexesOperations(this._azureScopeClient);\n this.datasets = _getDatasetsOperations(this._azureScopeClient, this._options);\n this.connections = _getConnectionsOperations(this._azureScopeClient);\n this.memoryStores = _getMemoryStoresOperations(this._cognitiveScopeClient);\n this.agents = _getAgentsOperations(this._azureScopeClient);\n }\n\n /** The operation groups for schedules */\n public readonly schedules: SchedulesOperations;\n /** The operation groups for insights */\n public readonly insights: InsightsOperations;\n /** The operation groups for evaluators */\n public readonly evaluators: EvaluatorsOperations;\n /** The operation groups for evaluationTaxonomies */\n public readonly evaluationTaxonomies: EvaluationTaxonomiesOperations;\n /** The operation groups for evaluationRules */\n public readonly evaluationRules: EvaluationRulesOperations;\n /** The operation groups for redTeams */\n public readonly redTeams: RedTeamsOperations;\n /** The operation groups for deployments */\n public readonly deployments: DeploymentsOperations;\n /** The operation groups for indexes */\n public readonly indexes: IndexesOperations;\n /** The operation groups for datasets */\n public readonly datasets: DatasetsOperations;\n /** The operation groups for connections */\n public readonly connections: ConnectionsOperations;\n /** The operation groups for memoryStores */\n public readonly memoryStores: MemoryStoresOperations;\n /** The operation groups for agents */\n public readonly agents: AgentsOperations;\n /**\n * gets the OpenAI client\n * @returns the OpenAI client\n */\n public async getOpenAIClient(): Promise<OpenAI> {\n const scope = \"https://ai.azure.com/.default\";\n const azureADTokenProvider = await getBearerTokenProvider(this._credential, scope);\n\n const openAIOptions: ConstructorParameters<typeof OpenAI>[0] = {\n apiKey: azureADTokenProvider,\n baseURL: `${this._endpoint}/openai`,\n defaultQuery: { \"api-version\": this._options?.apiVersion || \"2025-11-15-preview\" },\n dangerouslyAllowBrowser: true,\n };\n\n const openaiClient = new OpenAI(openAIOptions);\n return overwriteOpenAIClient(openaiClient);\n }\n /**\n * gets the endpoint of the client\n * @returns the endpoint of the client\n */\n public get endpoint(): string {\n return this._endpoint;\n }\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { listAgentVersions, deleteAgentVersion, getAgentVersion, createAgentVersionFromManifest, createAgentVersion, listAgents, deleteAgent, updateAgentFromManifest, createAgentFromManifest, updateAgent, createAgent, getAgent, } from "./operations.js";
|
|
2
|
+
export { AgentsListAgentVersionsOptionalParams, AgentsDeleteAgentVersionOptionalParams, AgentsGetAgentVersionOptionalParams, AgentsCreateAgentVersionFromManifestOptionalParams, AgentsCreateAgentVersionOptionalParams, AgentsListAgentsOptionalParams, AgentsDeleteAgentOptionalParams, AgentsUpdateAgentFromManifestOptionalParams, AgentsCreateAgentFromManifestOptionalParams, AgentsUpdateAgentOptionalParams, AgentsCreateAgentOptionalParams, AgentsGetAgentOptionalParams, } from "./options.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/agents/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,QAAQ,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qCAAqC,EACrC,sCAAsC,EACtC,mCAAmC,EACnC,kDAAkD,EAClD,sCAAsC,EACtC,8BAA8B,EAC9B,+BAA+B,EAC/B,2CAA2C,EAC3C,2CAA2C,EAC3C,+BAA+B,EAC/B,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
export { listAgentVersions, deleteAgentVersion, getAgentVersion, createAgentVersionFromManifest, createAgentVersion, listAgents, deleteAgent, updateAgentFromManifest, createAgentFromManifest, updateAgent, createAgent, getAgent, } from "./operations.js";
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/agents/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,uBAAuB,EACvB,uBAAuB,EACvB,WAAW,EACX,WAAW,EACX,QAAQ,GACT,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n listAgentVersions,\n deleteAgentVersion,\n getAgentVersion,\n createAgentVersionFromManifest,\n createAgentVersion,\n listAgents,\n deleteAgent,\n updateAgentFromManifest,\n createAgentFromManifest,\n updateAgent,\n createAgent,\n getAgent,\n} from \"./operations.js\";\nexport {\n AgentsListAgentVersionsOptionalParams,\n AgentsDeleteAgentVersionOptionalParams,\n AgentsGetAgentVersionOptionalParams,\n AgentsCreateAgentVersionFromManifestOptionalParams,\n AgentsCreateAgentVersionOptionalParams,\n AgentsListAgentsOptionalParams,\n AgentsDeleteAgentOptionalParams,\n AgentsUpdateAgentFromManifestOptionalParams,\n AgentsCreateAgentFromManifestOptionalParams,\n AgentsUpdateAgentOptionalParams,\n AgentsCreateAgentOptionalParams,\n AgentsGetAgentOptionalParams,\n} from \"./options.js\";\n"]}
|