Skip to content

Commit

Permalink
Merge pull request #2031 from solliancenet/cp-add-indexing-api-endpoi…
Browse files Browse the repository at this point in the history
…nt-to-objects

Adds the Tools indexing profile api endpoint configuration to exploded objects
  • Loading branch information
ciprianjichici authored Dec 4, 2024
2 parents ab82c52 + 71c79c1 commit 518e086
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/dotnet/Orchestration/Orchestration/OrchestrationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,20 @@ await cosmosDBService.PatchOperationsItemPropertiesAsync<LongRunningOperationCon
indexingProfileObjectId,
currentUserIdentity);

explodedObjects[indexingProfileObjectId] = indexingProfile;
explodedObjects[indexingProfileObjectId] = indexingProfile;

// Provide the indexing profile API endpoint configuration.
if (indexingProfile.Settings == null)
throw new OrchestrationException($"Tool: {tool.Name}: The settings for the indexing profile {indexingProfile.Name} were not found. Must include \"{VectorizationSettingsNames.IndexingProfileApiEndpointConfigurationObjectId}\" setting.");

if (indexingProfile.Settings.TryGetValue(VectorizationSettingsNames.IndexingProfileApiEndpointConfigurationObjectId, out var apiEndpointConfigurationObjectId) == false)
throw new OrchestrationException($"Tool: {tool.Name}: The API endpoint configuration object ID was not found in the settings of the indexing profile.");

var indexingProfileAPIEndpointConfiguration = await configurationResourceProvider.GetResourceAsync<APIEndpointConfiguration>(
apiEndpointConfigurationObjectId,
currentUserIdentity);

explodedObjects[apiEndpointConfigurationObjectId] = indexingProfileAPIEndpointConfiguration;
}
}

Expand Down

0 comments on commit 518e086

Please sign in to comment.