How to pass custom fields from AI Search index to OpenAI chat completions citation object?
When calling the chat completion through the python SDK:
completion = await client.chat.completions.create(...)
I use an Azure AI Search index as a data source. The fields mapping available strictly cover only this set:
https://learn.microsoft.com/en-us/azure/ai-services/openai/references/azure-search?tabs=python#fields-mapping-options
However, I want the ability to retrieve custom fields without having to assign them to a FieldMappingOptions value. I have the "filepath" option mapped to the chunk filepath in blob storage. I also have a "source_filepath" which maps the source document filepath in blob storage. So ideally I would be able to add the following custom field mapping:
"source_filepath": "source_filepath"
And then I can use that from the response by the Azure OpenAI service in the citation object.