@azure/ai-projects 1.0.0-beta.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -135
- package/dist/browser/aiProjectClient.d.ts +11 -15
- package/dist/browser/aiProjectClient.d.ts.map +1 -1
- package/dist/browser/aiProjectClient.js +47 -16
- package/dist/browser/aiProjectClient.js.map +1 -1
- package/dist/browser/api/aiProjectContext.js +20 -12
- package/dist/browser/api/aiProjectContext.js.map +1 -1
- package/dist/browser/api/connections/operations.js +41 -37
- package/dist/browser/api/connections/operations.js.map +1 -1
- package/dist/browser/api/datasets/operations.d.ts +7 -7
- package/dist/browser/api/datasets/operations.d.ts.map +1 -1
- package/dist/browser/api/datasets/operations.js +85 -40
- package/dist/browser/api/datasets/operations.js.map +1 -1
- package/dist/browser/api/deployments/operations.js +25 -13
- package/dist/browser/api/deployments/operations.js.map +1 -1
- package/dist/browser/api/index.d.ts +17 -1
- package/dist/browser/api/index.d.ts.map +1 -1
- package/dist/browser/api/index.js +1 -3
- package/dist/browser/api/index.js.map +1 -1
- package/dist/browser/api/indexes/operations.d.ts +2 -2
- package/dist/browser/api/indexes/operations.d.ts.map +1 -1
- package/dist/browser/api/indexes/operations.js +45 -18
- package/dist/browser/api/indexes/operations.js.map +1 -1
- package/dist/browser/api/inference/operations.d.ts +0 -40
- package/dist/browser/api/inference/operations.d.ts.map +1 -1
- package/dist/browser/api/inference/operations.js +6 -87
- package/dist/browser/api/inference/operations.js.map +1 -1
- package/dist/browser/api/inference/options.d.ts +4 -1
- package/dist/browser/api/inference/options.d.ts.map +1 -1
- package/dist/browser/api/inference/options.js.map +1 -1
- package/dist/browser/api/telemetry/operations.d.ts +1 -1
- package/dist/browser/api/telemetry/operations.d.ts.map +1 -1
- package/dist/browser/api/telemetry/operations.js +8 -23
- package/dist/browser/api/telemetry/operations.js.map +1 -1
- package/dist/browser/classic/connections/index.js +3 -1
- package/dist/browser/classic/connections/index.js.map +1 -1
- package/dist/browser/classic/datasets/index.d.ts +7 -6
- package/dist/browser/classic/datasets/index.d.ts.map +1 -1
- package/dist/browser/classic/datasets/index.js +9 -7
- package/dist/browser/classic/datasets/index.js.map +1 -1
- package/dist/browser/classic/deployments/index.js +3 -1
- package/dist/browser/classic/deployments/index.js.map +1 -1
- package/dist/browser/classic/index.d.ts +0 -2
- 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 +1 -1
- package/dist/browser/classic/indexes/index.d.ts.map +1 -1
- package/dist/browser/classic/indexes/index.js +4 -2
- package/dist/browser/classic/indexes/index.js.map +1 -1
- package/dist/browser/classic/inference/index.d.ts +0 -7
- package/dist/browser/classic/inference/index.d.ts.map +1 -1
- package/dist/browser/classic/inference/index.js +4 -5
- package/dist/browser/classic/inference/index.js.map +1 -1
- package/dist/browser/classic/telemetry/index.d.ts +1 -4
- package/dist/browser/classic/telemetry/index.d.ts.map +1 -1
- package/dist/browser/classic/telemetry/index.js +1 -2
- package/dist/browser/classic/telemetry/index.js.map +1 -1
- package/dist/browser/constants.d.ts +1 -1
- package/dist/browser/constants.d.ts.map +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/index.d.ts +6 -6
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/index.d.ts +1 -2
- package/dist/browser/models/index.d.ts.map +1 -1
- package/dist/browser/models/index.js +0 -1
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +3 -203
- package/dist/browser/models/models.d.ts.map +1 -1
- package/dist/browser/models/models.js +2 -249
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/static-helpers/pagingHelpers.js +31 -50
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/browser/static-helpers/urlTemplate.js +3 -3
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/aiProjectClient.d.ts +11 -15
- package/dist/commonjs/aiProjectClient.d.ts.map +1 -1
- package/dist/commonjs/aiProjectClient.js +56 -25
- package/dist/commonjs/aiProjectClient.js.map +1 -1
- package/dist/commonjs/api/aiProjectContext.js +20 -12
- package/dist/commonjs/api/aiProjectContext.js.map +1 -1
- package/dist/commonjs/api/connections/operations.js +41 -37
- package/dist/commonjs/api/connections/operations.js.map +1 -1
- package/dist/commonjs/api/datasets/operations.d.ts +7 -7
- package/dist/commonjs/api/datasets/operations.d.ts.map +1 -1
- package/dist/commonjs/api/datasets/operations.js +95 -50
- package/dist/commonjs/api/datasets/operations.js.map +1 -1
- package/dist/commonjs/api/deployments/operations.js +25 -13
- package/dist/commonjs/api/deployments/operations.js.map +1 -1
- package/dist/commonjs/api/index.d.ts +17 -1
- package/dist/commonjs/api/index.d.ts.map +1 -1
- package/dist/commonjs/api/index.js +0 -2
- package/dist/commonjs/api/index.js.map +1 -1
- package/dist/commonjs/api/indexes/operations.d.ts +2 -2
- package/dist/commonjs/api/indexes/operations.d.ts.map +1 -1
- package/dist/commonjs/api/indexes/operations.js +45 -18
- package/dist/commonjs/api/indexes/operations.js.map +1 -1
- package/dist/commonjs/api/inference/operations.d.ts +0 -40
- package/dist/commonjs/api/inference/operations.d.ts.map +1 -1
- package/dist/commonjs/api/inference/operations.js +6 -93
- package/dist/commonjs/api/inference/operations.js.map +1 -1
- package/dist/commonjs/api/inference/options.d.ts +4 -1
- package/dist/commonjs/api/inference/options.d.ts.map +1 -1
- package/dist/commonjs/api/inference/options.js.map +1 -1
- package/dist/commonjs/api/telemetry/operations.d.ts +1 -1
- package/dist/commonjs/api/telemetry/operations.d.ts.map +1 -1
- package/dist/commonjs/api/telemetry/operations.js +8 -23
- package/dist/commonjs/api/telemetry/operations.js.map +1 -1
- package/dist/commonjs/classic/connections/index.js +3 -1
- package/dist/commonjs/classic/connections/index.js.map +1 -1
- package/dist/commonjs/classic/datasets/index.d.ts +7 -6
- package/dist/commonjs/classic/datasets/index.d.ts.map +1 -1
- package/dist/commonjs/classic/datasets/index.js +9 -7
- package/dist/commonjs/classic/datasets/index.js.map +1 -1
- package/dist/commonjs/classic/deployments/index.js +3 -1
- package/dist/commonjs/classic/deployments/index.js.map +1 -1
- package/dist/commonjs/classic/index.d.ts +0 -2
- 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 +1 -1
- package/dist/commonjs/classic/indexes/index.d.ts.map +1 -1
- package/dist/commonjs/classic/indexes/index.js +4 -2
- package/dist/commonjs/classic/indexes/index.js.map +1 -1
- package/dist/commonjs/classic/inference/index.d.ts +0 -7
- package/dist/commonjs/classic/inference/index.d.ts.map +1 -1
- package/dist/commonjs/classic/inference/index.js +3 -4
- package/dist/commonjs/classic/inference/index.js.map +1 -1
- package/dist/commonjs/classic/telemetry/index.d.ts +1 -4
- package/dist/commonjs/classic/telemetry/index.d.ts.map +1 -1
- package/dist/commonjs/classic/telemetry/index.js +1 -4
- package/dist/commonjs/classic/telemetry/index.js.map +1 -1
- package/dist/commonjs/constants.d.ts +1 -1
- package/dist/commonjs/constants.d.ts.map +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/index.d.ts +6 -6
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +1 -2
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +1 -3
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/models.d.ts +3 -203
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +2 -281
- package/dist/commonjs/models/models.js.map +1 -1
- package/dist/commonjs/static-helpers/pagingHelpers.js +31 -50
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/commonjs/static-helpers/urlTemplate.js +3 -3
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/aiProjectClient.d.ts +11 -15
- package/dist/esm/aiProjectClient.d.ts.map +1 -1
- package/dist/esm/aiProjectClient.js +47 -16
- package/dist/esm/aiProjectClient.js.map +1 -1
- package/dist/esm/api/aiProjectContext.js +20 -12
- package/dist/esm/api/aiProjectContext.js.map +1 -1
- package/dist/esm/api/connections/operations.js +41 -37
- package/dist/esm/api/connections/operations.js.map +1 -1
- package/dist/esm/api/datasets/operations.d.ts +7 -7
- package/dist/esm/api/datasets/operations.d.ts.map +1 -1
- package/dist/esm/api/datasets/operations.js +85 -40
- package/dist/esm/api/datasets/operations.js.map +1 -1
- package/dist/esm/api/deployments/operations.js +25 -13
- package/dist/esm/api/deployments/operations.js.map +1 -1
- package/dist/esm/api/index.d.ts +17 -1
- package/dist/esm/api/index.d.ts.map +1 -1
- package/dist/esm/api/index.js +1 -3
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/indexes/operations.d.ts +2 -2
- package/dist/esm/api/indexes/operations.d.ts.map +1 -1
- package/dist/esm/api/indexes/operations.js +45 -18
- package/dist/esm/api/indexes/operations.js.map +1 -1
- package/dist/esm/api/inference/operations.d.ts +0 -40
- package/dist/esm/api/inference/operations.d.ts.map +1 -1
- package/dist/esm/api/inference/operations.js +6 -87
- package/dist/esm/api/inference/operations.js.map +1 -1
- package/dist/esm/api/inference/options.d.ts +4 -1
- package/dist/esm/api/inference/options.d.ts.map +1 -1
- package/dist/esm/api/inference/options.js.map +1 -1
- package/dist/esm/api/telemetry/operations.d.ts +1 -1
- package/dist/esm/api/telemetry/operations.d.ts.map +1 -1
- package/dist/esm/api/telemetry/operations.js +8 -23
- package/dist/esm/api/telemetry/operations.js.map +1 -1
- package/dist/esm/classic/connections/index.js +3 -1
- package/dist/esm/classic/connections/index.js.map +1 -1
- package/dist/esm/classic/datasets/index.d.ts +7 -6
- package/dist/esm/classic/datasets/index.d.ts.map +1 -1
- package/dist/esm/classic/datasets/index.js +9 -7
- package/dist/esm/classic/datasets/index.js.map +1 -1
- package/dist/esm/classic/deployments/index.js +3 -1
- package/dist/esm/classic/deployments/index.js.map +1 -1
- package/dist/esm/classic/index.d.ts +0 -2
- 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 +1 -1
- package/dist/esm/classic/indexes/index.d.ts.map +1 -1
- package/dist/esm/classic/indexes/index.js +4 -2
- package/dist/esm/classic/indexes/index.js.map +1 -1
- package/dist/esm/classic/inference/index.d.ts +0 -7
- package/dist/esm/classic/inference/index.d.ts.map +1 -1
- package/dist/esm/classic/inference/index.js +4 -5
- package/dist/esm/classic/inference/index.js.map +1 -1
- package/dist/esm/classic/telemetry/index.d.ts +1 -4
- package/dist/esm/classic/telemetry/index.d.ts.map +1 -1
- package/dist/esm/classic/telemetry/index.js +1 -2
- package/dist/esm/classic/telemetry/index.js.map +1 -1
- package/dist/esm/constants.d.ts +1 -1
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/index.d.ts +6 -6
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +1 -2
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +0 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/models.d.ts +3 -203
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js +2 -249
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/static-helpers/pagingHelpers.js +31 -50
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/esm/static-helpers/urlTemplate.js +3 -3
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
- package/dist/react-native/aiProjectClient.d.ts +11 -15
- package/dist/react-native/aiProjectClient.d.ts.map +1 -1
- package/dist/react-native/aiProjectClient.js +47 -16
- package/dist/react-native/aiProjectClient.js.map +1 -1
- package/dist/react-native/api/aiProjectContext.js +20 -12
- package/dist/react-native/api/aiProjectContext.js.map +1 -1
- package/dist/react-native/api/connections/operations.js +41 -37
- package/dist/react-native/api/connections/operations.js.map +1 -1
- package/dist/react-native/api/datasets/operations.d.ts +7 -7
- package/dist/react-native/api/datasets/operations.d.ts.map +1 -1
- package/dist/react-native/api/datasets/operations.js +85 -40
- package/dist/react-native/api/datasets/operations.js.map +1 -1
- package/dist/react-native/api/deployments/operations.js +25 -13
- package/dist/react-native/api/deployments/operations.js.map +1 -1
- package/dist/react-native/api/index.d.ts +17 -1
- package/dist/react-native/api/index.d.ts.map +1 -1
- package/dist/react-native/api/index.js +1 -3
- package/dist/react-native/api/index.js.map +1 -1
- package/dist/react-native/api/indexes/operations.d.ts +2 -2
- package/dist/react-native/api/indexes/operations.d.ts.map +1 -1
- package/dist/react-native/api/indexes/operations.js +45 -18
- package/dist/react-native/api/indexes/operations.js.map +1 -1
- package/dist/react-native/api/inference/operations.d.ts +0 -40
- package/dist/react-native/api/inference/operations.d.ts.map +1 -1
- package/dist/react-native/api/inference/operations.js +6 -87
- package/dist/react-native/api/inference/operations.js.map +1 -1
- package/dist/react-native/api/inference/options.d.ts +4 -1
- package/dist/react-native/api/inference/options.d.ts.map +1 -1
- package/dist/react-native/api/inference/options.js.map +1 -1
- package/dist/react-native/api/telemetry/operations.d.ts +1 -1
- package/dist/react-native/api/telemetry/operations.d.ts.map +1 -1
- package/dist/react-native/api/telemetry/operations.js +8 -23
- package/dist/react-native/api/telemetry/operations.js.map +1 -1
- package/dist/react-native/classic/connections/index.js +3 -1
- package/dist/react-native/classic/connections/index.js.map +1 -1
- package/dist/react-native/classic/datasets/index.d.ts +7 -6
- package/dist/react-native/classic/datasets/index.d.ts.map +1 -1
- package/dist/react-native/classic/datasets/index.js +9 -7
- package/dist/react-native/classic/datasets/index.js.map +1 -1
- package/dist/react-native/classic/deployments/index.js +3 -1
- package/dist/react-native/classic/deployments/index.js.map +1 -1
- package/dist/react-native/classic/index.d.ts +0 -2
- 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 +1 -1
- package/dist/react-native/classic/indexes/index.d.ts.map +1 -1
- package/dist/react-native/classic/indexes/index.js +4 -2
- package/dist/react-native/classic/indexes/index.js.map +1 -1
- package/dist/react-native/classic/inference/index.d.ts +0 -7
- package/dist/react-native/classic/inference/index.d.ts.map +1 -1
- package/dist/react-native/classic/inference/index.js +4 -5
- package/dist/react-native/classic/inference/index.js.map +1 -1
- package/dist/react-native/classic/telemetry/index.d.ts +1 -4
- package/dist/react-native/classic/telemetry/index.d.ts.map +1 -1
- package/dist/react-native/classic/telemetry/index.js +1 -2
- package/dist/react-native/classic/telemetry/index.js.map +1 -1
- package/dist/react-native/constants.d.ts +1 -1
- package/dist/react-native/constants.d.ts.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/index.d.ts +6 -6
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/index.d.ts +1 -2
- package/dist/react-native/models/index.d.ts.map +1 -1
- package/dist/react-native/models/index.js +0 -1
- package/dist/react-native/models/index.js.map +1 -1
- package/dist/react-native/models/models.d.ts +3 -203
- package/dist/react-native/models/models.d.ts.map +1 -1
- package/dist/react-native/models/models.js +2 -249
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/static-helpers/pagingHelpers.js +31 -50
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
- package/dist/react-native/static-helpers/urlTemplate.js +3 -3
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
- package/package.json +15 -21
- package/dist/browser/api/evaluations/index.d.ts +0 -3
- package/dist/browser/api/evaluations/index.d.ts.map +0 -1
- package/dist/browser/api/evaluations/index.js +0 -4
- package/dist/browser/api/evaluations/index.js.map +0 -1
- package/dist/browser/api/evaluations/operations.d.ts +0 -22
- package/dist/browser/api/evaluations/operations.d.ts.map +0 -1
- package/dist/browser/api/evaluations/operations.js +0 -99
- package/dist/browser/api/evaluations/operations.js.map +0 -1
- package/dist/browser/api/evaluations/options.d.ts +0 -18
- package/dist/browser/api/evaluations/options.d.ts.map +0 -1
- package/dist/browser/api/evaluations/options.js +0 -4
- package/dist/browser/api/evaluations/options.js.map +0 -1
- package/dist/browser/api/inference/enableTelemetry.d.ts +0 -21
- package/dist/browser/api/inference/enableTelemetry.d.ts.map +0 -1
- package/dist/browser/api/inference/enableTelemetry.js +0 -185
- package/dist/browser/api/inference/enableTelemetry.js.map +0 -1
- package/dist/browser/api/redTeams/index.d.ts +0 -3
- package/dist/browser/api/redTeams/index.d.ts.map +0 -1
- package/dist/browser/api/redTeams/index.js +0 -4
- package/dist/browser/api/redTeams/index.js.map +0 -1
- package/dist/browser/api/redTeams/operations.d.ts +0 -18
- package/dist/browser/api/redTeams/operations.d.ts.map +0 -1
- package/dist/browser/api/redTeams/operations.js +0 -74
- package/dist/browser/api/redTeams/operations.js.map +0 -1
- package/dist/browser/api/redTeams/options.d.ts +0 -15
- package/dist/browser/api/redTeams/options.d.ts.map +0 -1
- package/dist/browser/api/redTeams/options.js +0 -4
- package/dist/browser/api/redTeams/options.js.map +0 -1
- package/dist/browser/classic/evaluations/index.d.ts +0 -17
- package/dist/browser/classic/evaluations/index.d.ts.map +0 -1
- package/dist/browser/classic/evaluations/index.js +0 -15
- package/dist/browser/classic/evaluations/index.js.map +0 -1
- package/dist/browser/classic/redTeams/index.d.ts +0 -15
- package/dist/browser/classic/redTeams/index.d.ts.map +0 -1
- package/dist/browser/classic/redTeams/index.js +0 -14
- package/dist/browser/classic/redTeams/index.js.map +0 -1
- package/dist/browser/models/evaluations.d.ts +0 -55
- package/dist/browser/models/evaluations.d.ts.map +0 -1
- package/dist/browser/models/evaluations.js +0 -56
- package/dist/browser/models/evaluations.js.map +0 -1
- package/dist/commonjs/api/evaluations/index.d.ts +0 -3
- package/dist/commonjs/api/evaluations/index.d.ts.map +0 -1
- package/dist/commonjs/api/evaluations/index.js +0 -11
- package/dist/commonjs/api/evaluations/index.js.map +0 -1
- package/dist/commonjs/api/evaluations/operations.d.ts +0 -22
- package/dist/commonjs/api/evaluations/operations.d.ts.map +0 -1
- package/dist/commonjs/api/evaluations/operations.js +0 -113
- package/dist/commonjs/api/evaluations/operations.js.map +0 -1
- package/dist/commonjs/api/evaluations/options.d.ts +0 -18
- package/dist/commonjs/api/evaluations/options.d.ts.map +0 -1
- package/dist/commonjs/api/evaluations/options.js +0 -5
- package/dist/commonjs/api/evaluations/options.js.map +0 -1
- package/dist/commonjs/api/inference/enableTelemetry.d.ts +0 -21
- package/dist/commonjs/api/inference/enableTelemetry.d.ts.map +0 -1
- package/dist/commonjs/api/inference/enableTelemetry.js +0 -189
- package/dist/commonjs/api/inference/enableTelemetry.js.map +0 -1
- package/dist/commonjs/api/redTeams/index.d.ts +0 -3
- package/dist/commonjs/api/redTeams/index.d.ts.map +0 -1
- package/dist/commonjs/api/redTeams/index.js +0 -10
- package/dist/commonjs/api/redTeams/index.js.map +0 -1
- package/dist/commonjs/api/redTeams/operations.d.ts +0 -18
- package/dist/commonjs/api/redTeams/operations.d.ts.map +0 -1
- package/dist/commonjs/api/redTeams/operations.js +0 -85
- package/dist/commonjs/api/redTeams/operations.js.map +0 -1
- package/dist/commonjs/api/redTeams/options.d.ts +0 -15
- package/dist/commonjs/api/redTeams/options.d.ts.map +0 -1
- package/dist/commonjs/api/redTeams/options.js +0 -5
- package/dist/commonjs/api/redTeams/options.js.map +0 -1
- package/dist/commonjs/classic/evaluations/index.d.ts +0 -17
- package/dist/commonjs/classic/evaluations/index.d.ts.map +0 -1
- package/dist/commonjs/classic/evaluations/index.js +0 -18
- package/dist/commonjs/classic/evaluations/index.js.map +0 -1
- package/dist/commonjs/classic/redTeams/index.d.ts +0 -15
- package/dist/commonjs/classic/redTeams/index.d.ts.map +0 -1
- package/dist/commonjs/classic/redTeams/index.js +0 -17
- package/dist/commonjs/classic/redTeams/index.js.map +0 -1
- package/dist/commonjs/models/evaluations.d.ts +0 -55
- package/dist/commonjs/models/evaluations.d.ts.map +0 -1
- package/dist/commonjs/models/evaluations.js +0 -59
- package/dist/commonjs/models/evaluations.js.map +0 -1
- package/dist/esm/api/evaluations/index.d.ts +0 -3
- package/dist/esm/api/evaluations/index.d.ts.map +0 -1
- package/dist/esm/api/evaluations/index.js +0 -4
- package/dist/esm/api/evaluations/index.js.map +0 -1
- package/dist/esm/api/evaluations/operations.d.ts +0 -22
- package/dist/esm/api/evaluations/operations.d.ts.map +0 -1
- package/dist/esm/api/evaluations/operations.js +0 -99
- package/dist/esm/api/evaluations/operations.js.map +0 -1
- package/dist/esm/api/evaluations/options.d.ts +0 -18
- package/dist/esm/api/evaluations/options.d.ts.map +0 -1
- package/dist/esm/api/evaluations/options.js +0 -4
- package/dist/esm/api/evaluations/options.js.map +0 -1
- package/dist/esm/api/inference/enableTelemetry.d.ts +0 -21
- package/dist/esm/api/inference/enableTelemetry.d.ts.map +0 -1
- package/dist/esm/api/inference/enableTelemetry.js +0 -185
- package/dist/esm/api/inference/enableTelemetry.js.map +0 -1
- package/dist/esm/api/redTeams/index.d.ts +0 -3
- package/dist/esm/api/redTeams/index.d.ts.map +0 -1
- package/dist/esm/api/redTeams/index.js +0 -4
- package/dist/esm/api/redTeams/index.js.map +0 -1
- package/dist/esm/api/redTeams/operations.d.ts +0 -18
- package/dist/esm/api/redTeams/operations.d.ts.map +0 -1
- package/dist/esm/api/redTeams/operations.js +0 -74
- package/dist/esm/api/redTeams/operations.js.map +0 -1
- package/dist/esm/api/redTeams/options.d.ts +0 -15
- package/dist/esm/api/redTeams/options.d.ts.map +0 -1
- package/dist/esm/api/redTeams/options.js +0 -4
- package/dist/esm/api/redTeams/options.js.map +0 -1
- package/dist/esm/classic/evaluations/index.d.ts +0 -17
- package/dist/esm/classic/evaluations/index.d.ts.map +0 -1
- package/dist/esm/classic/evaluations/index.js +0 -15
- package/dist/esm/classic/evaluations/index.js.map +0 -1
- package/dist/esm/classic/redTeams/index.d.ts +0 -15
- package/dist/esm/classic/redTeams/index.d.ts.map +0 -1
- package/dist/esm/classic/redTeams/index.js +0 -14
- package/dist/esm/classic/redTeams/index.js.map +0 -1
- package/dist/esm/models/evaluations.d.ts +0 -55
- package/dist/esm/models/evaluations.d.ts.map +0 -1
- package/dist/esm/models/evaluations.js +0 -56
- package/dist/esm/models/evaluations.js.map +0 -1
- package/dist/react-native/api/evaluations/index.d.ts +0 -3
- package/dist/react-native/api/evaluations/index.d.ts.map +0 -1
- package/dist/react-native/api/evaluations/index.js +0 -4
- package/dist/react-native/api/evaluations/index.js.map +0 -1
- package/dist/react-native/api/evaluations/operations.d.ts +0 -22
- package/dist/react-native/api/evaluations/operations.d.ts.map +0 -1
- package/dist/react-native/api/evaluations/operations.js +0 -99
- package/dist/react-native/api/evaluations/operations.js.map +0 -1
- package/dist/react-native/api/evaluations/options.d.ts +0 -18
- package/dist/react-native/api/evaluations/options.d.ts.map +0 -1
- package/dist/react-native/api/evaluations/options.js +0 -4
- package/dist/react-native/api/evaluations/options.js.map +0 -1
- package/dist/react-native/api/inference/enableTelemetry.d.ts +0 -21
- package/dist/react-native/api/inference/enableTelemetry.d.ts.map +0 -1
- package/dist/react-native/api/inference/enableTelemetry.js +0 -185
- package/dist/react-native/api/inference/enableTelemetry.js.map +0 -1
- package/dist/react-native/api/redTeams/index.d.ts +0 -3
- package/dist/react-native/api/redTeams/index.d.ts.map +0 -1
- package/dist/react-native/api/redTeams/index.js +0 -4
- package/dist/react-native/api/redTeams/index.js.map +0 -1
- package/dist/react-native/api/redTeams/operations.d.ts +0 -18
- package/dist/react-native/api/redTeams/operations.d.ts.map +0 -1
- package/dist/react-native/api/redTeams/operations.js +0 -74
- package/dist/react-native/api/redTeams/operations.js.map +0 -1
- package/dist/react-native/api/redTeams/options.d.ts +0 -15
- package/dist/react-native/api/redTeams/options.d.ts.map +0 -1
- package/dist/react-native/api/redTeams/options.js +0 -4
- package/dist/react-native/api/redTeams/options.js.map +0 -1
- package/dist/react-native/classic/evaluations/index.d.ts +0 -17
- package/dist/react-native/classic/evaluations/index.d.ts.map +0 -1
- package/dist/react-native/classic/evaluations/index.js +0 -15
- package/dist/react-native/classic/evaluations/index.js.map +0 -1
- package/dist/react-native/classic/redTeams/index.d.ts +0 -15
- package/dist/react-native/classic/redTeams/index.d.ts.map +0 -1
- package/dist/react-native/classic/redTeams/index.js +0 -14
- package/dist/react-native/classic/redTeams/index.js.map +0 -1
- package/dist/react-native/models/evaluations.d.ts +0 -55
- package/dist/react-native/models/evaluations.d.ts.map +0 -1
- package/dist/react-native/models/evaluations.js +0 -56
- package/dist/react-native/models/evaluations.js.map +0 -1
|
@@ -1,88 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
/* eslint-disable tsdoc/syntax */
|
|
4
|
-
import createModelClient from "@azure-rest/ai-inference";
|
|
5
3
|
import { getBearerTokenProvider } from "@azure/identity";
|
|
6
4
|
import { AzureOpenAI } from "openai";
|
|
7
|
-
/**
|
|
8
|
-
* Converts an input URL in the format:
|
|
9
|
-
* https://<host-name>/<some-path>
|
|
10
|
-
* to:
|
|
11
|
-
* https://<host-name>/api/models
|
|
12
|
-
*
|
|
13
|
-
* @param url - The input endpoint URL used to construct AIProjectClient.
|
|
14
|
-
* @returns The endpoint URL required to construct inference clients from the @azure-rest/ai-inference package.
|
|
15
|
-
* @throws Error if the URL is not a valid HTTPS URL with a host.
|
|
16
|
-
*/
|
|
17
|
-
export function _getInferenceURL(url) {
|
|
18
|
-
try {
|
|
19
|
-
const parsedUrl = new URL(url);
|
|
20
|
-
if (parsedUrl.protocol !== "https:" || !parsedUrl.hostname) {
|
|
21
|
-
throw new Error("Invalid endpoint URL format. Must be an https URL with a host.");
|
|
22
|
-
}
|
|
23
|
-
return `https://${parsedUrl.hostname}/models`;
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
if (error instanceof TypeError) {
|
|
27
|
-
throw new Error("Invalid URL format. Please provide a valid URL.");
|
|
28
|
-
}
|
|
29
|
-
throw error;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* a generic function to get the inference client for making inference requests.
|
|
34
|
-
* @param context - The AIProjectContext used to construct the client.
|
|
35
|
-
* @param options - Optional parameters for the model client.
|
|
36
|
-
* @returns The ModelClient instance for making inference requests.
|
|
37
|
-
*/
|
|
38
|
-
export function _getInferenceClient(context, options) {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
const url = _getInferenceURL(context.getEndpointUrl());
|
|
41
|
-
const credential = context.getCredential();
|
|
42
|
-
const USER_AGENT_APP_ID = "AIProjectClient";
|
|
43
|
-
const userAgentPrefix = ((_a = options === null || options === void 0 ? void 0 : options.userAgentOptions) === null || _a === void 0 ? void 0 : _a.userAgentPrefix)
|
|
44
|
-
? `${options.userAgentOptions.userAgentPrefix}-${USER_AGENT_APP_ID}`
|
|
45
|
-
: USER_AGENT_APP_ID;
|
|
46
|
-
const clientOptions = Object.assign(Object.assign({ apiVersion: context.apiVersion }, options), { userAgentOptions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.userAgentOptions), { userAgentPrefix }) });
|
|
47
|
-
if ((((_b = clientOptions === null || clientOptions === void 0 ? void 0 : clientOptions.credentials) === null || _b === void 0 ? void 0 : _b.scopes) || []).length === 0) {
|
|
48
|
-
clientOptions.credentials = Object.assign(Object.assign({}, clientOptions.credentials), { scopes: ["https://cognitiveservices.azure.com/.default"] });
|
|
49
|
-
}
|
|
50
|
-
const client = createModelClient(url, credential, clientOptions);
|
|
51
|
-
return client;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Get the chat completions client for making chat completion requests.
|
|
55
|
-
* @param context - The AIProjectContext used to construct the client.
|
|
56
|
-
* @param options - Optional parameters for the model client.
|
|
57
|
-
* @returns The GetChatCompletions instance for making chat completion requests.
|
|
58
|
-
*/
|
|
59
|
-
export function _getChatCompletionsClient(context, options) {
|
|
60
|
-
const inferenceClient = _getInferenceClient(context, options);
|
|
61
|
-
const chatCompletionsClient = inferenceClient.path("/chat/completions");
|
|
62
|
-
return chatCompletionsClient;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Get the embedding client for making embedding requests.
|
|
66
|
-
* @param context - The AIProjectContext used to construct the client.
|
|
67
|
-
* @param options - Optional parameters for the model client.
|
|
68
|
-
* @returns The GetEmbeddings instance for making embedding requests.
|
|
69
|
-
*/
|
|
70
|
-
export function _getEmbeddingClient(context, options) {
|
|
71
|
-
const inferenceClient = _getInferenceClient(context, options);
|
|
72
|
-
const embeddingClient = inferenceClient.path("/embeddings");
|
|
73
|
-
return embeddingClient;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get the image embedding client for making image embedding requests.
|
|
77
|
-
* @param context - The AIProjectContext used to construct the client.
|
|
78
|
-
* @param options - Optional parameters for the model client.
|
|
79
|
-
* @returns The GetImageEmbeddings instance for making image embedding requests.
|
|
80
|
-
*/
|
|
81
|
-
export function _getImageEmbeddingClient(context, options) {
|
|
82
|
-
const inferenceClient = _getInferenceClient(context, options);
|
|
83
|
-
const imageEmbeddingClient = inferenceClient.path("/images/embeddings");
|
|
84
|
-
return imageEmbeddingClient;
|
|
85
|
-
}
|
|
86
5
|
/**
|
|
87
6
|
* Converts an input URL in the format:
|
|
88
7
|
* https://<host-name>/<some-path>
|
|
@@ -121,13 +40,13 @@ function _getAoaiInferenceUrl(url) {
|
|
|
121
40
|
*/
|
|
122
41
|
export async function _getAzureOpenAIClient(context, connections, options) {
|
|
123
42
|
// Validate connection name if provided
|
|
124
|
-
if (
|
|
43
|
+
if (options?.connectionName === "") {
|
|
125
44
|
throw new Error("Connection name cannot be empty");
|
|
126
45
|
}
|
|
127
|
-
const connectionName = options
|
|
46
|
+
const connectionName = options?.connectionName;
|
|
128
47
|
if (connectionName) {
|
|
129
48
|
// Get the specific connection
|
|
130
|
-
const connection = await connections.getWithCredentials(connectionName, options
|
|
49
|
+
const connection = await connections.getWithCredentials(connectionName, options?.connectionOptions);
|
|
131
50
|
if (connection.type !== "AzureOpenAI") {
|
|
132
51
|
throw new Error(`Connection '${connectionName}' is not of type Azure OpenAI.`);
|
|
133
52
|
}
|
|
@@ -141,7 +60,7 @@ export async function _getAzureOpenAIClient(context, connections, options) {
|
|
|
141
60
|
return new AzureOpenAI({
|
|
142
61
|
apiKey: apiKeyCredential.apiKey,
|
|
143
62
|
endpoint: azureEndpoint,
|
|
144
|
-
apiVersion: options
|
|
63
|
+
apiVersion: options?.apiVersion,
|
|
145
64
|
});
|
|
146
65
|
}
|
|
147
66
|
else if (connection.credentials.type === "AAD") {
|
|
@@ -153,7 +72,7 @@ export async function _getAzureOpenAIClient(context, connections, options) {
|
|
|
153
72
|
return token;
|
|
154
73
|
},
|
|
155
74
|
endpoint: azureEndpoint,
|
|
156
|
-
apiVersion: options
|
|
75
|
+
apiVersion: options?.apiVersion,
|
|
157
76
|
});
|
|
158
77
|
}
|
|
159
78
|
else {
|
|
@@ -170,7 +89,7 @@ export async function _getAzureOpenAIClient(context, connections, options) {
|
|
|
170
89
|
return token;
|
|
171
90
|
},
|
|
172
91
|
endpoint: azureEndpoint,
|
|
173
|
-
apiVersion: options
|
|
92
|
+
apiVersion: options?.apiVersion,
|
|
174
93
|
});
|
|
175
94
|
}
|
|
176
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/inference/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,iCAAiC;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a,EAAqB,CAAC;QACnE,OAAO,IAAI,WAAW,CAAC;YACrB,oBAAoB,EAAE,KAAK,IAAI,EAAE;gBAC/B,MAAM,cAAc,GAAG,sBAAsB,CAC3C,eAAe,EACf,8CAA8C,CAC/C,CAAC;gBACF,MAAM,KAAK,GAAG,MAAM,cAAc,EAAE,CAAC;gBACrC,OAAO,KAAK,CAAC;YACf,CAAC;YACD,QAAQ,EAAE,aAAa;YACvB,UAAU,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU;SAChC,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable tsdoc/syntax */\n\nimport createModelClient from \"@azure-rest/ai-inference\";\nimport type {\n GetChatCompletions,\n GetEmbeddings,\n GetImageEmbeddings,\n ModelClient,\n ModelClientOptions,\n} from \"@azure-rest/ai-inference\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { getBearerTokenProvider } from \"@azure/identity\";\nimport type { AIProjectContext as Client } from \"../index.js\";\nimport { AzureOpenAI } from \"openai\";\nimport { ApiKeyCredentials } from \"../../models/models.js\";\nimport { ConnectionsOperations } from \"../../classic/index.js\";\nimport type { AzureOpenAIClientOptions } from \"./options.js\";\n\n/**\n * Converts an input URL in the format:\n * https://<host-name>/<some-path>\n * to:\n * https://<host-name>/api/models\n *\n * @param url - The input endpoint URL used to construct AIProjectClient.\n * @returns The endpoint URL required to construct inference clients from the @azure-rest/ai-inference package.\n * @throws Error if the URL is not a valid HTTPS URL with a host.\n */\nexport function _getInferenceURL(url: string): string {\n try {\n const parsedUrl = new URL(url);\n\n if (parsedUrl.protocol !== \"https:\" || !parsedUrl.hostname) {\n throw new Error(\"Invalid endpoint URL format. Must be an https URL with a host.\");\n }\n\n return `https://${parsedUrl.hostname}/models`;\n } catch (error) {\n if (error instanceof TypeError) {\n throw new Error(\"Invalid URL format. Please provide a valid URL.\");\n }\n throw error;\n }\n}\n\n/**\n * a generic function to get the inference client for making inference requests.\n * @param context - The AIProjectContext used to construct the client.\n * @param options - Optional parameters for the model client.\n * @returns The ModelClient instance for making inference requests.\n */\nexport function _getInferenceClient(context: Client, options?: ModelClientOptions): ModelClient {\n const url = _getInferenceURL(context.getEndpointUrl());\n const credential = context.getCredential();\n const USER_AGENT_APP_ID = \"AIProjectClient\";\n const userAgentPrefix = options?.userAgentOptions?.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix}-${USER_AGENT_APP_ID}`\n : USER_AGENT_APP_ID;\n\n const clientOptions = {\n apiVersion: context.apiVersion,\n ...options,\n userAgentOptions: {\n ...options?.userAgentOptions,\n userAgentPrefix,\n },\n };\n\n if ((clientOptions?.credentials?.scopes || []).length === 0) {\n clientOptions.credentials = {\n ...clientOptions.credentials,\n scopes: [\"https://cognitiveservices.azure.com/.default\"],\n };\n }\n\n const client = createModelClient(url, credential, clientOptions);\n return client;\n}\n\n/**\n * Get the chat completions client for making chat completion requests.\n * @param context - The AIProjectContext used to construct the client.\n * @param options - Optional parameters for the model client.\n * @returns The GetChatCompletions instance for making chat completion requests.\n */\nexport function _getChatCompletionsClient(\n context: Client,\n options?: ModelClientOptions,\n): GetChatCompletions {\n const inferenceClient = _getInferenceClient(context, options);\n const chatCompletionsClient = inferenceClient.path(\"/chat/completions\");\n return chatCompletionsClient;\n}\n\n/**\n * Get the embedding client for making embedding requests.\n * @param context - The AIProjectContext used to construct the client.\n * @param options - Optional parameters for the model client.\n * @returns The GetEmbeddings instance for making embedding requests.\n */\nexport function _getEmbeddingClient(context: Client, options?: ModelClientOptions): GetEmbeddings {\n const inferenceClient = _getInferenceClient(context, options);\n const embeddingClient = inferenceClient.path(\"/embeddings\");\n return embeddingClient;\n}\n\n/**\n * Get the image embedding client for making image embedding requests.\n * @param context - The AIProjectContext used to construct the client.\n * @param options - Optional parameters for the model client.\n * @returns The GetImageEmbeddings instance for making image embedding requests.\n */\nexport function _getImageEmbeddingClient(\n context: Client,\n options?: ModelClientOptions,\n): GetImageEmbeddings {\n const inferenceClient = _getInferenceClient(context, options);\n const imageEmbeddingClient = inferenceClient.path(\"/images/embeddings\");\n return imageEmbeddingClient;\n}\n\n/**\n * Converts an input URL in the format:\n * https://<host-name>/<some-path>\n * to:\n * https://<host-name>\n *\n * @param url - The input endpoint URL used to construct AIProjectClient.\n * @returns The endpoint URL required to construct an AzureOpenAI client.\n * @throws Error if the input URL format is invalid.\n */\nfunction _getAoaiInferenceUrl(url: string): string {\n try {\n const parsedUrl = new URL(url);\n if (parsedUrl.protocol !== \"https:\" || !parsedUrl.hostname) {\n throw new Error(\"Invalid endpoint URL format. Must be an https URL with a host.\");\n }\n return `https://${parsedUrl.hostname}`;\n } catch (e) {\n // Catches errors from URL constructor (e.g., invalid URL)\n throw new Error(\n `Invalid endpoint URL format: ${url}. ${e instanceof Error ? e.message : String(e)}`,\n );\n }\n}\n\n/**\n * Get an authenticated AzureOpenAI client (from the `openai` package) for the default\n * Azure OpenAI connection (if `connectionName` is not specified), or from the Azure OpenAI\n * resource given by its connection name.\n *\n * @param context - The AIProjectContext used to construct the client.\n * @param connections - The ConnectionsOperations used to manage connections.\n * @param options - Optional parameters.\n * @returns An authenticated AzureOpenAI client.\n * @throws ResourceNotFoundError if an Azure OpenAI connection does not exist.\n * @throws Error if the connection name is an empty string.\n * @throws HttpResponseError for other HTTP-related errors.\n */\nexport async function _getAzureOpenAIClient(\n context: Client,\n connections: ConnectionsOperations,\n options?: AzureOpenAIClientOptions,\n): Promise<AzureOpenAI> {\n // Validate connection name if provided\n if (options?.connectionName === \"\") {\n throw new Error(\"Connection name cannot be empty\");\n }\n\n const connectionName = options?.connectionName;\n\n if (connectionName) {\n // Get the specific connection\n const connection = await connections.getWithCredentials(\n connectionName,\n options?.connectionOptions,\n );\n\n if (connection.type !== \"AzureOpenAI\") {\n throw new Error(`Connection '${connectionName}' is not of type Azure OpenAI.`);\n }\n\n // Format the endpoint URL\n const targetUrl = new URL(connection.target);\n const azureEndpoint = targetUrl.href.endsWith(\"/\")\n ? targetUrl.href.slice(0, -1)\n : targetUrl.href;\n if (connection.credentials.type === \"ApiKey\") {\n const apiKeyCredential = connection.credentials as ApiKeyCredentials;\n return new AzureOpenAI({\n apiKey: apiKeyCredential.apiKey,\n endpoint: azureEndpoint,\n apiVersion: options?.apiVersion,\n });\n } else if (connection.credentials.type === \"AAD\") {\n const tokenCredential = context.getCredential() as TokenCredential;\n return new AzureOpenAI({\n azureADTokenProvider: async () => {\n const getAccessToken = getBearerTokenProvider(\n tokenCredential,\n \"https://cognitiveservices.azure.com/.default\",\n );\n const token = await getAccessToken();\n return token;\n },\n endpoint: azureEndpoint,\n apiVersion: options?.apiVersion,\n });\n } else {\n throw new Error(\n `Unsupported authentication type '${connection.credentials.type || \"unknown\"}' for connection '${connectionName}'.`,\n );\n }\n } else {\n const azureEndpoint = _getAoaiInferenceUrl(context.getEndpointUrl());\n const tokenCredential = context.getCredential() as TokenCredential;\n return new AzureOpenAI({\n azureADTokenProvider: async () => {\n const getAccessToken = getBearerTokenProvider(\n tokenCredential,\n \"https://cognitiveservices.azure.com/.default\",\n );\n const token = await getAccessToken();\n return token;\n },\n endpoint: azureEndpoint,\n apiVersion: options?.apiVersion,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/inference/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAKrC;;;;;;;;;GASG;AACH,SAAS,oBAAoB,CAAC,GAAW;IACvC,IAAI,CAAC;QACH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;QAC/B,IAAI,SAAS,CAAC,QAAQ,KAAK,QAAQ,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;YAC3D,MAAM,IAAI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AO,EAAE,UAAU;SAChC,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable tsdoc/syntax */\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { getBearerTokenProvider } from \"@azure/identity\";\nimport type { AIProjectContext as Client } from \"../index.js\";\nimport { AzureOpenAI } from \"openai\";\nimport { ApiKeyCredentials } from \"../../models/models.js\";\nimport { ConnectionsOperations } from \"../../classic/index.js\";\nimport type { AzureOpenAIClientOptions } from \"./options.js\";\n\n/**\n * Converts an input URL in the format:\n * https://<host-name>/<some-path>\n * to:\n * https://<host-name>\n *\n * @param url - The input endpoint URL used to construct AIProjectClient.\n * @returns The endpoint URL required to construct an AzureOpenAI client.\n * @throws Error if the input URL format is invalid.\n */\nfunction _getAoaiInferenceUrl(url: string): string {\n try {\n const parsedUrl = new URL(url);\n if (parsedUrl.protocol !== \"https:\" || !parsedUrl.hostname) {\n throw new Error(\"Invalid endpoint URL format. Must be an https URL with a host.\");\n }\n return `https://${parsedUrl.hostname}`;\n } catch (e) {\n // Catches errors from URL constructor (e.g., invalid URL)\n throw new Error(\n `Invalid endpoint URL format: ${url}. ${e instanceof Error ? e.message : String(e)}`,\n );\n }\n}\n\n/**\n * Get an authenticated AzureOpenAI client (from the `openai` package) for the default\n * Azure OpenAI connection (if `connectionName` is not specified), or from the Azure OpenAI\n * resource given by its connection name.\n *\n * @param context - The AIProjectContext used to construct the client.\n * @param connections - The ConnectionsOperations used to manage connections.\n * @param options - Optional parameters.\n * @returns An authenticated AzureOpenAI client.\n * @throws ResourceNotFoundError if an Azure OpenAI connection does not exist.\n * @throws Error if the connection name is an empty string.\n * @throws HttpResponseError for other HTTP-related errors.\n */\nexport async function _getAzureOpenAIClient(\n context: Client,\n connections: ConnectionsOperations,\n options?: AzureOpenAIClientOptions,\n): Promise<AzureOpenAI> {\n // Validate connection name if provided\n if (options?.connectionName === \"\") {\n throw new Error(\"Connection name cannot be empty\");\n }\n\n const connectionName = options?.connectionName;\n\n if (connectionName) {\n // Get the specific connection\n const connection = await connections.getWithCredentials(\n connectionName,\n options?.connectionOptions,\n );\n\n if (connection.type !== \"AzureOpenAI\") {\n throw new Error(`Connection '${connectionName}' is not of type Azure OpenAI.`);\n }\n\n // Format the endpoint URL\n const targetUrl = new URL(connection.target);\n const azureEndpoint = targetUrl.href.endsWith(\"/\")\n ? targetUrl.href.slice(0, -1)\n : targetUrl.href;\n if (connection.credentials.type === \"ApiKey\") {\n const apiKeyCredential = connection.credentials as ApiKeyCredentials;\n return new AzureOpenAI({\n apiKey: apiKeyCredential.apiKey,\n endpoint: azureEndpoint,\n apiVersion: options?.apiVersion,\n });\n } else if (connection.credentials.type === \"AAD\") {\n const tokenCredential = context.getCredential() as TokenCredential;\n return new AzureOpenAI({\n azureADTokenProvider: async () => {\n const getAccessToken = getBearerTokenProvider(\n tokenCredential,\n \"https://cognitiveservices.azure.com/.default\",\n );\n const token = await getAccessToken();\n return token;\n },\n endpoint: azureEndpoint,\n apiVersion: options?.apiVersion,\n });\n } else {\n throw new Error(\n `Unsupported authentication type '${connection.credentials.type || \"unknown\"}' for connection '${connectionName}'.`,\n );\n }\n } else {\n const azureEndpoint = _getAoaiInferenceUrl(context.getEndpointUrl());\n const tokenCredential = context.getCredential() as TokenCredential;\n return new AzureOpenAI({\n azureADTokenProvider: async () => {\n const getAccessToken = getBearerTokenProvider(\n tokenCredential,\n \"https://cognitiveservices.azure.com/.default\",\n );\n const token = await getAccessToken();\n return token;\n },\n endpoint: azureEndpoint,\n apiVersion: options?.apiVersion,\n });\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ export interface AzureOpenAIClientOptions {
|
|
|
4
4
|
/**
|
|
5
5
|
* The Azure OpenAI api-version to use when creating the client.
|
|
6
6
|
* See "Data plane - Inference" row in the table at
|
|
7
|
-
* https://learn.microsoft.com/azure/ai-
|
|
7
|
+
* https://learn.microsoft.com/azure/ai-foundry/openai/reference#api-specs. If not provided,
|
|
8
8
|
* you must set the environment variable `OPENAI_API_VERSION` instead.
|
|
9
9
|
*/
|
|
10
10
|
apiVersion?: string;
|
|
@@ -15,4 +15,7 @@ export interface AzureOpenAIClientOptions {
|
|
|
15
15
|
/** The connection secret options to use for the Azure OpenAI client. */
|
|
16
16
|
connectionSecretOptions?: ConnectionsGetWithCredentialsOptionalParams;
|
|
17
17
|
}
|
|
18
|
+
/** Options for getting the Azure OpenAI client. */
|
|
19
|
+
export interface GetAzureOpenAIClientOptions extends AzureOpenAIClientOptions {
|
|
20
|
+
}
|
|
18
21
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/inference/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,4BAA4B,EAC5B,2CAA2C,EAC5C,MAAM,2BAA2B,CAAC;AAEnC,2DAA2D;AAC3D,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2JAA2J;IAC3J,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,4BAA4B,CAAC;IACjD,wEAAwE;IACxE,uBAAuB,CAAC,EAAE,2CAA2C,CAAC;CACvE"}
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/api/inference/options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,4BAA4B,EAC5B,2CAA2C,EAC5C,MAAM,2BAA2B,CAAC;AAEnC,2DAA2D;AAC3D,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2JAA2J;IAC3J,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,4BAA4B,CAAC;IACjD,wEAAwE;IACxE,uBAAuB,CAAC,EAAE,2CAA2C,CAAC;CACvE;AAED,mDAAmD;AACnD,MAAM,WAAW,2BAA4B,SAAQ,wBAAwB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/inference/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ConnectionsGetOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n} from \"../connections/options.js\";\n\n/** The options for configuring the Azure OpenAI client. */\nexport interface AzureOpenAIClientOptions {\n /**\n * The Azure OpenAI api-version to use when creating the client.\n * See \"Data plane - Inference\" row in the table at\n * https://learn.microsoft.com/azure/ai-
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/inference/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n ConnectionsGetOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n} from \"../connections/options.js\";\n\n/** The options for configuring the Azure OpenAI client. */\nexport interface AzureOpenAIClientOptions {\n /**\n * The Azure OpenAI api-version to use when creating the client.\n * See \"Data plane - Inference\" row in the table at\n * https://learn.microsoft.com/azure/ai-foundry/openai/reference#api-specs. If not provided,\n * you must set the environment variable `OPENAI_API_VERSION` instead.\n */\n apiVersion?: string;\n /** The name of a connection to an Azure OpenAI resource in your AI Foundry project. If not provided, the default Azure OpenAI connection will be used. */\n connectionName?: string;\n /** The connection options to use for the Azure OpenAI connection. */\n connectionOptions?: ConnectionsGetOptionalParams;\n /** The connection secret options to use for the Azure OpenAI client. */\n connectionSecretOptions?: ConnectionsGetWithCredentialsOptionalParams;\n}\n\n/** Options for getting the Azure OpenAI client. */\nexport interface GetAzureOpenAIClientOptions extends AzureOpenAIClientOptions {}\n"]}
|
|
@@ -17,6 +17,6 @@ export interface CreateTelemetryOperations {
|
|
|
17
17
|
* @returns The Application Insights connection string.
|
|
18
18
|
* @throws RestError if an Application Insights connection does not exist for this project.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
getApplicationInsightsConnectionString(): Promise<string>;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/telemetry/operations.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAUpE;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,qBAAqB,GACtC,yBAAyB,CAkD3B;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../../src/api/telemetry/operations.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAUpE;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,gBAAgB,EAAE,qBAAqB,GACtC,yBAAyB,CAkD3B;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,sCAAsC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { __asyncValues } from "tslib";
|
|
4
3
|
import { RestError } from "@azure/core-rest-pipeline";
|
|
5
4
|
/**
|
|
6
5
|
* Creates a new instance of the CreateTelemetryOperations class.
|
|
@@ -18,32 +17,18 @@ export function createTelemetryOperations(connectionClient) {
|
|
|
18
17
|
* @returns The Application Insights connection string.
|
|
19
18
|
* @throws RestError if an Application Insights connection does not exist for this project.
|
|
20
19
|
*/
|
|
21
|
-
async
|
|
22
|
-
var _a, e_1, _b, _c;
|
|
23
|
-
var _d, _e;
|
|
20
|
+
async getApplicationInsightsConnectionString() {
|
|
24
21
|
if (!state._connectionString) {
|
|
25
22
|
// Get all Application Insights connections that are marked as default
|
|
26
23
|
const connections = [];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
_c = _h.value;
|
|
33
|
-
_f = false;
|
|
34
|
-
const connection = _c;
|
|
35
|
-
connections.push(connection);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
39
|
-
finally {
|
|
40
|
-
try {
|
|
41
|
-
if (!_f && !_a && (_b = _g.return)) await _b.call(_g);
|
|
42
|
-
}
|
|
43
|
-
finally { if (e_1) throw e_1.error; }
|
|
24
|
+
for await (const connection of connectionClient.list({
|
|
25
|
+
connectionType: "AppInsights",
|
|
26
|
+
defaultConnection: true,
|
|
27
|
+
})) {
|
|
28
|
+
connections.push(connection);
|
|
44
29
|
}
|
|
45
30
|
// Find the first connection that is of type "AppInsights"
|
|
46
|
-
const connectionName =
|
|
31
|
+
const connectionName = connections?.[0]?.name;
|
|
47
32
|
if (!connectionName) {
|
|
48
33
|
throw new RestError("No Application Insights connection found.", {
|
|
49
34
|
code: "ResourceNotFound",
|
|
@@ -52,7 +37,7 @@ export function createTelemetryOperations(connectionClient) {
|
|
|
52
37
|
}
|
|
53
38
|
// Get the connection with credentials
|
|
54
39
|
const connection = await connectionClient.getWithCredentials(connectionName);
|
|
55
|
-
if (
|
|
40
|
+
if (connection.credentials?.type === "ApiKey") {
|
|
56
41
|
const apiKeyCredentials = connection.credentials;
|
|
57
42
|
if (!apiKeyCredentials.apiKey) {
|
|
58
43
|
throw new Error("Application Insights connection does not have a connection string.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/telemetry/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/telemetry/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAYtD;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,gBAAuC;IAEvC,MAAM,KAAK,GAA6B;QACtC,iBAAiB,EAAE,SAAS;KAC7B,CAAC;IAEF,OAAO;QACL;;;;;WAKG;QACH,KAAK,CAAC,sCAAsC;YAC1C,IAAI,CAAC,KAAK,CAAC,iBAAiB,EAAE,CAAC;gBAC7B,sEAAsE;gBACtE,MAAM,WAAW,GAAiB,EAAE,CAAC;gBACrC,IAAI,KAAK,EAAE,MAAM,UAAU,IAAI,gBAAgB,CAAC,IAAI,CAAC;oBACnD,cAAc,EAAE,aAAa;oBAC7B,iBAAiB,EAAE,IAAI;iBACxB,CAAC,EAAE,CAAC;oBACH,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC/B,CAAC;gBAED,0DAA0D;gBAC1D,MAAM,cAAc,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC;gBAE9C,IAAI,CAAC,cAAc,EAAE,CAAC;oBACpB,MAAM,IAAI,SAAS,CAAC,2CAA2C,EAAE;wBAC/D,IAAI,EAAE,kBAAkB;wBACxB,UAAU,EAAE,GAAG;qBAChB,CAAC,CAAC;gBACL,CAAC;gBAED,sCAAsC;gBACtC,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,kBAAkB,CAAC,cAAc,CAAC,CAAC;gBAE7E,IAAI,UAAU,CAAC,WAAW,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC9C,MAAM,iBAAiB,GAAG,UAAU,CAAC,WAAgC,CAAC;oBACtE,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,CAAC;wBAC9B,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;oBACxF,CAAC;oBACD,KAAK,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,MAAM,CAAC;gBACrD,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;gBACvF,CAAC;YACH,CAAC;YAED,OAAO,KAAK,CAAC,iBAAiB,CAAC;QACjC,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\nimport type { Connection, ApiKeyCredentials } from \"../../models/models.js\";\nimport type { ConnectionsOperations } from \"../../classic/index.js\";\n\n/**\n * Interface for CreateTelemetryOperations internal state\n * @internal\n */\ninterface TelemetryOperationsState {\n _connectionString?: string;\n}\n\n/**\n * Creates a new instance of the CreateTelemetryOperations class.\n * @param connectionClient - The connections client to use for operations.\n * @returns A new instance of CreateTelemetryOperations.\n */\nexport function createTelemetryOperations(\n connectionClient: ConnectionsOperations,\n): CreateTelemetryOperations {\n const state: TelemetryOperationsState = {\n _connectionString: undefined,\n };\n\n return {\n /**\n * Get the Application Insights connection string associated with the Project's Application Insights resource.\n * @param options - The options parameters.\n * @returns The Application Insights connection string.\n * @throws RestError if an Application Insights connection does not exist for this project.\n */\n async getApplicationInsightsConnectionString(): Promise<string> {\n if (!state._connectionString) {\n // Get all Application Insights connections that are marked as default\n const connections: Connection[] = [];\n for await (const connection of connectionClient.list({\n connectionType: \"AppInsights\",\n defaultConnection: true,\n })) {\n connections.push(connection);\n }\n\n // Find the first connection that is of type \"AppInsights\"\n const connectionName = connections?.[0]?.name;\n\n if (!connectionName) {\n throw new RestError(\"No Application Insights connection found.\", {\n code: \"ResourceNotFound\",\n statusCode: 404,\n });\n }\n\n // Get the connection with credentials\n const connection = await connectionClient.getWithCredentials(connectionName);\n\n if (connection.credentials?.type === \"ApiKey\") {\n const apiKeyCredentials = connection.credentials as ApiKeyCredentials;\n if (!apiKeyCredentials.apiKey) {\n throw new Error(\"Application Insights connection does not have a connection string.\");\n }\n state._connectionString = apiKeyCredentials.apiKey;\n } else {\n throw new Error(\"Application Insights connection does not use API Key credentials.\");\n }\n }\n\n return state._connectionString;\n },\n };\n}\n\n/**\n * CreateTelemetryOperations provides operations for working with Application Insights telemetry.\n * DO NOT instantiate this class directly.\n * Instead, you should access these operations through the AIProjectClient's telemetry attribute.\n */\nexport interface CreateTelemetryOperations {\n /**\n * Get the Application Insights connection string associated with the Project's Application Insights resource.\n * @param options - The options parameters.\n * @returns The Application Insights connection string.\n * @throws RestError if an Application Insights connection does not exist for this project.\n */\n getApplicationInsightsConnectionString(): Promise<string>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAsBhG,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO;QACL,IAAI,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACzE,kBAAkB,EAAE,CAAC,IAAY,EAAE,OAAqD,EAAE,EAAE,CAC1F,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;QAC5C,GAAG,EAAE,CAAC,IAAY,EAAE,kBAA4B,EAAE,OAAsC,EAAE,EAAE,CAC1F,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC;QACjD,UAAU,EAAE,CAAC,cAA8B,EAAE,kBAA4B,EAAE,EAAE,CAC3E,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/connections/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAsBhG,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO;QACL,IAAI,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACzE,kBAAkB,EAAE,CAAC,IAAY,EAAE,OAAqD,EAAE,EAAE,CAC1F,kBAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;QAC5C,GAAG,EAAE,CAAC,IAAY,EAAE,kBAA4B,EAAE,OAAsC,EAAE,EAAE,CAC1F,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC;QACjD,UAAU,EAAE,CAAC,cAA8B,EAAE,kBAA4B,EAAE,EAAE,CAC3E,UAAU,CAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,CAAC;KAC1D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,OAAO;QACL,GAAG,eAAe,CAAC,OAAO,CAAC;KAC5B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext } from \"../../api/aiProjectContext.js\";\nimport { Connection, ConnectionType } from \"../../models/models.js\";\nimport {\n ConnectionsListOptionalParams,\n ConnectionsGetWithCredentialsOptionalParams,\n ConnectionsGetOptionalParams,\n} from \"../../api/connections/options.js\";\nimport { list, getWithCredentials, get, getDefault } from \"../../api/connections/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Connections operations. */\nexport interface ConnectionsOperations {\n /** List all connections in the project, without populating connection credentials */\n list: (options?: ConnectionsListOptionalParams) => PagedAsyncIterableIterator<Connection>;\n /** Get a connection by name, with its connection credentials */\n getWithCredentials: (\n name: string,\n options?: ConnectionsGetWithCredentialsOptionalParams,\n ) => Promise<Connection>;\n /** Get a connection by name, without populating connection credentials */\n get: (\n name: string,\n includeCredentials?: boolean,\n options?: ConnectionsGetOptionalParams,\n ) => Promise<Connection>;\n /** Get the default connection for the project */\n getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) => Promise<Connection>;\n}\n\nfunction _getConnections(context: AIProjectContext) {\n return {\n list: (options?: ConnectionsListOptionalParams) => list(context, options),\n getWithCredentials: (name: string, options?: ConnectionsGetWithCredentialsOptionalParams) =>\n getWithCredentials(context, name, options),\n get: (name: string, includeCredentials?: boolean, options?: ConnectionsGetOptionalParams) =>\n get(context, name, includeCredentials, options),\n getDefault: (connectionType: ConnectionType, includeCredentials?: boolean) =>\n getDefault(context, connectionType, includeCredentials),\n };\n}\n\nexport function _getConnectionsOperations(context: AIProjectContext): ConnectionsOperations {\n return {\n ..._getConnections(context),\n };\n}\n"]}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { AIProjectContext } from "../../api/aiProjectContext.js";
|
|
1
|
+
import { AIProjectClientOptionalParams, AIProjectContext } from "../../api/aiProjectContext.js";
|
|
2
2
|
import { DatasetVersionUnion, PendingUploadRequest, PendingUploadResponse, AssetCredentialResponse } from "../../models/models.js";
|
|
3
3
|
import { DatasetsGetCredentialsOptionalParams, DatasetsPendingUploadOptionalParams, DatasetsCreateOrUpdateOptionalParams, DatasetsDeleteOptionalParams, DatasetsGetOptionalParams, DatasetsListOptionalParams, DatasetsListVersionsOptionalParams } from "../../api/datasets/options.js";
|
|
4
|
+
import { DatasetUploadOptions } from "../../api/index.js";
|
|
4
5
|
import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
|
|
5
6
|
/** Interface representing a Datasets operations. */
|
|
6
7
|
export interface DatasetsOperations {
|
|
7
8
|
/** Get the SAS credential to access the storage account associated with a Dataset version. */
|
|
8
9
|
getCredentials: (name: string, version: string, options?: DatasetsGetCredentialsOptionalParams) => Promise<AssetCredentialResponse>;
|
|
9
10
|
/** Start a new or get an existing pending upload of a dataset for a specific version. */
|
|
10
|
-
pendingUpload: (name: string, version: string,
|
|
11
|
+
pendingUpload: (name: string, version: string, pendingUploadRequest: PendingUploadRequest, options?: DatasetsPendingUploadOptionalParams) => Promise<PendingUploadResponse>;
|
|
11
12
|
/** Create a new or update an existing DatasetVersion with the given version id */
|
|
12
|
-
createOrUpdate: (name: string, version: string,
|
|
13
|
+
createOrUpdate: (name: string, version: string, datasetVersion: DatasetVersionUnion, options?: DatasetsCreateOrUpdateOptionalParams) => Promise<DatasetVersionUnion>;
|
|
13
14
|
/** Delete the specific version of the DatasetVersion */
|
|
14
15
|
/**
|
|
15
16
|
* @fixme delete is a reserved word that cannot be used as an operation name.
|
|
@@ -24,9 +25,9 @@ export interface DatasetsOperations {
|
|
|
24
25
|
/** List all versions of the given DatasetVersion */
|
|
25
26
|
listVersions: (name: string, options?: DatasetsListVersionsOptionalParams) => PagedAsyncIterableIterator<DatasetVersionUnion>;
|
|
26
27
|
/** Upload a file to the DatasetVersion */
|
|
27
|
-
uploadFile: (name: string, version: string, filePath: string,
|
|
28
|
+
uploadFile: (name: string, version: string, filePath: string, options?: DatasetUploadOptions) => Promise<DatasetVersionUnion>;
|
|
28
29
|
/** Upload a folder to the DatasetVersion */
|
|
29
|
-
uploadFolder: (name: string, version: string, folderPath: string,
|
|
30
|
+
uploadFolder: (name: string, version: string, folderPath: string, options?: DatasetUploadOptions) => Promise<DatasetVersionUnion>;
|
|
30
31
|
}
|
|
31
|
-
export declare function _getDatasetsOperations(context: AIProjectContext): DatasetsOperations;
|
|
32
|
+
export declare function _getDatasetsOperations(context: AIProjectContext, projectOptions?: AIProjectClientOptionalParams): DatasetsOperations;
|
|
32
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/datasets/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/datasets/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAChG,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,oCAAoC,EACpC,mCAAmC,EACnC,oCAAoC,EACpC,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,kCAAkC,EACnC,MAAM,+BAA+B,CAAC;AAYvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAEnF,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,8FAA8F;IAC9F,cAAc,EAAE,CACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,oCAAoC,KAC3C,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACtC,yFAAyF;IACzF,aAAa,EAAE,CACb,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,CAAC,EAAE,mCAAmC,KAC1C,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACpC,kFAAkF;IAClF,cAAc,EAAE,CACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,mBAAmB,EACnC,OAAO,CAAC,EAAE,oCAAoC,KAC3C,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClC,wDAAwD;IACxD;;;;OAIG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,4BAA4B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjG,qDAAqD;IACrD,GAAG,EAAE,CACH,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,yBAAyB,KAChC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClC,qDAAqD;IACrD,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;IAChG,oDAAoD;IACpD,YAAY,EAAE,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,kCAAkC,KACzC,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;IACrD,0CAA0C;IAC1C,UAAU,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAClC,4CAA4C;IAC5C,YAAY,EAAE,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACnC;AA0CD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,EACzB,cAAc,GAAE,6BAAkC,GACjD,kBAAkB,CAIpB"}
|
|
@@ -2,20 +2,22 @@
|
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
/* eslint-disable tsdoc/syntax */
|
|
4
4
|
import { getCredentials, pendingUpload, createOrUpdate, $delete, get, list, listVersions, uploadFile, uploadFolder, } from "../../api/datasets/operations.js";
|
|
5
|
-
function _getDatasets(context) {
|
|
5
|
+
function _getDatasets(context, projectOptions = {}) {
|
|
6
6
|
return {
|
|
7
7
|
getCredentials: (name, version, options) => getCredentials(context, name, version, options),
|
|
8
|
-
pendingUpload: (name, version,
|
|
9
|
-
createOrUpdate: (name, version,
|
|
8
|
+
pendingUpload: (name, version, pendingUploadRequest, options) => pendingUpload(context, name, version, pendingUploadRequest, options),
|
|
9
|
+
createOrUpdate: (name, version, datasetVersion, options) => createOrUpdate(context, name, version, datasetVersion, options),
|
|
10
10
|
delete: (name, version, options) => $delete(context, name, version, options),
|
|
11
11
|
get: (name, version, options) => get(context, name, version, options),
|
|
12
12
|
list: (options) => list(context, options),
|
|
13
13
|
listVersions: (name, options) => listVersions(context, name, options),
|
|
14
|
-
uploadFile: (name, version, filePath,
|
|
15
|
-
uploadFolder: (name, version, folderPath,
|
|
14
|
+
uploadFile: (name, version, filePath, options) => uploadFile(context, name, version, filePath, { ...options, projectOptions }),
|
|
15
|
+
uploadFolder: (name, version, folderPath, options) => uploadFolder(context, name, version, folderPath, { ...options, projectOptions }),
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
export function _getDatasetsOperations(context) {
|
|
19
|
-
return
|
|
18
|
+
export function _getDatasetsOperations(context, projectOptions = {}) {
|
|
19
|
+
return {
|
|
20
|
+
..._getDatasets(context, projectOptions),
|
|
21
|
+
};
|
|
20
22
|
}
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/datasets/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAiC;AAkBjC,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,EACd,OAAO,EACP,GAAG,EACH,IAAI,EACJ,YAAY,EACZ,UAAU,EACV,YAAY,GACb,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/datasets/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;A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AC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC;QAC9E,YAAY,EAAE,CACZ,IAAY,EACZ,OAAe,EACf,UAAkB,EAClB,OAA8B,EAC9B,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,GAAG,OAAO,EAAE,cAAc,EAAE,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,OAAyB,EACzB,iBAAgD,EAAE;IAElD,OAAO;QACL,GAAG,YAAY,CAAC,OAAO,EAAE,cAAc,CAAC;KACzC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport { AIProjectClientOptionalParams, AIProjectContext } from \"../../api/aiProjectContext.js\";\nimport {\n DatasetVersionUnion,\n PendingUploadRequest,\n PendingUploadResponse,\n AssetCredentialResponse,\n} from \"../../models/models.js\";\nimport {\n DatasetsGetCredentialsOptionalParams,\n DatasetsPendingUploadOptionalParams,\n DatasetsCreateOrUpdateOptionalParams,\n DatasetsDeleteOptionalParams,\n DatasetsGetOptionalParams,\n DatasetsListOptionalParams,\n DatasetsListVersionsOptionalParams,\n} from \"../../api/datasets/options.js\";\nimport {\n getCredentials,\n pendingUpload,\n createOrUpdate,\n $delete,\n get,\n list,\n listVersions,\n uploadFile,\n uploadFolder,\n} from \"../../api/datasets/operations.js\";\nimport { DatasetUploadOptions } from \"../../api/index.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Datasets operations. */\nexport interface DatasetsOperations {\n /** Get the SAS credential to access the storage account associated with a Dataset version. */\n getCredentials: (\n name: string,\n version: string,\n options?: DatasetsGetCredentialsOptionalParams,\n ) => Promise<AssetCredentialResponse>;\n /** Start a new or get an existing pending upload of a dataset for a specific version. */\n pendingUpload: (\n name: string,\n version: string,\n pendingUploadRequest: PendingUploadRequest,\n options?: DatasetsPendingUploadOptionalParams,\n ) => Promise<PendingUploadResponse>;\n /** Create a new or update an existing DatasetVersion with the given version id */\n createOrUpdate: (\n name: string,\n version: string,\n datasetVersion: DatasetVersionUnion,\n options?: DatasetsCreateOrUpdateOptionalParams,\n ) => Promise<DatasetVersionUnion>;\n /** Delete the specific version of the DatasetVersion */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (name: string, version: string, options?: DatasetsDeleteOptionalParams) => Promise<void>;\n /** Get the specific version of the DatasetVersion */\n get: (\n name: string,\n version: string,\n options?: DatasetsGetOptionalParams,\n ) => Promise<DatasetVersionUnion>;\n /** List the latest version of each DatasetVersion */\n list: (options?: DatasetsListOptionalParams) => PagedAsyncIterableIterator<DatasetVersionUnion>;\n /** List all versions of the given DatasetVersion */\n listVersions: (\n name: string,\n options?: DatasetsListVersionsOptionalParams,\n ) => PagedAsyncIterableIterator<DatasetVersionUnion>;\n /** Upload a file to the DatasetVersion */\n uploadFile: (\n name: string,\n version: string,\n filePath: string,\n options?: DatasetUploadOptions,\n ) => Promise<DatasetVersionUnion>;\n /** Upload a folder to the DatasetVersion */\n uploadFolder: (\n name: string,\n version: string,\n folderPath: string,\n options?: DatasetUploadOptions,\n ) => Promise<DatasetVersionUnion>;\n}\n\nfunction _getDatasets(\n context: AIProjectContext,\n projectOptions: AIProjectClientOptionalParams = {},\n) {\n return {\n getCredentials: (\n name: string,\n version: string,\n options?: DatasetsGetCredentialsOptionalParams,\n ) => getCredentials(context, name, version, options),\n pendingUpload: (\n name: string,\n version: string,\n pendingUploadRequest: PendingUploadRequest,\n options?: DatasetsPendingUploadOptionalParams,\n ) => pendingUpload(context, name, version, pendingUploadRequest, options),\n createOrUpdate: (\n name: string,\n version: string,\n datasetVersion: DatasetVersionUnion,\n options?: DatasetsCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, name, version, datasetVersion, options),\n delete: (name: string, version: string, options?: DatasetsDeleteOptionalParams) =>\n $delete(context, name, version, options),\n get: (name: string, version: string, options?: DatasetsGetOptionalParams) =>\n get(context, name, version, options),\n list: (options?: DatasetsListOptionalParams) => list(context, options),\n listVersions: (name: string, options?: DatasetsListVersionsOptionalParams) =>\n listVersions(context, name, options),\n uploadFile: (name: string, version: string, filePath: string, options?: DatasetUploadOptions) =>\n uploadFile(context, name, version, filePath, { ...options, projectOptions }),\n uploadFolder: (\n name: string,\n version: string,\n folderPath: string,\n options?: DatasetUploadOptions,\n ) => uploadFolder(context, name, version, folderPath, { ...options, projectOptions }),\n };\n}\n\nexport function _getDatasetsOperations(\n context: AIProjectContext,\n projectOptions: AIProjectClientOptionalParams = {},\n): DatasetsOperations {\n return {\n ..._getDatasets(context, projectOptions),\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/deployments/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAWhE,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO;QACL,IAAI,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACzE,GAAG,EAAE,CAAC,IAAY,EAAE,OAAsC,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;KAC3F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/deployments/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAWhE,SAAS,eAAe,CAAC,OAAyB;IAChD,OAAO;QACL,IAAI,EAAE,CAAC,OAAuC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACzE,GAAG,EAAE,CAAC,IAAY,EAAE,OAAsC,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;KAC3F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,OAAyB;IACjE,OAAO;QACL,GAAG,eAAe,CAAC,OAAO,CAAC;KAC5B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AIProjectContext } from \"../../api/aiProjectContext.js\";\nimport { DeploymentUnion } from \"../../models/models.js\";\nimport {\n DeploymentsListOptionalParams,\n DeploymentsGetOptionalParams,\n} from \"../../api/deployments/options.js\";\nimport { list, get } from \"../../api/deployments/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Deployments operations. */\nexport interface DeploymentsOperations {\n /** List all deployed models in the project */\n list: (options?: DeploymentsListOptionalParams) => PagedAsyncIterableIterator<DeploymentUnion>;\n /** Get a deployed model. */\n get: (name: string, options?: DeploymentsGetOptionalParams) => Promise<DeploymentUnion>;\n}\n\nfunction _getDeployments(context: AIProjectContext) {\n return {\n list: (options?: DeploymentsListOptionalParams) => list(context, options),\n get: (name: string, options?: DeploymentsGetOptionalParams) => get(context, name, options),\n };\n}\n\nexport function _getDeploymentsOperations(context: AIProjectContext): DeploymentsOperations {\n return {\n ..._getDeployments(context),\n };\n}\n"]}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { ConnectionsOperations } from "./connections/index.js";
|
|
2
2
|
export { DatasetsOperations } from "./datasets/index.js";
|
|
3
3
|
export { DeploymentsOperations } from "./deployments/index.js";
|
|
4
|
-
export { EvaluationsOperations } from "./evaluations/index.js";
|
|
5
4
|
export { IndexesOperations } from "./indexes/index.js";
|
|
6
|
-
export { RedTeamsOperations } from "./redTeams/index.js";
|
|
7
5
|
export { TelemetryOperations } from "./telemetry/index.js";
|
|
8
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/classic/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/classic/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classic/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { ConnectionsOperations } from \"./connections/index.js\";\nexport { DatasetsOperations } from \"./datasets/index.js\";\nexport { DeploymentsOperations } from \"./deployments/index.js\";\nexport {
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classic/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { ConnectionsOperations } from \"./connections/index.js\";\nexport { DatasetsOperations } from \"./datasets/index.js\";\nexport { DeploymentsOperations } from \"./deployments/index.js\";\nexport { IndexesOperations } from \"./indexes/index.js\";\nexport { TelemetryOperations } from \"./telemetry/index.js\";\n"]}
|
|
@@ -5,7 +5,7 @@ import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.j
|
|
|
5
5
|
/** Interface representing a Indexes operations. */
|
|
6
6
|
export interface IndexesOperations {
|
|
7
7
|
/** Create a new or update an existing Index with the given version id */
|
|
8
|
-
createOrUpdate: (name: string, version: string,
|
|
8
|
+
createOrUpdate: (name: string, version: string, index: IndexUnion, options?: IndexesCreateOrUpdateOptionalParams) => Promise<IndexUnion>;
|
|
9
9
|
/** Delete the specific version of the Index */
|
|
10
10
|
/**
|
|
11
11
|
* @fixme delete is a reserved word that cannot be used as an operation name.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/indexes/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAEnF,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,cAAc,EAAE,CACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/indexes/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,EACzB,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAEnF,mDAAmD;AACnD,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,cAAc,EAAE,CACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,UAAU,EACjB,OAAO,CAAC,EAAE,mCAAmC,KAC1C,OAAO,CAAC,UAAU,CAAC,CAAC;IACzB,+CAA+C;IAC/C;;;;OAIG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChG,4CAA4C;IAC5C,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAChG,4CAA4C;IAC5C,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,yBAAyB,KAAK,0BAA0B,CAAC,UAAU,CAAC,CAAC;IACtF,2CAA2C;IAC3C,YAAY,EAAE,CACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,iCAAiC,KACxC,0BAA0B,CAAC,UAAU,CAAC,CAAC;CAC7C;AAoBD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,iBAAiB,CAIlF"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { createOrUpdate, $delete, get, list, listVersions } from "../../api/indexes/operations.js";
|
|
5
5
|
function _getIndexes(context) {
|
|
6
6
|
return {
|
|
7
|
-
createOrUpdate: (name, version,
|
|
7
|
+
createOrUpdate: (name, version, index, options) => createOrUpdate(context, name, version, index, options),
|
|
8
8
|
delete: (name, version, options) => $delete(context, name, version, options),
|
|
9
9
|
get: (name, version, options) => get(context, name, version, options),
|
|
10
10
|
list: (options) => list(context, options),
|
|
@@ -12,6 +12,8 @@ function _getIndexes(context) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
export function _getIndexesOperations(context) {
|
|
15
|
-
return
|
|
15
|
+
return {
|
|
16
|
+
..._getIndexes(context),
|
|
17
|
+
};
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/indexes/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAiC;AAWjC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AA8BnG,SAAS,WAAW,CAAC,OAAyB;IAC5C,OAAO;QACL,cAAc,EAAE,CACd,IAAY,EACZ,OAAe,EACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/indexes/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,iCAAiC;AAWjC,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AA8BnG,SAAS,WAAW,CAAC,OAAyB;IAC5C,OAAO;QACL,cAAc,EAAE,CACd,IAAY,EACZ,OAAe,EACf,KAAiB,EACjB,OAA6C,EAC7C,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC;QAC3D,MAAM,EAAE,CAAC,IAAY,EAAE,OAAe,EAAE,OAAqC,EAAE,EAAE,CAC/E,OAAO,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;QAC1C,GAAG,EAAE,CAAC,IAAY,EAAE,OAAe,EAAE,OAAkC,EAAE,EAAE,CACzE,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC;QACtC,IAAI,EAAE,CAAC,OAAmC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC;QACrE,YAAY,EAAE,CAAC,IAAY,EAAE,OAA2C,EAAE,EAAE,CAC1E,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC;KACvC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,OAAyB;IAC7D,OAAO;QACL,GAAG,WAAW,CAAC,OAAO,CAAC;KACxB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/* eslint-disable tsdoc/syntax */\n\nimport { AIProjectContext } from \"../../api/aiProjectContext.js\";\nimport { IndexUnion } from \"../../models/models.js\";\nimport {\n IndexesCreateOrUpdateOptionalParams,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesListOptionalParams,\n IndexesListVersionsOptionalParams,\n} from \"../../api/indexes/options.js\";\nimport { createOrUpdate, $delete, get, list, listVersions } from \"../../api/indexes/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Indexes operations. */\nexport interface IndexesOperations {\n /** Create a new or update an existing Index with the given version id */\n createOrUpdate: (\n name: string,\n version: string,\n index: IndexUnion,\n options?: IndexesCreateOrUpdateOptionalParams,\n ) => Promise<IndexUnion>;\n /** Delete the specific version of the Index */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (name: string, version: string, options?: IndexesDeleteOptionalParams) => Promise<void>;\n /** Get the specific version of the Index */\n get: (name: string, version: string, options?: IndexesGetOptionalParams) => Promise<IndexUnion>;\n /** List the latest version of each Index */\n list: (options?: IndexesListOptionalParams) => PagedAsyncIterableIterator<IndexUnion>;\n /** List all versions of the given Index */\n listVersions: (\n name: string,\n options?: IndexesListVersionsOptionalParams,\n ) => PagedAsyncIterableIterator<IndexUnion>;\n}\n\nfunction _getIndexes(context: AIProjectContext) {\n return {\n createOrUpdate: (\n name: string,\n version: string,\n index: IndexUnion,\n options?: IndexesCreateOrUpdateOptionalParams,\n ) => createOrUpdate(context, name, version, index, options),\n delete: (name: string, version: string, options?: IndexesDeleteOptionalParams) =>\n $delete(context, name, version, options),\n get: (name: string, version: string, options?: IndexesGetOptionalParams) =>\n get(context, name, version, options),\n list: (options?: IndexesListOptionalParams) => list(context, options),\n listVersions: (name: string, options?: IndexesListVersionsOptionalParams) =>\n listVersions(context, name, options),\n };\n}\n\nexport function _getIndexesOperations(context: AIProjectContext): IndexesOperations {\n return {\n ..._getIndexes(context),\n };\n}\n"]}
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import type { GetChatCompletions, GetEmbeddings, GetImageEmbeddings, ModelClientOptions } from "@azure-rest/ai-inference";
|
|
2
1
|
import type { AzureOpenAI } from "openai";
|
|
3
2
|
import type { AIProjectContext } from "../../api/aiProjectContext.js";
|
|
4
3
|
import type { ConnectionsOperations } from "../connections/index.js";
|
|
5
4
|
import type { AzureOpenAIClientOptions } from "../../api/inference/options.js";
|
|
6
5
|
/** Inference operations interface for AI projects. */
|
|
7
6
|
export interface InferenceOperations {
|
|
8
|
-
/** Get chat completions client for making chat completion requests. */
|
|
9
|
-
chatCompletions: (options?: ModelClientOptions) => GetChatCompletions;
|
|
10
|
-
/** Get embeddings client for making embedding requests. */
|
|
11
|
-
embeddings: (options?: ModelClientOptions) => GetEmbeddings;
|
|
12
|
-
/** Get image embeddings client for making image embedding requests. */
|
|
13
|
-
imageEmbeddings: (options?: ModelClientOptions) => GetImageEmbeddings;
|
|
14
7
|
/** Get Azure OpenAI client for making Azure OpenAI requests. */
|
|
15
8
|
azureOpenAI: (options?: AzureOpenAIClientOptions) => Promise<AzureOpenAI>;
|
|
16
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/inference/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/classic/inference/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,gEAAgE;IAChE,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE,wBAAwB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3E;AAYD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,gBAAgB,EACzB,WAAW,EAAE,qBAAqB,GACjC,mBAAmB,CAIrB"}
|