@azure/ai-projects 1.0.0-beta.3 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -5
- package/dist/browser/agents/assistants.d.ts.map +1 -1
- package/dist/browser/agents/assistants.js +3 -2
- package/dist/browser/agents/assistants.js.map +1 -1
- package/dist/browser/agents/customModels.d.ts +6 -1
- package/dist/browser/agents/customModels.d.ts.map +1 -1
- package/dist/browser/agents/customModels.js.map +1 -1
- package/dist/browser/agents/index.d.ts +4 -2
- package/dist/browser/agents/index.d.ts.map +1 -1
- package/dist/browser/agents/index.js +2 -1
- package/dist/browser/agents/index.js.map +1 -1
- package/dist/browser/agents/inputOutputs.d.ts +4 -4
- package/dist/browser/agents/inputOutputs.d.ts.map +1 -1
- package/dist/browser/agents/inputOutputs.js.map +1 -1
- package/dist/browser/agents/inputValidations.js +2 -2
- package/dist/browser/agents/inputValidations.js.map +1 -1
- package/dist/browser/agents/messages.js +1 -1
- package/dist/browser/agents/messages.js.map +1 -1
- package/dist/browser/agents/threads.d.ts +4 -2
- package/dist/browser/agents/threads.d.ts.map +1 -1
- package/dist/browser/agents/threads.js +23 -0
- package/dist/browser/agents/threads.js.map +1 -1
- package/dist/browser/agents/utils.d.ts +35 -4
- package/dist/browser/agents/utils.d.ts.map +1 -1
- package/dist/browser/agents/utils.js +62 -4
- package/dist/browser/agents/utils.js.map +1 -1
- package/dist/browser/constants.d.ts +1 -1
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/customization/convertModelsToWrite.d.ts.map +1 -1
- package/dist/browser/customization/convertModelsToWrite.js +24 -2
- package/dist/browser/customization/convertModelsToWrite.js.map +1 -1
- package/dist/browser/customization/convertOutputModelsFromWire.d.ts +1 -0
- package/dist/browser/customization/convertOutputModelsFromWire.d.ts.map +1 -1
- package/dist/browser/customization/convertOutputModelsFromWire.js +36 -7
- package/dist/browser/customization/convertOutputModelsFromWire.js.map +1 -1
- package/dist/browser/customization/models.d.ts +158 -9
- package/dist/browser/customization/models.d.ts.map +1 -1
- package/dist/browser/customization/models.js.map +1 -1
- package/dist/browser/customization/outputModels.d.ts +41 -9
- package/dist/browser/customization/outputModels.d.ts.map +1 -1
- package/dist/browser/customization/outputModels.js.map +1 -1
- package/dist/browser/customization/parameters.d.ts +18 -0
- package/dist/browser/customization/parameters.d.ts.map +1 -1
- package/dist/browser/customization/parameters.js.map +1 -1
- package/dist/browser/generated/src/clientDefinitions.d.ts +6 -4
- package/dist/browser/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/browser/generated/src/clientDefinitions.js.map +1 -1
- package/dist/browser/generated/src/isUnexpected.d.ts +2 -1
- package/dist/browser/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/browser/generated/src/isUnexpected.js +1 -0
- package/dist/browser/generated/src/isUnexpected.js.map +1 -1
- package/dist/browser/generated/src/models.d.ts +173 -22
- package/dist/browser/generated/src/models.d.ts.map +1 -1
- package/dist/browser/generated/src/models.js.map +1 -1
- package/dist/browser/generated/src/outputModels.d.ts +173 -21
- package/dist/browser/generated/src/outputModels.d.ts.map +1 -1
- package/dist/browser/generated/src/outputModels.js.map +1 -1
- package/dist/browser/generated/src/paginateHelper.d.ts +1 -1
- package/dist/browser/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/browser/generated/src/paginateHelper.js +1 -1
- package/dist/browser/generated/src/paginateHelper.js.map +1 -1
- package/dist/browser/generated/src/parameters.d.ts +85 -10
- package/dist/browser/generated/src/parameters.d.ts.map +1 -1
- package/dist/browser/generated/src/parameters.js.map +1 -1
- package/dist/browser/generated/src/projectsClient.d.ts +3 -3
- package/dist/browser/generated/src/projectsClient.d.ts.map +1 -1
- package/dist/browser/generated/src/projectsClient.js +1 -1
- package/dist/browser/generated/src/projectsClient.js.map +1 -1
- package/dist/browser/generated/src/responses.d.ts +19 -4
- package/dist/browser/generated/src/responses.d.ts.map +1 -1
- package/dist/browser/generated/src/responses.js.map +1 -1
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/commonjs/agents/assistants.d.ts.map +1 -1
- package/dist/commonjs/agents/assistants.js +3 -2
- package/dist/commonjs/agents/assistants.js.map +1 -1
- package/dist/commonjs/agents/customModels.d.ts +6 -1
- package/dist/commonjs/agents/customModels.d.ts.map +1 -1
- package/dist/commonjs/agents/customModels.js.map +1 -1
- package/dist/commonjs/agents/index.d.ts +4 -2
- package/dist/commonjs/agents/index.d.ts.map +1 -1
- package/dist/commonjs/agents/index.js +1 -0
- package/dist/commonjs/agents/index.js.map +1 -1
- package/dist/commonjs/agents/inputOutputs.d.ts +4 -4
- package/dist/commonjs/agents/inputOutputs.d.ts.map +1 -1
- package/dist/commonjs/agents/inputOutputs.js.map +1 -1
- package/dist/commonjs/agents/inputValidations.js +2 -2
- package/dist/commonjs/agents/inputValidations.js.map +1 -1
- package/dist/commonjs/agents/messages.js +1 -1
- package/dist/commonjs/agents/messages.js.map +1 -1
- package/dist/commonjs/agents/threads.d.ts +4 -2
- package/dist/commonjs/agents/threads.d.ts.map +1 -1
- package/dist/commonjs/agents/threads.js +24 -0
- package/dist/commonjs/agents/threads.js.map +1 -1
- package/dist/commonjs/agents/utils.d.ts +35 -4
- package/dist/commonjs/agents/utils.d.ts.map +1 -1
- package/dist/commonjs/agents/utils.js +62 -4
- package/dist/commonjs/agents/utils.js.map +1 -1
- package/dist/commonjs/constants.d.ts +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/customization/convertModelsToWrite.d.ts.map +1 -1
- package/dist/commonjs/customization/convertModelsToWrite.js +24 -2
- package/dist/commonjs/customization/convertModelsToWrite.js.map +1 -1
- package/dist/commonjs/customization/convertOutputModelsFromWire.d.ts +1 -0
- package/dist/commonjs/customization/convertOutputModelsFromWire.d.ts.map +1 -1
- package/dist/commonjs/customization/convertOutputModelsFromWire.js +37 -7
- package/dist/commonjs/customization/convertOutputModelsFromWire.js.map +1 -1
- package/dist/commonjs/customization/models.d.ts +158 -9
- package/dist/commonjs/customization/models.d.ts.map +1 -1
- package/dist/commonjs/customization/models.js.map +1 -1
- package/dist/commonjs/customization/outputModels.d.ts +41 -9
- package/dist/commonjs/customization/outputModels.d.ts.map +1 -1
- package/dist/commonjs/customization/outputModels.js.map +1 -1
- package/dist/commonjs/customization/parameters.d.ts +18 -0
- package/dist/commonjs/customization/parameters.d.ts.map +1 -1
- package/dist/commonjs/customization/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/clientDefinitions.d.ts +6 -4
- package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -1
- package/dist/commonjs/generated/src/isUnexpected.d.ts +2 -1
- package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/commonjs/generated/src/isUnexpected.js +1 -0
- package/dist/commonjs/generated/src/isUnexpected.js.map +1 -1
- package/dist/commonjs/generated/src/models.d.ts +173 -22
- package/dist/commonjs/generated/src/models.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models.js.map +1 -1
- package/dist/commonjs/generated/src/outputModels.d.ts +173 -21
- package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -1
- package/dist/commonjs/generated/src/outputModels.js.map +1 -1
- package/dist/commonjs/generated/src/paginateHelper.d.ts +1 -1
- package/dist/commonjs/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/commonjs/generated/src/paginateHelper.js.map +1 -1
- package/dist/commonjs/generated/src/parameters.d.ts +85 -10
- package/dist/commonjs/generated/src/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/projectsClient.d.ts +3 -3
- package/dist/commonjs/generated/src/projectsClient.d.ts.map +1 -1
- package/dist/commonjs/generated/src/projectsClient.js +1 -1
- package/dist/commonjs/generated/src/projectsClient.js.map +1 -1
- package/dist/commonjs/generated/src/responses.d.ts +19 -4
- package/dist/commonjs/generated/src/responses.d.ts.map +1 -1
- package/dist/commonjs/generated/src/responses.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/agents/assistants.d.ts.map +1 -1
- package/dist/esm/agents/assistants.js +3 -2
- package/dist/esm/agents/assistants.js.map +1 -1
- package/dist/esm/agents/customModels.d.ts +6 -1
- package/dist/esm/agents/customModels.d.ts.map +1 -1
- package/dist/esm/agents/customModels.js.map +1 -1
- package/dist/esm/agents/index.d.ts +4 -2
- package/dist/esm/agents/index.d.ts.map +1 -1
- package/dist/esm/agents/index.js +2 -1
- package/dist/esm/agents/index.js.map +1 -1
- package/dist/esm/agents/inputOutputs.d.ts +4 -4
- package/dist/esm/agents/inputOutputs.d.ts.map +1 -1
- package/dist/esm/agents/inputOutputs.js.map +1 -1
- package/dist/esm/agents/inputValidations.js +2 -2
- package/dist/esm/agents/inputValidations.js.map +1 -1
- package/dist/esm/agents/messages.js +1 -1
- package/dist/esm/agents/messages.js.map +1 -1
- package/dist/esm/agents/threads.d.ts +4 -2
- package/dist/esm/agents/threads.d.ts.map +1 -1
- package/dist/esm/agents/threads.js +23 -0
- package/dist/esm/agents/threads.js.map +1 -1
- package/dist/esm/agents/utils.d.ts +35 -4
- package/dist/esm/agents/utils.d.ts.map +1 -1
- package/dist/esm/agents/utils.js +62 -4
- package/dist/esm/agents/utils.js.map +1 -1
- package/dist/esm/constants.d.ts +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/customization/convertModelsToWrite.d.ts.map +1 -1
- package/dist/esm/customization/convertModelsToWrite.js +24 -2
- package/dist/esm/customization/convertModelsToWrite.js.map +1 -1
- package/dist/esm/customization/convertOutputModelsFromWire.d.ts +1 -0
- package/dist/esm/customization/convertOutputModelsFromWire.d.ts.map +1 -1
- package/dist/esm/customization/convertOutputModelsFromWire.js +36 -7
- package/dist/esm/customization/convertOutputModelsFromWire.js.map +1 -1
- package/dist/esm/customization/models.d.ts +158 -9
- package/dist/esm/customization/models.d.ts.map +1 -1
- package/dist/esm/customization/models.js.map +1 -1
- package/dist/esm/customization/outputModels.d.ts +41 -9
- package/dist/esm/customization/outputModels.d.ts.map +1 -1
- package/dist/esm/customization/outputModels.js.map +1 -1
- package/dist/esm/customization/parameters.d.ts +18 -0
- package/dist/esm/customization/parameters.d.ts.map +1 -1
- package/dist/esm/customization/parameters.js.map +1 -1
- package/dist/esm/generated/src/clientDefinitions.d.ts +6 -4
- package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/esm/generated/src/clientDefinitions.js.map +1 -1
- package/dist/esm/generated/src/isUnexpected.d.ts +2 -1
- package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/esm/generated/src/isUnexpected.js +1 -0
- package/dist/esm/generated/src/isUnexpected.js.map +1 -1
- package/dist/esm/generated/src/models.d.ts +173 -22
- package/dist/esm/generated/src/models.d.ts.map +1 -1
- package/dist/esm/generated/src/models.js.map +1 -1
- package/dist/esm/generated/src/outputModels.d.ts +173 -21
- package/dist/esm/generated/src/outputModels.d.ts.map +1 -1
- package/dist/esm/generated/src/outputModels.js.map +1 -1
- package/dist/esm/generated/src/paginateHelper.d.ts +1 -1
- package/dist/esm/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/esm/generated/src/paginateHelper.js +1 -1
- package/dist/esm/generated/src/paginateHelper.js.map +1 -1
- package/dist/esm/generated/src/parameters.d.ts +85 -10
- package/dist/esm/generated/src/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/parameters.js.map +1 -1
- package/dist/esm/generated/src/projectsClient.d.ts +3 -3
- package/dist/esm/generated/src/projectsClient.d.ts.map +1 -1
- package/dist/esm/generated/src/projectsClient.js +1 -1
- package/dist/esm/generated/src/projectsClient.js.map +1 -1
- package/dist/esm/generated/src/responses.d.ts +19 -4
- package/dist/esm/generated/src/responses.d.ts.map +1 -1
- package/dist/esm/generated/src/responses.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/react-native/agents/assistants.d.ts.map +1 -1
- package/dist/react-native/agents/assistants.js +3 -2
- package/dist/react-native/agents/assistants.js.map +1 -1
- package/dist/react-native/agents/customModels.d.ts +6 -1
- package/dist/react-native/agents/customModels.d.ts.map +1 -1
- package/dist/react-native/agents/customModels.js.map +1 -1
- package/dist/react-native/agents/index.d.ts +4 -2
- package/dist/react-native/agents/index.d.ts.map +1 -1
- package/dist/react-native/agents/index.js +2 -1
- package/dist/react-native/agents/index.js.map +1 -1
- package/dist/react-native/agents/inputOutputs.d.ts +4 -4
- package/dist/react-native/agents/inputOutputs.d.ts.map +1 -1
- package/dist/react-native/agents/inputOutputs.js.map +1 -1
- package/dist/react-native/agents/inputValidations.js +2 -2
- package/dist/react-native/agents/inputValidations.js.map +1 -1
- package/dist/react-native/agents/messages.js +1 -1
- package/dist/react-native/agents/messages.js.map +1 -1
- package/dist/react-native/agents/threads.d.ts +4 -2
- package/dist/react-native/agents/threads.d.ts.map +1 -1
- package/dist/react-native/agents/threads.js +23 -0
- package/dist/react-native/agents/threads.js.map +1 -1
- package/dist/react-native/agents/utils.d.ts +35 -4
- package/dist/react-native/agents/utils.d.ts.map +1 -1
- package/dist/react-native/agents/utils.js +62 -4
- package/dist/react-native/agents/utils.js.map +1 -1
- package/dist/react-native/constants.d.ts +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/customization/convertModelsToWrite.d.ts.map +1 -1
- package/dist/react-native/customization/convertModelsToWrite.js +24 -2
- package/dist/react-native/customization/convertModelsToWrite.js.map +1 -1
- package/dist/react-native/customization/convertOutputModelsFromWire.d.ts +1 -0
- package/dist/react-native/customization/convertOutputModelsFromWire.d.ts.map +1 -1
- package/dist/react-native/customization/convertOutputModelsFromWire.js +36 -7
- package/dist/react-native/customization/convertOutputModelsFromWire.js.map +1 -1
- package/dist/react-native/customization/models.d.ts +158 -9
- package/dist/react-native/customization/models.d.ts.map +1 -1
- package/dist/react-native/customization/models.js.map +1 -1
- package/dist/react-native/customization/outputModels.d.ts +41 -9
- package/dist/react-native/customization/outputModels.d.ts.map +1 -1
- package/dist/react-native/customization/outputModels.js.map +1 -1
- package/dist/react-native/customization/parameters.d.ts +18 -0
- package/dist/react-native/customization/parameters.d.ts.map +1 -1
- package/dist/react-native/customization/parameters.js.map +1 -1
- package/dist/react-native/generated/src/clientDefinitions.d.ts +6 -4
- package/dist/react-native/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/react-native/generated/src/clientDefinitions.js.map +1 -1
- package/dist/react-native/generated/src/isUnexpected.d.ts +2 -1
- package/dist/react-native/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/react-native/generated/src/isUnexpected.js +1 -0
- package/dist/react-native/generated/src/isUnexpected.js.map +1 -1
- package/dist/react-native/generated/src/models.d.ts +173 -22
- package/dist/react-native/generated/src/models.d.ts.map +1 -1
- package/dist/react-native/generated/src/models.js.map +1 -1
- package/dist/react-native/generated/src/outputModels.d.ts +173 -21
- package/dist/react-native/generated/src/outputModels.d.ts.map +1 -1
- package/dist/react-native/generated/src/outputModels.js.map +1 -1
- package/dist/react-native/generated/src/paginateHelper.d.ts +1 -1
- package/dist/react-native/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/react-native/generated/src/paginateHelper.js +1 -1
- package/dist/react-native/generated/src/paginateHelper.js.map +1 -1
- package/dist/react-native/generated/src/parameters.d.ts +85 -10
- package/dist/react-native/generated/src/parameters.d.ts.map +1 -1
- package/dist/react-native/generated/src/parameters.js.map +1 -1
- package/dist/react-native/generated/src/projectsClient.d.ts +3 -3
- package/dist/react-native/generated/src/projectsClient.d.ts.map +1 -1
- package/dist/react-native/generated/src/projectsClient.js +1 -1
- package/dist/react-native/generated/src/projectsClient.js.map +1 -1
- package/dist/react-native/generated/src/responses.d.ts +19 -4
- package/dist/react-native/generated/src/responses.d.ts.map +1 -1
- package/dist/react-native/generated/src/responses.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -0
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/agents/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA+BlC,wCAKC;AAbD;;;;;;;GAOG;AACH,SAAgB,cAAc,CAC5B,MAAkF,EAClF,IAAY;IAEZ,OAAO,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;AAC9B,CAAC;AAED,2DAA2D;AAC3D,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,iCAAiC;IACjC,sDAAgC,CAAA;IAChC,4BAA4B;IAC5B,0DAAoC,CAAA;IACpC,sBAAsB;IACtB,kEAA4C,CAAA;IAC5C,0BAA0B;IAC1B,sDAAgC,CAAA;AAClC,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B;AAED,MAAM,OAAO,GAAG;IACd,cAAc,EAAE,eAAe;IAC/B,gBAAgB,EAAE,iBAAiB;IACnC,oBAAoB,EAAE,qBAAqB;IAC3C,cAAc,EAAE,eAAe;CAChC,CAAC;AAEF;;GAEG;AACH,MAAa,WAAW;IACtB;;;;;;OAMG;IACH,MAAM,CAAC,oBAAoB,CACzB,QAA4B,EAC5B,aAAuB;QAEvB,OAAO;YACL,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE;oBACnB,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,YAAY,EA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IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,mCAAQ,IAAI,CAAC,aAAa,GAAK,IAAI,CAAC,SAAS,CAAE,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9HD,0BA8HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AzureAISearchToolDefinition,\n AzureFunctionToolDefinition,\n CodeInterpreterToolDefinition,\n FileSearchToolDefinition,\n FileSearchToolDefinitionDetails,\n FunctionDefinition,\n FunctionToolDefinition,\n OpenApiFunctionDefinition,\n OpenApiToolDefinition,\n RequiredActionOutput,\n RequiredToolCallOutput,\n ToolDefinition,\n ToolDefinitionOutputParent,\n ToolResources,\n VectorStoreConfigurations,\n VectorStoreDataSource,\n AzureFunctionStorageQueue,\n AzureFunctionDefinition,\n} from \"./inputOutputs.js\";\n\n/**\n * Determines if the given output is of the specified type.\n *\n * @typeParam T - The type to check against, which extends one of the possible output parent types.\n * @param output - The action to check, which can be of type `RequiredActionOutput`, `RequiredToolCallOutput`, or `ToolDefinitionOutputParent`.\n * @param type - The type to check the action against.\n * @returns A boolean indicating whether the action is of the specified type.\n */\nexport function isOutputOfType<T extends { type: string }>(\n output: RequiredActionOutput | RequiredToolCallOutput | ToolDefinitionOutputParent,\n type: string,\n): output is T {\n return output.type === type;\n}\n\n/** Types of connection tools used to configure an agent */\nexport enum connectionToolType {\n /** Bing grounding search tool */\n BingGrounding = \"bing_grounding\",\n /** Microsoft Fabric tool */\n MicrosoftFabric = \"microsoft_fabric\",\n /** Sharepoint tool */\n SharepointGrounding = \"sharepoint_grounding\",\n /** Azure Function tool */\n AzureFunction = \"azure_function\",\n}\n\nconst toolMap = {\n bing_grounding: \"bingGrounding\",\n microsoft_fabric: \"microsoftFabric\",\n sharepoint_grounding: \"sharepointGrounding\",\n azure_function: \"azureFunction\",\n};\n\n/**\n * Utility class for creating various tools.\n */\nexport class ToolUtility {\n /**\n * Creates a connection tool\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n * @returns An object containing the definition for the connection tool\n */\n static createConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinition } {\n return {\n definition: {\n type: toolType,\n [toolMap[toolType]]: {\n connections: connectionIds.map((connectionId) => ({ connectionId: connectionId })),\n },\n },\n };\n }\n\n /**\n * Creates a file search tool\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n static createFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"file_search\", fileSearch: definitionDetails },\n resources: { fileSearch: { vectorStoreIds: vectorStoreIds, vectorStores: vectorStores } },\n };\n }\n\n /**\n * Creates a code interpreter tool\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool.\n */\n static createCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n if (fileIds && dataSources) {\n throw new Error(\"Cannot specify both fileIds and dataSources\");\n }\n\n return {\n definition: { type: \"code_interpreter\" },\n resources: { codeInterpreter: { fileIds: fileIds, dataSources: dataSources } },\n };\n }\n\n /**\n * Creates an Azure Function tool\n * @param name - The name of the Azure Function.\n * @param description - The description of the Azure Function.\n * @param parameters - The parameters of the Azure Function.\n * @param inputQueue - The input queue configuration.\n * @param outputQueue - The output queue configuration.\n * @returns An object containing the definition and resources for the Azure Function tool.\n */\n static createAzureFunctionTool(\n name: string,\n description: string,\n parameters: unknown,\n inputQueue: AzureFunctionStorageQueue,\n outputQueue: AzureFunctionStorageQueue,\n definitionDetails: AzureFunctionDefinition,\n ): { definition: AzureFunctionToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"azure_function\", azureFunction: definitionDetails },\n resources: {\n azureFunction: {\n name: name,\n description: description,\n parameters: parameters,\n inputQueue: inputQueue,\n outputQueue: outputQueue,\n },\n },\n };\n }\n /**\n * Creates an Azure AI search tool\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool.\n */\n static createAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"azure_ai_search\" },\n resources: {\n azureAISearch: {\n indexes: [{ indexConnectionId: indexConnectionId, indexName: indexName }],\n },\n },\n };\n }\n\n /**\n * Creates a function tool\n *\n * @param functionDefinition - The function definition to use.\n *\n * @returns An object containing the definition for the function tool.\n */\n static createFunctionTool(functionDefinition: FunctionDefinition): {\n definition: FunctionToolDefinition;\n } {\n return {\n definition: {\n type: \"function\",\n function: functionDefinition,\n },\n };\n }\n\n /**\n * Creates an OpenApi tool\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool.\n */\n static createOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n return {\n definition: {\n type: \"openapi\",\n openapi: openApiFunctionDefinition,\n },\n };\n }\n}\n\n/**\n * Represents a set of tools with their definitions and resources.\n */\nexport class ToolSet {\n /** A list of tool definitions that have been added to the tool set. */\n toolDefinitions: ToolDefinition[] = [];\n\n /** A collection of resources associated with the tools in the tool set. */\n toolResources: ToolResources = {};\n\n /**\n * Adds a connection tool to the tool set.\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n *\n * @returns An object containing the definition for the connection tool\n */\n addConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinition } {\n const tool = ToolUtility.createConnectionTool(toolType, connectionIds);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a file search tool to the tool set.\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n addFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createFileSearchTool(vectorStoreIds, vectorStores, definitionDetails);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds a code interpreter tool to the tool set.\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool\n */\n addCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createCodeInterpreterTool(fileIds, dataSources);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an Azure AI search tool to the tool set.\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool\n */\n addAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createAzureAISearchTool(indexConnectionId, indexName);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an OpenApi tool to the tool set.\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool\n */\n addOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n const tool = ToolUtility.createOpenApiTool(openApiFunctionDefinition);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds an Azure Function tool to the tool set.\n *\n * @param name - The name of the Azure Function.\n * @param description - The description of the Azure Function.\n * @param parameters - The parameters of the Azure Function.\n * @param inputQueue - The input queue configuration.\n * @param outputQueue - The output queue configuration.\n *\n * @returns An object containing the definition and resources for the Azure Function tool.\n */\n addAzureFunctionTool(\n name: string,\n description: string,\n parameters: unknown,\n inputQueue: AzureFunctionStorageQueue,\n outputQueue: AzureFunctionStorageQueue,\n definitionDetails: AzureFunctionDefinition,\n ): { definition: AzureFunctionToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createAzureFunctionTool(\n name,\n description,\n parameters,\n inputQueue,\n outputQueue,\n definitionDetails,\n );\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/agents/utils.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAiClC,wCAKC;AAbD;;;;;;;GAOG;AACH,SAAgB,cAAc,CAC5B,MAAkF,EAClF,IAAY;IAEZ,OAAO,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;AAC9B,CAAC;AAED,2DAA2D;AAC3D,IAAY,kBAWX;AAXD,W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IACd,CAAC;IAED;;;;;;;;;;OAUG;IACH,oBAAoB,CAClB,IAAY,EACZ,WAAmB,EACnB,UAAmB,EACnB,UAAqC,EACrC,WAAsC,EACtC,iBAA0C;QAE1C,MAAM,IAAI,GAAG,WAAW,CAAC,uBAAuB,CAC9C,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,CAClB,CAAC;QACF,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,mCAAQ,IAAI,CAAC,aAAa,GAAK,IAAI,CAAC,SAAS,CAAE,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;IACD;;;;;OAKG;IACH,aAAa,CAAC,YAAoB;QAChC,MAAM,IAAI,GAAG,WAAW,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;QACxD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzID,0BAyIC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AzureAISearchToolDefinition,\n AzureFunctionToolDefinition,\n CodeInterpreterToolDefinition,\n FileSearchToolDefinition,\n FileSearchToolDefinitionDetails,\n FunctionDefinition,\n FunctionToolDefinition,\n SearchConfigurationOutput,\n OpenApiToolDefinition,\n RequiredActionOutput,\n RequiredToolCallOutput,\n ToolDefinition,\n ToolDefinitionOutputParent,\n ToolResources,\n VectorStoreConfigurations,\n VectorStoreDataSource,\n AzureFunctionStorageQueue,\n AzureFunctionDefinition,\n OpenApiFunctionDefinition,\n} from \"./inputOutputs.js\";\nimport type { CreateAzureAISearchToolOptions } from \"../customization/models.js\";\n\n/**\n * Determines if the given output is of the specified type.\n *\n * @typeParam T - The type to check against, which extends one of the possible output parent types.\n * @param output - The action to check, which can be of type `RequiredActionOutput`, `RequiredToolCallOutput`, or `ToolDefinitionOutputParent`.\n * @param type - The type to check the action against.\n * @returns A boolean indicating whether the action is of the specified type.\n */\nexport function isOutputOfType<T extends { type: string }>(\n output: RequiredActionOutput | RequiredToolCallOutput | ToolDefinitionOutputParent,\n type: string,\n): output is T {\n return output.type === type;\n}\n\n/** Types of connection tools used to configure an agent */\nexport enum connectionToolType {\n /** Bing grounding search tool */\n BingGrounding = \"bing_grounding\",\n /** Microsoft Fabric tool */\n MicrosoftFabric = \"fabric_dataagent\",\n /** Sharepoint tool */\n SharepointGrounding = \"sharepoint_grounding\",\n /** Azure Function tool */\n AzureFunction = \"azure_function\",\n /** Bing custom search tool */\n BingCustomSearch = \"bing_custom_search\",\n}\n\nconst toolMap = {\n bing_grounding: \"bingGrounding\",\n fabric_dataagent: \"fabric_dataagent\",\n sharepoint_grounding: \"sharepointGrounding\",\n azure_function: \"azureFunction\",\n bing_custom_search: \"bingCustomSearch\",\n};\n\n/**\n * Utility class for creating various tools.\n */\nexport class ToolUtility {\n /**\n * Creates a connection tool\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n * @returns An object containing the definition for the connection tool\n */\n static createConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinition } {\n return {\n definition: {\n type: toolType,\n [toolMap[toolType]]: {\n connections: connectionIds.map((connectionId) => ({ connectionId: connectionId })),\n },\n },\n };\n }\n\n /**\n * Creates a bing custom search tool\n *\n * @param searchConfigurations - The ID of bing search connection and instanceName.\n *\n * @returns An object containing the definition and resources for the bing custom search tool\n */\n\n static createBingCustomSearchTool(searchConfigurations: SearchConfigurationOutput[]): {\n definition: ToolDefinition;\n } {\n return {\n definition: {\n type: \"bing_custom_search\",\n bingCustomSearch: {\n searchConfigurations: searchConfigurations.map((searchConfiguration) => ({\n connectionId: searchConfiguration.connectionId,\n instanceName: searchConfiguration.instanceName,\n })),\n },\n },\n };\n }\n\n /**\n * Creates a file search tool\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n static createFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"file_search\", fileSearch: definitionDetails },\n resources: { fileSearch: { vectorStoreIds: vectorStoreIds, vectorStores: vectorStores } },\n };\n }\n\n /**\n * Creates a code interpreter tool\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool.\n */\n static createCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n if (fileIds && dataSources) {\n throw new Error(\"Cannot specify both fileIds and dataSources\");\n }\n\n return {\n definition: { type: \"code_interpreter\" },\n resources: { codeInterpreter: { fileIds: fileIds, dataSources: dataSources } },\n };\n }\n\n /**\n * Creates an Azure Function tool\n * @param name - The name of the Azure Function.\n * @param description - The description of the Azure Function.\n * @param parameters - The parameters of the Azure Function.\n * @param inputQueue - The input queue configuration.\n * @param outputQueue - The output queue configuration.\n * @returns An object containing the definition and resources for the Azure Function tool.\n */\n static createAzureFunctionTool(\n name: string,\n description: string,\n parameters: unknown,\n inputQueue: AzureFunctionStorageQueue,\n outputQueue: AzureFunctionStorageQueue,\n definitionDetails: AzureFunctionDefinition,\n ): { definition: AzureFunctionToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"azure_function\", azureFunction: definitionDetails },\n resources: {\n azureFunction: {\n name: name,\n description: description,\n parameters: parameters,\n inputQueue: inputQueue,\n outputQueue: outputQueue,\n },\n },\n };\n }\n /**\n * Creates an Azure AI search tool\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool.\n */\n static createAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n options?: CreateAzureAISearchToolOptions,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n return {\n definition: { type: \"azure_ai_search\" },\n resources: {\n azureAISearch: {\n indexes: [\n {\n indexConnectionId: indexConnectionId,\n indexName: indexName,\n queryType: options?.queryType,\n topK: options?.topK,\n filter: options?.filter,\n },\n ],\n },\n },\n };\n }\n\n /**\n * Creates a Microsoft Fabric tool\n *\n * @param connectionIds - A list of the IDs of the Fabric connections to use.\n * @returns An object containing the definition for the Microsoft Fabric tool\n */\n static createFabricTool(connectionId: string): { definition: ToolDefinition } {\n return {\n definition: {\n type: \"fabric_dataagent\",\n fabricDataAgent: {\n connections: [{ connectionId: connectionId }],\n },\n },\n };\n }\n\n /**\n * Creates a function tool\n *\n * @param functionDefinition - The function definition to use.\n *\n * @returns An object containing the definition for the function tool.\n */\n static createFunctionTool(functionDefinition: FunctionDefinition): {\n definition: FunctionToolDefinition;\n } {\n return {\n definition: {\n type: \"function\",\n function: functionDefinition,\n },\n };\n }\n\n /**\n * Creates an OpenApi tool\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool.\n */\n static createOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n return {\n definition: {\n type: \"openapi\",\n openapi: openApiFunctionDefinition,\n },\n };\n }\n}\n/**\n * Represents a set of tools with their definitions and resources.\n */\nexport class ToolSet {\n /** A list of tool definitions that have been added to the tool set. */\n toolDefinitions: ToolDefinition[] = [];\n\n /** A collection of resources associated with the tools in the tool set. */\n toolResources: ToolResources = {};\n\n /**\n * Adds a connection tool to the tool set.\n *\n * @param toolType - The type of the connection tool.\n * @param connectionIds - A list of the IDs of the connections to use.\n *\n * @returns An object containing the definition for the connection tool\n */\n addConnectionTool(\n toolType: connectionToolType,\n connectionIds: string[],\n ): { definition: ToolDefinition } {\n const tool = ToolUtility.createConnectionTool(toolType, connectionIds);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds a file search tool to the tool set.\n *\n * @param vectorStoreIds - The ID of the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent.\n * @param vectorStores - The list of vector store configuration objects from Azure. This list is limited to one element. The only element of this list contains the list of azure asset IDs used by the search tool.\n * @param definitionDetails - The input definition information for a file search tool as used to configure an agent.\n *\n * @returns An object containing the definition and resources for the file search tool\n */\n addFileSearchTool(\n vectorStoreIds?: string[],\n vectorStores?: Array<VectorStoreConfigurations>,\n definitionDetails?: FileSearchToolDefinitionDetails,\n ): { definition: FileSearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createFileSearchTool(vectorStoreIds, vectorStores, definitionDetails);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds a code interpreter tool to the tool set.\n *\n * @param fileIds - A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n * @param dataSources - The data sources to be used. This option is mutually exclusive with fileIds.\n *\n * @returns An object containing the definition and resources for the code interpreter tool\n */\n addCodeInterpreterTool(\n fileIds?: string[],\n dataSources?: Array<VectorStoreDataSource>,\n ): { definition: CodeInterpreterToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createCodeInterpreterTool(fileIds, dataSources);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an Azure AI search tool to the tool set.\n *\n * @param indexConnectionId - The connection ID of the Azure AI search index.\n * @param indexName - The name of the Azure AI search index.\n *\n * @returns An object containing the definition and resources for the Azure AI search tool\n */\n addAzureAISearchTool(\n indexConnectionId: string,\n indexName: string,\n ): { definition: AzureAISearchToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createAzureAISearchTool(indexConnectionId, indexName);\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n\n /**\n * Adds an OpenApi tool to the tool set.\n *\n * @param openApiFunctionDefinition - The OpenApi function definition to use.\n *\n * @returns An object containing the definition for the OpenApi tool\n */\n addOpenApiTool(openApiFunctionDefinition: OpenApiFunctionDefinition): {\n definition: OpenApiToolDefinition;\n } {\n const tool = ToolUtility.createOpenApiTool(openApiFunctionDefinition);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n\n /**\n * Adds an Azure Function tool to the tool set.\n *\n * @param name - The name of the Azure Function.\n * @param description - The description of the Azure Function.\n * @param parameters - The parameters of the Azure Function.\n * @param inputQueue - The input queue configuration.\n * @param outputQueue - The output queue configuration.\n *\n * @returns An object containing the definition and resources for the Azure Function tool.\n */\n addAzureFunctionTool(\n name: string,\n description: string,\n parameters: unknown,\n inputQueue: AzureFunctionStorageQueue,\n outputQueue: AzureFunctionStorageQueue,\n definitionDetails: AzureFunctionDefinition,\n ): { definition: AzureFunctionToolDefinition; resources: ToolResources } {\n const tool = ToolUtility.createAzureFunctionTool(\n name,\n description,\n parameters,\n inputQueue,\n outputQueue,\n definitionDetails,\n );\n this.toolDefinitions.push(tool.definition);\n this.toolResources = { ...this.toolResources, ...tool.resources };\n return tool;\n }\n /**\n * Adds a Microsoft Fabric tool to the tool set.\n *\n * @param connectionId - The ID of the Fabric connection to use.\n * @returns An object containing the definition for the Microsoft Fabric tool\n */\n addFabricTool(connectionId: string): { definition: ToolDefinition } {\n const tool = ToolUtility.createFabricTool(connectionId);\n this.toolDefinitions.push(tool.definition);\n return tool;\n }\n}\n"]}
|
|
@@ -6,7 +6,7 @@ exports.PACKAGE_NAME = exports.SDK_VERSION = void 0;
|
|
|
6
6
|
/**
|
|
7
7
|
* Current version of the `@azure/ai-projects` package.
|
|
8
8
|
*/
|
|
9
|
-
exports.SDK_VERSION = `1.0.0-beta.
|
|
9
|
+
exports.SDK_VERSION = `1.0.0-beta.5`;
|
|
10
10
|
/**
|
|
11
11
|
* The package name of the `@azure/ai-projects` package.
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;GAEG;AACU,QAAA,WAAW,GAAG,cAAc,CAAC;AAE1C;;GAEG;AACU,QAAA,YAAY,GAAG,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/ai-projects` package.\n */\nexport const SDK_VERSION = `1.0.0-beta.
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC;;GAEG;AACU,QAAA,WAAW,GAAG,cAAc,CAAC;AAE1C;;GAEG;AACU,QAAA,YAAY,GAAG,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Current version of the `@azure/ai-projects` package.\n */\nexport const SDK_VERSION = `1.0.0-beta.5`;\n\n/**\n * The package name of the `@azure/ai-projects` package.\n */\nexport const PACKAGE_NAME = \"@azure/ai-projects\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertModelsToWrite.d.ts","sourceRoot":"","sources":["../../../src/customization/convertModelsToWrite.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,YAAY,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,KAAK,eAAe,MAAM,4BAA4B,CAAC;AAGnE,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,CAAC,kBAAkB,GACtC,eAAe,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wB,GAC5C,eAAe,CAAC,wBAAwB,CAQ1C"}
|
|
@@ -46,7 +46,9 @@ function convertToolDefinition(source) {
|
|
|
46
46
|
return convertFunctionToolDefinition(source);
|
|
47
47
|
case "bing_grounding":
|
|
48
48
|
return convertBingGroundingToolDefinition(source);
|
|
49
|
-
case "
|
|
49
|
+
case "bing_custom_search":
|
|
50
|
+
return convertBingCustomSearchToolDefinition(source);
|
|
51
|
+
case "fabric_dataagent":
|
|
50
52
|
return convertMicrosoftFabricToolDefinition(source);
|
|
51
53
|
case "sharepoint_grounding":
|
|
52
54
|
return convertSharepointToolDefinition(source);
|
|
@@ -82,10 +84,21 @@ function convertBingGroundingToolDefinition(source) {
|
|
|
82
84
|
bing_grounding: convertToolConnectionList(source.bingGrounding),
|
|
83
85
|
};
|
|
84
86
|
}
|
|
87
|
+
function convertBingCustomSearchToolDefinition(source) {
|
|
88
|
+
var _a;
|
|
89
|
+
return {
|
|
90
|
+
type: source.type,
|
|
91
|
+
bing_custom_search: ((_a = source === null || source === void 0 ? void 0 : source.bingCustomSearch) === null || _a === void 0 ? void 0 : _a.searchConfigurations)
|
|
92
|
+
? {
|
|
93
|
+
search_configurations: source.bingCustomSearch.searchConfigurations.map(convertToolSearchConfiguration),
|
|
94
|
+
}
|
|
95
|
+
: { search_configurations: [] },
|
|
96
|
+
};
|
|
97
|
+
}
|
|
85
98
|
function convertMicrosoftFabricToolDefinition(source) {
|
|
86
99
|
return {
|
|
87
100
|
type: source.type,
|
|
88
|
-
|
|
101
|
+
fabric_dataagent: convertToolConnectionList(source.fabricDataAgent),
|
|
89
102
|
};
|
|
90
103
|
}
|
|
91
104
|
function convertSharepointToolDefinition(source) {
|
|
@@ -175,6 +188,9 @@ function convertIndexResource(source) {
|
|
|
175
188
|
return {
|
|
176
189
|
index_connection_id: source.indexConnectionId,
|
|
177
190
|
index_name: source.indexName,
|
|
191
|
+
query_type: source.queryType,
|
|
192
|
+
top_k: source.topK,
|
|
193
|
+
filter: source.filter,
|
|
178
194
|
};
|
|
179
195
|
}
|
|
180
196
|
function convertUpdateAgentOptions(source) {
|
|
@@ -285,4 +301,10 @@ function convertToolConnection(source) {
|
|
|
285
301
|
connection_id: source.connectionId,
|
|
286
302
|
};
|
|
287
303
|
}
|
|
304
|
+
function convertToolSearchConfiguration(source) {
|
|
305
|
+
return {
|
|
306
|
+
connection_id: source.connectionId,
|
|
307
|
+
instance_name: source.instanceName,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
288
310
|
//# sourceMappingURL=convertModelsToWrite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertModelsToWrite.js","sourceRoot":"","sources":["../../../src/customization/convertModelsToWrite.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAMlC,8DAeC;AAsKD,oEAOC;AA4ED,8DAeC;AAED,8EAQC;AAED,0EAOC;AAyBD,0DA4BC;AA2CD,8CAKC;AAED,4EA0BC;AAWD,8DAiBC;AAED,8FAaC;AAoBD,0EAUC;AArfD,uBAAuB;AACvB,SAAgB,yBAAyB,CACvC,MAAuC;IAEvC,uIACE,KAAK,EAAE,MAAM,CAAC,KAAK,IAChB,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,GACtC,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,GAC3D,CAAC,MAAM,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,GAC9D,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC,GACpE,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE,cAAc,EAAE,oBAAoB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAC,GACxF,CAAC,MAAM,CAAC,WAAW,KA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,MAAM,CAAC,UAAU,IAC7B;AACJ,CAAC;AAED,SAAS,yBAAyB,CAChC,MAAuC;IAEvC,yBACK,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC,EACzF;AACJ,CAAC;AAED,SAAS,qBAAqB,CAC5B,MAAmC;IAEnC,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,YAAY;KACnC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type * as PublicModels from \"./models.js\";\nimport type * as GeneratedModels from \"../generated/src/models.js\";\n\n// Conversion functions\nexport function convertCreateAgentOptions(\n source: PublicModels.CreateAgentOptions,\n): GeneratedModels.CreateAgentOptions {\n return {\n model: source.model,\n ...(source.name && { name: source.name }),\n ...(source.description && { description: source.description }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertToolResources(source: PublicModels.ToolResources): GeneratedModels.ToolResources {\n return {\n ...(source.codeInterpreter && {\n code_interpreter: convertCodeInterpreterToolResource(source.codeInterpreter),\n }),\n ...(source.fileSearch && { file_search: convertFileSearchToolResource(source.fileSearch) }),\n ...(source.azureAISearch && {\n azure_ai_search: convertAzureAISearchResource(source.azureAISearch),\n }),\n ...(source.azureFunction && {\n name: source.azureFunction.name,\n }),\n };\n}\n\nfunction convertMessageAttachmentToolDefinition(\n source: PublicModels.MessageAttachmentToolDefinition,\n): GeneratedModels.MessageAttachmentToolDefinition {\n switch (source.type) {\n case \"code_interpreter\":\n return convertCodeInterpreterToolDefinition(\n source as PublicModels.CodeInterpreterToolDefinition,\n );\n case \"file_search\":\n return convertFileSearchToolDefinition(source as PublicModels.FileSearchToolDefinition);\n default:\n throw new Error(`Unknown tool type: ${source}`);\n }\n}\n\nfunction convertToolDefinition(\n source: PublicModels.ToolDefinition,\n): GeneratedModels.ToolDefinition {\n switch (source.type) {\n case \"code_interpreter\":\n return convertCodeInterpreterToolDefinition(\n source as PublicModels.CodeInterpreterToolDefinition,\n );\n case \"file_search\":\n return convertFileSearchToolDefinition(source as PublicModels.FileSearchToolDefinition);\n case \"function\":\n return convertFunctionToolDefinition(source as PublicModels.FunctionToolDefinition);\n case \"bing_grounding\":\n return convertBingGroundingToolDefinition(source as PublicModels.BingGroundingToolDefinition);\n case \"microsoft_fabric\":\n return convertMicrosoftFabricToolDefinition(\n source as PublicModels.MicrosoftFabricToolDefinition,\n );\n case \"sharepoint_grounding\":\n return convertSharepointToolDefinition(source as PublicModels.SharepointToolDefinition);\n case \"azure_ai_search\":\n return convertAzureAISearchToolDefinition(source as PublicModels.AzureAISearchToolDefinition);\n case \"openapi\":\n return convertOpenApiToolDefinition(source as PublicModels.OpenApiToolDefinition);\n case \"azure_function\":\n return convertAzureFunctionToolDefinition(source as PublicModels.AzureFunctionToolDefinition);\n default:\n throw new Error(`Unknown tool type: ${source.type}`);\n }\n}\n\nfunction convertCodeInterpreterToolDefinition(\n source: PublicModels.CodeInterpreterToolDefinition,\n): GeneratedModels.CodeInterpreterToolDefinition {\n return {\n type: source.type,\n };\n}\n\nfunction convertFileSearchToolDefinition(\n source: PublicModels.FileSearchToolDefinition,\n): GeneratedModels.FileSearchToolDefinition {\n return {\n type: source.type,\n ...(source.fileSearch && {\n file_search: convertFileSearchToolDefinitionDetails(source.fileSearch),\n }),\n };\n}\n\nfunction convertFunctionToolDefinition(\n source: PublicModels.FunctionToolDefinition,\n): GeneratedModels.FunctionToolDefinition {\n return {\n type: source.type,\n function: convertFunctionDefinition(source.function),\n };\n}\n\nfunction convertBingGroundingToolDefinition(\n source: PublicModels.BingGroundingToolDefinition,\n): GeneratedModels.BingGroundingToolDefinition {\n return {\n type: source.type,\n bing_grounding: convertToolConnectionList(source.bingGrounding),\n };\n}\n\nfunction convertMicrosoftFabricToolDefinition(\n source: PublicModels.MicrosoftFabricToolDefinition,\n): GeneratedModels.MicrosoftFabricToolDefinition {\n return {\n type: source.type,\n fabric_aiskill: convertToolConnectionList(source.fabricAISkill),\n };\n}\n\nfunction convertSharepointToolDefinition(\n source: PublicModels.SharepointToolDefinition,\n): GeneratedModels.SharepointToolDefinition {\n return {\n type: source.type,\n sharepoint_grounding: convertToolConnectionList(source.sharepointGrounding),\n };\n}\n\nfunction convertAzureAISearchToolDefinition(\n source: PublicModels.AzureAISearchToolDefinition,\n): GeneratedModels.AzureAISearchToolDefinition {\n return {\n type: source.type,\n };\n}\n\nfunction convertOpenApiToolDefinition(\n source: PublicModels.OpenApiToolDefinition,\n): GeneratedModels.OpenApiToolDefinition {\n return {\n type: source.type,\n openapi: source.openapi,\n };\n}\n\nfunction convertFileSearchToolDefinitionDetails(\n source: PublicModels.FileSearchToolDefinitionDetails,\n): GeneratedModels.FileSearchToolDefinitionDetails {\n return {\n ...(source.maxNumResults && { max_num_results: source.maxNumResults }),\n ...(source.rankingOptions && {\n ranking_options: convertFileSearchRankingOptions(source.rankingOptions),\n }),\n };\n}\n\nfunction convertFileSearchRankingOptions(\n source: PublicModels.FileSearchRankingOptions,\n): GeneratedModels.FileSearchRankingOptions {\n return {\n ranker: source.ranker,\n score_threshold: source.scoreThreshold,\n };\n}\n\nfunction convertCodeInterpreterToolResource(\n source: PublicModels.CodeInterpreterToolResource,\n): GeneratedModels.CodeInterpreterToolResource {\n return {\n file_ids: source.fileIds,\n ...(source.dataSources && {\n data_sources: source.dataSources.map(convertVectorStoreDataSource),\n }),\n };\n}\n\nexport function convertVectorStoreDataSource(\n source: PublicModels.VectorStoreDataSource,\n): GeneratedModels.VectorStoreDataSource {\n return {\n uri: source.uri,\n type: source.type,\n };\n}\n\nfunction convertFileSearchToolResource(\n source: PublicModels.FileSearchToolResource,\n): GeneratedModels.FileSearchToolResource {\n return {\n ...(source.vectorStoreIds && { vector_store_ids: source.vectorStoreIds }),\n ...(source.vectorStores && {\n vector_stores: source.vectorStores.map(convertVectorStoreConfigurations),\n }),\n };\n}\n\nfunction convertAzureFunctionToolDefinition(\n source: PublicModels.AzureFunctionToolDefinition,\n): GeneratedModels.AzureFunctionToolDefinition {\n return {\n type: source.type,\n azure_function: convertAzureFunctionDefinition(source.azureFunction),\n };\n}\n\nfunction convertAzureFunctionDefinition(\n source: PublicModels.AzureFunctionDefinition,\n): GeneratedModels.AzureFunctionDefinition {\n return {\n function: source.function,\n input_binding: {\n type: source.inputBinding.type,\n storage_queue: {\n queue_service_endpoint: source.inputBinding.storageQueue.queueServiceEndpoint,\n queue_name: source.inputBinding.storageQueue.queueName,\n },\n },\n output_binding: {\n type: source.outputBinding.type,\n storage_queue: {\n queue_service_endpoint: source.outputBinding.storageQueue.queueServiceEndpoint,\n queue_name: source.outputBinding.storageQueue.queueName,\n },\n },\n };\n}\n\nfunction convertVectorStoreConfigurations(\n source: PublicModels.VectorStoreConfigurations,\n): GeneratedModels.VectorStoreConfigurations {\n return {\n name: source.name,\n configuration: convertVectorStoreConfiguration(source.configuration),\n };\n}\n\nfunction convertVectorStoreConfiguration(\n source: PublicModels.VectorStoreConfiguration,\n): GeneratedModels.VectorStoreConfiguration {\n return {\n data_sources: source.dataSources.map(convertVectorStoreDataSource),\n };\n}\n\nfunction convertAzureAISearchResource(\n source: PublicModels.AzureAISearchResource,\n): GeneratedModels.AzureAISearchResource {\n return {\n ...(source.indexes && { indexes: source.indexes.map(convertIndexResource) }),\n };\n}\n\nfunction convertIndexResource(source: PublicModels.IndexResource): GeneratedModels.IndexResource {\n return {\n index_connection_id: source.indexConnectionId,\n index_name: source.indexName,\n };\n}\n\nexport function convertUpdateAgentOptions(\n source: PublicModels.UpdateAgentOptions,\n): GeneratedModels.UpdateAgentOptions {\n return {\n ...(source.model && { model: source.model }),\n ...(source.name && { name: source.name }),\n ...(source.description && { description: source.description }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nexport function convertAgentThreadCreationOptions(\n source: PublicModels.AgentThreadCreationOptions,\n): GeneratedModels.AgentThreadCreationOptions {\n return {\n ...(source.messages && { messages: source.messages.map(convertThreadMessageOptions) }),\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nexport function convertAgentThreadUpdateOptions(\n source: PublicModels.UpdateAgentThreadOptions,\n): GeneratedModels.UpdateAgentThreadOptions {\n return {\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertThreadMessageOptions(\n source: PublicModels.ThreadMessageOptions,\n): GeneratedModels.ThreadMessageOptions {\n return {\n role: source.role,\n content: source.content,\n ...(source.attachments && { attachments: source.attachments.map(convertMessageAttachment) }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertMessageAttachment(\n source: PublicModels.MessageAttachment,\n): GeneratedModels.MessageAttachment {\n return {\n file_id: source.fileId,\n ...(source.dataSource && {\n data_source: convertVectorStoreDataSource(source.dataSource),\n }),\n ...(source.tools && { tools: source.tools.map(convertMessageAttachmentToolDefinition) }),\n };\n}\n\nexport function convertCreateRunOptions(\n source: PublicModels.CreateRunOptions,\n): GeneratedModels.CreateRunOptions {\n return {\n assistant_id: source.assistantId,\n ...(source.model && { model: source.model }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.additionalInstructions && {\n additional_instructions: source.additionalInstructions,\n }),\n ...(source.additionalMessages && {\n additional_messages: source.additionalMessages.map(convertThreadMessageOptions),\n }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.stream !== undefined && { stream: source.stream }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.maxPromptTokens !== undefined && { max_prompt_tokens: source.maxPromptTokens }),\n ...(source.maxCompletionTokens !== undefined && {\n max_completion_tokens: source.maxCompletionTokens,\n }),\n ...(source.truncationStrategy && {\n truncation_strategy: convertTruncationObject(source.truncationStrategy),\n }),\n ...(source.toolChoice && { tool_choice: source.toolChoice }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertTruncationObject(\n source: PublicModels.TruncationObject,\n): GeneratedModels.TruncationObject {\n return {\n type: source.type,\n ...(source.lastMessages !== undefined && { last_messages: source.lastMessages }),\n };\n}\n\nfunction convertUpdateToolResourcesOptions(\n source: PublicModels.UpdateToolResourcesOptions,\n): GeneratedModels.UpdateToolResourcesOptions {\n return {\n ...(source.codeInterpreter && {\n code_interpreter: convertUpdateCodeInterpreterToolResourceOptions(source.codeInterpreter),\n }),\n ...(source.fileSearch && {\n file_search: convertUpdateFileSearchToolResourceOptions(source.fileSearch),\n }),\n ...(source.azureAISearch && {\n azure_ai_search: convertAzureAISearchResource(source.azureAISearch),\n }),\n };\n}\n\nfunction convertUpdateCodeInterpreterToolResourceOptions(\n source: PublicModels.UpdateCodeInterpreterToolResourceOptions,\n): GeneratedModels.UpdateCodeInterpreterToolResourceOptions {\n return {\n ...(source.fileIds && { file_ids: source.fileIds }),\n };\n}\n\nfunction convertUpdateFileSearchToolResourceOptions(\n source: PublicModels.UpdateFileSearchToolResourceOptions,\n): GeneratedModels.UpdateFileSearchToolResourceOptions {\n return {\n ...(source.vectorStoreIds && { vector_store_ids: source.vectorStoreIds }),\n };\n}\n\nexport function convertToolOutput(source: PublicModels.ToolOutput): GeneratedModels.ToolOutput {\n return {\n ...(source.toolCallId !== undefined && { tool_call_id: source.toolCallId }),\n ...(source.output !== undefined && { output: source.output }),\n };\n}\n\nexport function convertCreateAndRunThreadOptions(\n source: PublicModels.CreateAndRunThreadOptions,\n): GeneratedModels.CreateAndRunThreadOptions {\n return {\n assistant_id: source.assistantId,\n ...(source.thread && { thread: convertAgentThreadCreationOptions(source.thread) }),\n ...(source.model && { model: source.model }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.toolResources && {\n tool_resources: convertUpdateToolResourcesOptions(source.toolResources),\n }),\n ...(source.stream !== undefined && { stream: source.stream }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.maxPromptTokens !== undefined && { max_prompt_tokens: source.maxPromptTokens }),\n ...(source.maxCompletionTokens !== undefined && {\n max_completion_tokens: source.maxCompletionTokens,\n }),\n ...(source.truncationStrategy && {\n truncation_strategy: convertTruncationObject(source.truncationStrategy),\n }),\n ...(source.toolChoice && { tool_choice: source.toolChoice }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertVectorStoreExpirationPolicy(\n source: PublicModels.VectorStoreExpirationPolicy,\n): GeneratedModels.VectorStoreExpirationPolicy {\n return {\n anchor: source.anchor,\n days: source.days,\n };\n}\n\nexport function convertVectorStoreOptions(\n source: PublicModels.VectorStoreOptions,\n): GeneratedModels.VectorStoreOptions {\n return {\n ...(source.fileIds && { file_ids: source.fileIds }),\n ...(source.name && { name: source.name }),\n ...(source.configuration && {\n configuration: convertVectorStoreConfiguration(source.configuration),\n }),\n ...(source.expiresAfter && {\n expires_after: convertVectorStoreExpirationPolicy(source.expiresAfter),\n }),\n ...(source.chunkingStrategy && {\n chunking_strategy: convertVectorStoreChunkingStrategyRequest(source.chunkingStrategy),\n }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nexport function convertVectorStoreChunkingStrategyRequest(\n source: PublicModels.VectorStoreChunkingStrategyRequest,\n): GeneratedModels.VectorStoreChunkingStrategyRequest {\n switch (source.type) {\n case \"auto\":\n return source as GeneratedModels.VectorStoreAutoChunkingStrategyRequest;\n case \"static\":\n return convertVectorStoreStaticChunkingStrategyRequest(\n source as PublicModels.VectorStoreStaticChunkingStrategyRequest,\n );\n default:\n throw new Error(`Unknown chunking strategy type: ${source.type}`);\n }\n}\n\nfunction convertVectorStoreStaticChunkingStrategyRequest(\n source: PublicModels.VectorStoreStaticChunkingStrategyRequest,\n): GeneratedModels.VectorStoreStaticChunkingStrategyRequest {\n return {\n ...source,\n static: convertVectorStoreStaticChunkingStrategyOptions(source.static),\n };\n}\n\nfunction convertVectorStoreStaticChunkingStrategyOptions(\n source: PublicModels.VectorStoreStaticChunkingStrategyOptions,\n): GeneratedModels.VectorStoreStaticChunkingStrategyOptions {\n return {\n max_chunk_size_tokens: source.maxChunkSizeTokens,\n chunk_overlap_tokens: source.chunkOverlapTokens,\n };\n}\n\nexport function convertVectorStoreUpdateOptions(\n source: PublicModels.VectorStoreUpdateOptions,\n): GeneratedModels.VectorStoreUpdateOptions {\n return {\n ...(source.name && { name: source.name }),\n ...(source.expiresAfter && {\n expires_after: convertVectorStoreExpirationPolicy(source.expiresAfter),\n }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertFunctionDefinition(\n source: PublicModels.FunctionDefinition,\n): GeneratedModels.FunctionDefinition {\n return {\n name: source.name,\n ...(source.description && { description: source.description }),\n parameters: source.parameters,\n };\n}\n\nfunction convertToolConnectionList(\n source: PublicModels.ToolConnectionList,\n): GeneratedModels.ToolConnectionList {\n return {\n ...(source.connections && { connections: source.connections.map(convertToolConnection) }),\n };\n}\n\nfunction convertToolConnection(\n source: PublicModels.ToolConnection,\n): GeneratedModels.ToolConnection {\n return {\n connection_id: source.connectionId,\n };\n}\n"]}
|
|
1
|
+
{"version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,SAAS,yBAAyB,CAChC,MAAuC;IAEvC,qCACE,IAAI,EAAE,MAAM,CAAC,IAAI,IACd,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC,KAC9D,UAAU,EAAE,MAAM,CAAC,UAAU,IAC7B;AACJ,CAAC;AAED,SAAS,yBAAyB,CAChC,MAAuC;IAEvC,yBACK,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAAE,CAAC,EACzF;AACJ,CAAC;AAED,SAAS,qBAAqB,CAC5B,MAAmC;IAEnC,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,YAAY;KACnC,CAAC;AACJ,CAAC;AAED,SAAS,8BAA8B,CACrC,MAAwC;IAExC,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,YAAY;QAClC,aAAa,EAAE,MAAM,CAAC,YAAY;KACnC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type * as PublicModels from \"./models.js\";\nimport type * as GeneratedModels from \"../generated/src/models.js\";\n\n// Conversion functions\nexport function convertCreateAgentOptions(\n source: PublicModels.CreateAgentOptions,\n): GeneratedModels.CreateAgentOptions {\n return {\n model: source.model,\n ...(source.name && { name: source.name }),\n ...(source.description && { description: source.description }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertToolResources(source: PublicModels.ToolResources): GeneratedModels.ToolResources {\n return {\n ...(source.codeInterpreter && {\n code_interpreter: convertCodeInterpreterToolResource(source.codeInterpreter),\n }),\n ...(source.fileSearch && { file_search: convertFileSearchToolResource(source.fileSearch) }),\n ...(source.azureAISearch && {\n azure_ai_search: convertAzureAISearchResource(source.azureAISearch),\n }),\n ...(source.azureFunction && {\n name: source.azureFunction.name,\n }),\n };\n}\n\nfunction convertMessageAttachmentToolDefinition(\n source: PublicModels.MessageAttachmentToolDefinition,\n): GeneratedModels.MessageAttachmentToolDefinition {\n switch (source.type) {\n case \"code_interpreter\":\n return convertCodeInterpreterToolDefinition(\n source as PublicModels.CodeInterpreterToolDefinition,\n );\n case \"file_search\":\n return convertFileSearchToolDefinition(source as PublicModels.FileSearchToolDefinition);\n default:\n throw new Error(`Unknown tool type: ${source}`);\n }\n}\n\nfunction convertToolDefinition(\n source: PublicModels.ToolDefinition,\n): GeneratedModels.ToolDefinition {\n switch (source.type) {\n case \"code_interpreter\":\n return convertCodeInterpreterToolDefinition(\n source as PublicModels.CodeInterpreterToolDefinition,\n );\n case \"file_search\":\n return convertFileSearchToolDefinition(source as PublicModels.FileSearchToolDefinition);\n case \"function\":\n return convertFunctionToolDefinition(source as PublicModels.FunctionToolDefinition);\n case \"bing_grounding\":\n return convertBingGroundingToolDefinition(source as PublicModels.BingGroundingToolDefinition);\n case \"bing_custom_search\":\n return convertBingCustomSearchToolDefinition(\n source as PublicModels.BingCustomSearchToolDefinition,\n );\n case \"fabric_dataagent\":\n return convertMicrosoftFabricToolDefinition(\n source as PublicModels.MicrosoftFabricToolDefinition,\n );\n case \"sharepoint_grounding\":\n return convertSharepointToolDefinition(source as PublicModels.SharepointToolDefinition);\n case \"azure_ai_search\":\n return convertAzureAISearchToolDefinition(source as PublicModels.AzureAISearchToolDefinition);\n case \"openapi\":\n return convertOpenApiToolDefinition(source as PublicModels.OpenApiToolDefinition);\n case \"azure_function\":\n return convertAzureFunctionToolDefinition(source as PublicModels.AzureFunctionToolDefinition);\n default:\n throw new Error(`Unknown tool type: ${source.type}`);\n }\n}\n\nfunction convertCodeInterpreterToolDefinition(\n source: PublicModels.CodeInterpreterToolDefinition,\n): GeneratedModels.CodeInterpreterToolDefinition {\n return {\n type: source.type,\n };\n}\n\nfunction convertFileSearchToolDefinition(\n source: PublicModels.FileSearchToolDefinition,\n): GeneratedModels.FileSearchToolDefinition {\n return {\n type: source.type,\n ...(source.fileSearch && {\n file_search: convertFileSearchToolDefinitionDetails(source.fileSearch),\n }),\n };\n}\n\nfunction convertFunctionToolDefinition(\n source: PublicModels.FunctionToolDefinition,\n): GeneratedModels.FunctionToolDefinition {\n return {\n type: source.type,\n function: convertFunctionDefinition(source.function),\n };\n}\n\nfunction convertBingGroundingToolDefinition(\n source: PublicModels.BingGroundingToolDefinition,\n): GeneratedModels.BingGroundingToolDefinition {\n return {\n type: source.type,\n bing_grounding: convertToolConnectionList(source.bingGrounding),\n };\n}\n\nfunction convertBingCustomSearchToolDefinition(\n source: PublicModels.BingCustomSearchToolDefinition,\n): GeneratedModels.BingCustomSearchToolDefinition {\n return {\n type: source.type,\n bing_custom_search: source?.bingCustomSearch?.searchConfigurations\n ? {\n search_configurations: source.bingCustomSearch.searchConfigurations.map(\n convertToolSearchConfiguration,\n ),\n }\n : { search_configurations: [] },\n };\n}\n\nfunction convertMicrosoftFabricToolDefinition(\n source: PublicModels.MicrosoftFabricToolDefinition,\n): GeneratedModels.MicrosoftFabricToolDefinition {\n return {\n type: source.type,\n fabric_dataagent: convertToolConnectionList(source.fabricDataAgent),\n };\n}\n\nfunction convertSharepointToolDefinition(\n source: PublicModels.SharepointToolDefinition,\n): GeneratedModels.SharepointToolDefinition {\n return {\n type: source.type,\n sharepoint_grounding: convertToolConnectionList(source.sharepointGrounding),\n };\n}\n\nfunction convertAzureAISearchToolDefinition(\n source: PublicModels.AzureAISearchToolDefinition,\n): GeneratedModels.AzureAISearchToolDefinition {\n return {\n type: source.type,\n };\n}\n\nfunction convertOpenApiToolDefinition(\n source: PublicModels.OpenApiToolDefinition,\n): GeneratedModels.OpenApiToolDefinition {\n return {\n type: source.type,\n openapi: source.openapi,\n };\n}\n\nfunction convertFileSearchToolDefinitionDetails(\n source: PublicModels.FileSearchToolDefinitionDetails,\n): GeneratedModels.FileSearchToolDefinitionDetails {\n return {\n ...(source.maxNumResults && { max_num_results: source.maxNumResults }),\n ...(source.rankingOptions && {\n ranking_options: convertFileSearchRankingOptions(source.rankingOptions),\n }),\n };\n}\n\nfunction convertFileSearchRankingOptions(\n source: PublicModels.FileSearchRankingOptions,\n): GeneratedModels.FileSearchRankingOptions {\n return {\n ranker: source.ranker,\n score_threshold: source.scoreThreshold,\n };\n}\n\nfunction convertCodeInterpreterToolResource(\n source: PublicModels.CodeInterpreterToolResource,\n): GeneratedModels.CodeInterpreterToolResource {\n return {\n file_ids: source.fileIds,\n ...(source.dataSources && {\n data_sources: source.dataSources.map(convertVectorStoreDataSource),\n }),\n };\n}\n\nexport function convertVectorStoreDataSource(\n source: PublicModels.VectorStoreDataSource,\n): GeneratedModels.VectorStoreDataSource {\n return {\n uri: source.uri,\n type: source.type,\n };\n}\n\nfunction convertFileSearchToolResource(\n source: PublicModels.FileSearchToolResource,\n): GeneratedModels.FileSearchToolResource {\n return {\n ...(source.vectorStoreIds && { vector_store_ids: source.vectorStoreIds }),\n ...(source.vectorStores && {\n vector_stores: source.vectorStores.map(convertVectorStoreConfigurations),\n }),\n };\n}\n\nfunction convertAzureFunctionToolDefinition(\n source: PublicModels.AzureFunctionToolDefinition,\n): GeneratedModels.AzureFunctionToolDefinition {\n return {\n type: source.type,\n azure_function: convertAzureFunctionDefinition(source.azureFunction),\n };\n}\n\nfunction convertAzureFunctionDefinition(\n source: PublicModels.AzureFunctionDefinition,\n): GeneratedModels.AzureFunctionDefinition {\n return {\n function: source.function,\n input_binding: {\n type: source.inputBinding.type,\n storage_queue: {\n queue_service_endpoint: source.inputBinding.storageQueue.queueServiceEndpoint,\n queue_name: source.inputBinding.storageQueue.queueName,\n },\n },\n output_binding: {\n type: source.outputBinding.type,\n storage_queue: {\n queue_service_endpoint: source.outputBinding.storageQueue.queueServiceEndpoint,\n queue_name: source.outputBinding.storageQueue.queueName,\n },\n },\n };\n}\n\nfunction convertVectorStoreConfigurations(\n source: PublicModels.VectorStoreConfigurations,\n): GeneratedModels.VectorStoreConfigurations {\n return {\n name: source.name,\n configuration: convertVectorStoreConfiguration(source.configuration),\n };\n}\n\nfunction convertVectorStoreConfiguration(\n source: PublicModels.VectorStoreConfiguration,\n): GeneratedModels.VectorStoreConfiguration {\n return {\n data_sources: source.dataSources.map(convertVectorStoreDataSource),\n };\n}\n\nfunction convertAzureAISearchResource(\n source: PublicModels.AzureAISearchResource,\n): GeneratedModels.AzureAISearchResource {\n return {\n ...(source.indexes && { indexes: source.indexes.map(convertIndexResource) }),\n };\n}\n\nfunction convertIndexResource(\n source: PublicModels.IndexResource,\n): GeneratedModels.AISearchIndexResource {\n return {\n index_connection_id: source.indexConnectionId,\n index_name: source.indexName,\n query_type: source.queryType,\n top_k: source.topK,\n filter: source.filter,\n };\n}\n\nexport function convertUpdateAgentOptions(\n source: PublicModels.UpdateAgentOptions,\n): GeneratedModels.UpdateAgentOptions {\n return {\n ...(source.model && { model: source.model }),\n ...(source.name && { name: source.name }),\n ...(source.description && { description: source.description }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nexport function convertAgentThreadCreationOptions(\n source: PublicModels.AgentThreadCreationOptions,\n): GeneratedModels.AgentThreadCreationOptions {\n return {\n ...(source.messages && { messages: source.messages.map(convertThreadMessageOptions) }),\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nexport function convertAgentThreadUpdateOptions(\n source: PublicModels.UpdateAgentThreadOptions,\n): GeneratedModels.UpdateAgentThreadOptions {\n return {\n ...(source.toolResources && { tool_resources: convertToolResources(source.toolResources) }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertThreadMessageOptions(\n source: PublicModels.ThreadMessageOptions,\n): GeneratedModels.ThreadMessageOptions {\n return {\n role: source.role,\n content: source.content,\n ...(source.attachments && { attachments: source.attachments.map(convertMessageAttachment) }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertMessageAttachment(\n source: PublicModels.MessageAttachment,\n): GeneratedModels.MessageAttachment {\n return {\n file_id: source.fileId,\n ...(source.dataSource && {\n data_source: convertVectorStoreDataSource(source.dataSource),\n }),\n ...(source.tools && { tools: source.tools.map(convertMessageAttachmentToolDefinition) }),\n };\n}\n\nexport function convertCreateRunOptions(\n source: PublicModels.CreateRunOptions,\n): GeneratedModels.CreateRunOptions {\n return {\n assistant_id: source.assistantId,\n ...(source.model && { model: source.model }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.additionalInstructions && {\n additional_instructions: source.additionalInstructions,\n }),\n ...(source.additionalMessages && {\n additional_messages: source.additionalMessages.map(convertThreadMessageOptions),\n }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.stream !== undefined && { stream: source.stream }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.maxPromptTokens !== undefined && { max_prompt_tokens: source.maxPromptTokens }),\n ...(source.maxCompletionTokens !== undefined && {\n max_completion_tokens: source.maxCompletionTokens,\n }),\n ...(source.truncationStrategy && {\n truncation_strategy: convertTruncationObject(source.truncationStrategy),\n }),\n ...(source.toolChoice && { tool_choice: source.toolChoice }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertTruncationObject(\n source: PublicModels.TruncationObject,\n): GeneratedModels.TruncationObject {\n return {\n type: source.type,\n ...(source.lastMessages !== undefined && { last_messages: source.lastMessages }),\n };\n}\n\nfunction convertUpdateToolResourcesOptions(\n source: PublicModels.UpdateToolResourcesOptions,\n): GeneratedModels.UpdateToolResourcesOptions {\n return {\n ...(source.codeInterpreter && {\n code_interpreter: convertUpdateCodeInterpreterToolResourceOptions(source.codeInterpreter),\n }),\n ...(source.fileSearch && {\n file_search: convertUpdateFileSearchToolResourceOptions(source.fileSearch),\n }),\n ...(source.azureAISearch && {\n azure_ai_search: convertAzureAISearchResource(source.azureAISearch),\n }),\n };\n}\n\nfunction convertUpdateCodeInterpreterToolResourceOptions(\n source: PublicModels.UpdateCodeInterpreterToolResourceOptions,\n): GeneratedModels.UpdateCodeInterpreterToolResourceOptions {\n return {\n ...(source.fileIds && { file_ids: source.fileIds }),\n };\n}\n\nfunction convertUpdateFileSearchToolResourceOptions(\n source: PublicModels.UpdateFileSearchToolResourceOptions,\n): GeneratedModels.UpdateFileSearchToolResourceOptions {\n return {\n ...(source.vectorStoreIds && { vector_store_ids: source.vectorStoreIds }),\n };\n}\n\nexport function convertToolOutput(source: PublicModels.ToolOutput): GeneratedModels.ToolOutput {\n return {\n ...(source.toolCallId !== undefined && { tool_call_id: source.toolCallId }),\n ...(source.output !== undefined && { output: source.output }),\n };\n}\n\nexport function convertCreateAndRunThreadOptions(\n source: PublicModels.CreateAndRunThreadOptions,\n): GeneratedModels.CreateAndRunThreadOptions {\n return {\n assistant_id: source.assistantId,\n ...(source.thread && { thread: convertAgentThreadCreationOptions(source.thread) }),\n ...(source.model && { model: source.model }),\n ...(source.instructions && { instructions: source.instructions }),\n ...(source.tools && { tools: source.tools.map(convertToolDefinition) }),\n ...(source.toolResources && {\n tool_resources: convertUpdateToolResourcesOptions(source.toolResources),\n }),\n ...(source.stream !== undefined && { stream: source.stream }),\n ...(source.temperature !== undefined && { temperature: source.temperature }),\n ...(source.topP !== undefined && { top_p: source.topP }),\n ...(source.maxPromptTokens !== undefined && { max_prompt_tokens: source.maxPromptTokens }),\n ...(source.maxCompletionTokens !== undefined && {\n max_completion_tokens: source.maxCompletionTokens,\n }),\n ...(source.truncationStrategy && {\n truncation_strategy: convertTruncationObject(source.truncationStrategy),\n }),\n ...(source.toolChoice && { tool_choice: source.toolChoice }),\n ...(source.responseFormat && { response_format: source.responseFormat }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertVectorStoreExpirationPolicy(\n source: PublicModels.VectorStoreExpirationPolicy,\n): GeneratedModels.VectorStoreExpirationPolicy {\n return {\n anchor: source.anchor,\n days: source.days,\n };\n}\n\nexport function convertVectorStoreOptions(\n source: PublicModels.VectorStoreOptions,\n): GeneratedModels.VectorStoreOptions {\n return {\n ...(source.fileIds && { file_ids: source.fileIds }),\n ...(source.name && { name: source.name }),\n ...(source.configuration && {\n configuration: convertVectorStoreConfiguration(source.configuration),\n }),\n ...(source.expiresAfter && {\n expires_after: convertVectorStoreExpirationPolicy(source.expiresAfter),\n }),\n ...(source.chunkingStrategy && {\n chunking_strategy: convertVectorStoreChunkingStrategyRequest(source.chunkingStrategy),\n }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nexport function convertVectorStoreChunkingStrategyRequest(\n source: PublicModels.VectorStoreChunkingStrategyRequest,\n): GeneratedModels.VectorStoreChunkingStrategyRequest {\n switch (source.type) {\n case \"auto\":\n return source as GeneratedModels.VectorStoreAutoChunkingStrategyRequest;\n case \"static\":\n return convertVectorStoreStaticChunkingStrategyRequest(\n source as PublicModels.VectorStoreStaticChunkingStrategyRequest,\n );\n default:\n throw new Error(`Unknown chunking strategy type: ${source.type}`);\n }\n}\n\nfunction convertVectorStoreStaticChunkingStrategyRequest(\n source: PublicModels.VectorStoreStaticChunkingStrategyRequest,\n): GeneratedModels.VectorStoreStaticChunkingStrategyRequest {\n return {\n ...source,\n static: convertVectorStoreStaticChunkingStrategyOptions(source.static),\n };\n}\n\nfunction convertVectorStoreStaticChunkingStrategyOptions(\n source: PublicModels.VectorStoreStaticChunkingStrategyOptions,\n): GeneratedModels.VectorStoreStaticChunkingStrategyOptions {\n return {\n max_chunk_size_tokens: source.maxChunkSizeTokens,\n chunk_overlap_tokens: source.chunkOverlapTokens,\n };\n}\n\nexport function convertVectorStoreUpdateOptions(\n source: PublicModels.VectorStoreUpdateOptions,\n): GeneratedModels.VectorStoreUpdateOptions {\n return {\n ...(source.name && { name: source.name }),\n ...(source.expiresAfter && {\n expires_after: convertVectorStoreExpirationPolicy(source.expiresAfter),\n }),\n ...(source.metadata && { metadata: source.metadata }),\n };\n}\n\nfunction convertFunctionDefinition(\n source: PublicModels.FunctionDefinition,\n): GeneratedModels.FunctionDefinition {\n return {\n name: source.name,\n ...(source.description && { description: source.description }),\n parameters: source.parameters,\n };\n}\n\nfunction convertToolConnectionList(\n source: PublicModels.ToolConnectionList,\n): GeneratedModels.ToolConnectionList {\n return {\n ...(source.connections && { connections: source.connections.map(convertToolConnection) }),\n };\n}\n\nfunction convertToolConnection(\n source: PublicModels.ToolConnection,\n): GeneratedModels.ToolConnection {\n return {\n connection_id: source.connectionId,\n };\n}\n\nfunction convertToolSearchConfiguration(\n source: PublicModels.SearchConfiguration,\n): GeneratedModels.SearchConfiguration {\n return {\n connection_id: source.connectionId,\n instance_name: source.instanceName,\n };\n}\n"]}
|
|
@@ -13,6 +13,7 @@ export declare function convertOpenAIPageableListOfThreadRunOutput(input: Genera
|
|
|
13
13
|
export declare function convertRunStepOutput(input: GeneratedModels.RunStepOutput): PublicModels.RunStepOutput;
|
|
14
14
|
export declare function convertOpenAIPageableListOfRunStepOutput(input: GeneratedModels.OpenAIPageableListOfRunStepOutput): PublicModels.OpenAIPageableListOfRunStepOutput;
|
|
15
15
|
export declare function convertOpenAIPageableListOfThreadMessageOutput(input: GeneratedModels.OpenAIPageableListOfThreadMessageOutput): PublicModels.OpenAIPageableListOfThreadMessageOutput;
|
|
16
|
+
export declare function convertOpenAIPageableListOfAgentThreadOutput(input: GeneratedModels.OpenAIPageableListOfAgentThreadOutput): PublicModels.OpenAIPageableListOfAgentThreadOutput;
|
|
16
17
|
export declare function convertOpenAIPageableListOfVectorStoreOutput(input: GeneratedModels.OpenAIPageableListOfVectorStoreOutput): PublicModels.OpenAIPageableListOfVectorStoreOutput;
|
|
17
18
|
export declare function convertVectorStoreOutput(input: GeneratedModels.VectorStoreOutput): PublicModels.VectorStoreOutput;
|
|
18
19
|
export declare function convertVectorStoreDeletionStatusOutput(input: GeneratedModels.VectorStoreDeletionStatusOutput): PublicModels.VectorStoreDeletionStatusOutput;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertOutputModelsFromWire.d.ts","sourceRoot":"","sources":["../../../src/customization/convertOutputModelsFromWire.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,eAAe,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,KAAK,YAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,KAAK,mBAAmB,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,KAAK,qBAAqB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"convertOutputModelsFromWire.d.ts","sourceRoot":"","sources":["../../../src/customization/convertOutputModelsFromWire.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,eAAe,MAAM,kCAAkC,CAAC;AACzE,OAAO,KAAK,KAAK,YAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,KAAK,mBAAmB,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,KAAK,qBAAqB,MAAM,sBAAsB,CAAC;AAoOnE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,CAAC,WAAW,GAAG,YAAY,CAAC,WAAW,CAkB/F;AAiED,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,eAAe,CAAC,+BAA+B,GACrD,YAAY,CAAC,+BAA+B,CAQ9C;AAED,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,eAAe,CAAC,yBAAyB,GAC/C,YAAY,CAAC,yBAAyB,CA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,CASzC;AAED,wBAAgB,gDAAgD,CAC9D,KAAK,EAAE,eAAe,CAAC,yCAAyC,GAC/D,YAAY,CAAC,yCAAyC,CAQxD;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,eAAe,CAAC,qBAAqB,GAC3C,YAAY,CAAC,qBAAqB,CAapC;AAkCD,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,eAAe,CAAC,mCAAmC,GACzD,YAAY,CAAC,mCAAmC,CAMlD;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,eAAe,CAAC,gBAAgB,GACtC,YAAY,CAAC,gBAAgB,CAW/B;AAED,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,eAAe,CAAC,sBAAsB,GAC5C,YAAY,CAAC,sBAAsB,CAKrC;AAWD,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,mBAAmB,CAAC,iBAAiB,GAC3C,qBAAqB,CAAC,iBAAiB,CAMzC;AAwHD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,mBAAmB,CAAC,iBAAiB,GAC3C,qBAAqB,CAAC,iBAAiB,CAMzC"}
|
|
@@ -13,6 +13,7 @@ exports.convertOpenAIPageableListOfThreadRunOutput = convertOpenAIPageableListOf
|
|
|
13
13
|
exports.convertRunStepOutput = convertRunStepOutput;
|
|
14
14
|
exports.convertOpenAIPageableListOfRunStepOutput = convertOpenAIPageableListOfRunStepOutput;
|
|
15
15
|
exports.convertOpenAIPageableListOfThreadMessageOutput = convertOpenAIPageableListOfThreadMessageOutput;
|
|
16
|
+
exports.convertOpenAIPageableListOfAgentThreadOutput = convertOpenAIPageableListOfAgentThreadOutput;
|
|
16
17
|
exports.convertOpenAIPageableListOfVectorStoreOutput = convertOpenAIPageableListOfVectorStoreOutput;
|
|
17
18
|
exports.convertVectorStoreOutput = convertVectorStoreOutput;
|
|
18
19
|
exports.convertVectorStoreDeletionStatusOutput = convertVectorStoreDeletionStatusOutput;
|
|
@@ -78,6 +79,23 @@ function convertBingGroundingToolDefinitionOutput(input) {
|
|
|
78
79
|
bingGrounding: input.bing_grounding && convertToolConnectionListOutput(input.bing_grounding),
|
|
79
80
|
};
|
|
80
81
|
}
|
|
82
|
+
function convertBingCustomSearchToolDefinitionOutput(input) {
|
|
83
|
+
return {
|
|
84
|
+
type: "bing_custom_search",
|
|
85
|
+
bingCustomSearch: input.bing_custom_search
|
|
86
|
+
? convertToolSearchConfigurationListOutput(input.bing_custom_search)
|
|
87
|
+
: undefined,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function convertToolSearchConfigurationListOutput(input) {
|
|
91
|
+
var _a;
|
|
92
|
+
return {
|
|
93
|
+
searchConfigurations: (_a = input.search_configurations) === null || _a === void 0 ? void 0 : _a.map((item) => ({
|
|
94
|
+
connectionId: item.connection_id,
|
|
95
|
+
instanceName: item.instance_name,
|
|
96
|
+
})),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
81
99
|
function convertToolConnectionListOutput(input) {
|
|
82
100
|
var _a;
|
|
83
101
|
return {
|
|
@@ -89,8 +107,8 @@ function convertToolConnectionOutput(input) {
|
|
|
89
107
|
}
|
|
90
108
|
function convertMicrosoftFabricToolDefinitionOutput(input) {
|
|
91
109
|
return {
|
|
92
|
-
type: "
|
|
93
|
-
|
|
110
|
+
type: "fabric_dataagent",
|
|
111
|
+
fabricDataAgent: input.fabric_dataagent && convertToolConnectionListOutput(input.fabric_dataagent),
|
|
94
112
|
};
|
|
95
113
|
}
|
|
96
114
|
function convertSharepointToolDefinitionOutput(input) {
|
|
@@ -181,7 +199,9 @@ function convertToolDefinitionOutput(tool) {
|
|
|
181
199
|
return convertFunctionToolDefinitionOutput(tool);
|
|
182
200
|
case "bing_grounding":
|
|
183
201
|
return convertBingGroundingToolDefinitionOutput(tool);
|
|
184
|
-
case "
|
|
202
|
+
case "bing_custom_search":
|
|
203
|
+
return convertBingCustomSearchToolDefinitionOutput(tool);
|
|
204
|
+
case "fabric_dataagent":
|
|
185
205
|
return convertMicrosoftFabricToolDefinitionOutput(tool);
|
|
186
206
|
case "sharepoint_grounding":
|
|
187
207
|
return convertSharepointToolDefinitionOutput(tool);
|
|
@@ -425,7 +445,7 @@ function convertRunStepDetailsOutput(input) {
|
|
|
425
445
|
switch (input.type) {
|
|
426
446
|
case "message_creation":
|
|
427
447
|
return convertRunStepMessageCreationDetailsOutput(input);
|
|
428
|
-
case "
|
|
448
|
+
case "tool_calls":
|
|
429
449
|
return convertRunStepToolCallDetailsOutput(input);
|
|
430
450
|
default: {
|
|
431
451
|
throw new Error(`Unknown run step type: ${input.type}`);
|
|
@@ -461,7 +481,7 @@ function convertRunStepToolCallOutput(input) {
|
|
|
461
481
|
return convertRunStepAzureAISearchToolCallOutput(input);
|
|
462
482
|
case "sharepoint_grounding":
|
|
463
483
|
return convertRunStepSharepointToolCallOutput(input);
|
|
464
|
-
case "
|
|
484
|
+
case "fabric_dataagent":
|
|
465
485
|
return convertRunStepMicrosoftFabricToolCallOutput(input);
|
|
466
486
|
case "function":
|
|
467
487
|
return convertRunStepFunctionToolCallOutput(input);
|
|
@@ -525,7 +545,7 @@ function convertRunStepMicrosoftFabricToolCallOutput(input) {
|
|
|
525
545
|
return {
|
|
526
546
|
type: input.type,
|
|
527
547
|
id: input.id,
|
|
528
|
-
|
|
548
|
+
fabricDataAgent: input.fabric_dataagent,
|
|
529
549
|
};
|
|
530
550
|
}
|
|
531
551
|
function convertRunStepFunctionToolCallOutput(input) {
|
|
@@ -608,6 +628,16 @@ function convertOpenAIPageableListOfThreadMessageOutput(input) {
|
|
|
608
628
|
data: (_a = input.data) === null || _a === void 0 ? void 0 : _a.map(convertThreadMessageOutput),
|
|
609
629
|
};
|
|
610
630
|
}
|
|
631
|
+
function convertOpenAIPageableListOfAgentThreadOutput(input) {
|
|
632
|
+
var _a;
|
|
633
|
+
return {
|
|
634
|
+
object: input.object,
|
|
635
|
+
firstId: input.first_id,
|
|
636
|
+
lastId: input.last_id,
|
|
637
|
+
hasMore: input.has_more,
|
|
638
|
+
data: (_a = input.data) === null || _a === void 0 ? void 0 : _a.map(convertAgentThreadOutput),
|
|
639
|
+
};
|
|
640
|
+
}
|
|
611
641
|
function convertOpenAIPageableListOfVectorStoreOutput(input) {
|
|
612
642
|
return {
|
|
613
643
|
object: input.object,
|
|
@@ -846,7 +876,7 @@ function convertRunStepDetailsDelta(input) {
|
|
|
846
876
|
switch (input.type) {
|
|
847
877
|
case "message_creation":
|
|
848
878
|
return convertRunStepMessageCreationDetailsDelta(input);
|
|
849
|
-
case "
|
|
879
|
+
case "tool_calls":
|
|
850
880
|
return convertRunStepToolCallDetailsDelta(input);
|
|
851
881
|
default:
|
|
852
882
|
logger_js_1.logger.error(`Unknown run step type: ${input.type}`);
|