feat: add Azure AI Search integration for OpenAI models #6284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements Azure AI Search integration for OpenAI models from Azure Foundry, allowing users to leverage internal documentation and knowledge bases that AI models are not trained on.
Summary
This feature adds the ability to use Azure AI Search as a data source when using OpenAI models through Azure Foundry. When enabled, it adds a
data_sourcesfield to the API request that allows the model to reference and use documents from the configured search index.Changes
data_sourcesfield when Azure AI Search is enabledTesting
Screenshots
The UI now includes an "Enable Azure AI Search" checkbox in the OpenAI Compatible settings. When enabled, users can configure:
Notes
Fixes #6282
Important
Adds Azure AI Search integration to OpenAI models, enabling internal document usage via
data_sourcesfield with comprehensive configuration and testing.data_sourcesfield.openAiSchemainprovider-settings.ts.OpenAICompatiblecomponent with Azure AI Search options.OpenAiHandlerinopenai.tsto includedata_sourceswhen Azure AI Search is enabled.buildAzureAiSearchDataSources()to construct data source configuration.openai.spec.tsto verify Azure AI Search functionality, including cases with/without embedding configuration and different query types.OpenAICompatible.tsxto include Azure AI Search settings.settings.json.This description was created by
for 8540bb9. You can customize this summary. It will automatically update as commits are pushed.