Using an Azure AI Search data source with Azure OpenAI can cause an error whenever a citation is passed through if there is not title on the citation. This can happen if the AI Search index doesn't have a title field. i.e. using an existing index and not the Studio to create one.
This results in the name property of the citation in the activity message to be null which causes the error. To workaround this, I can override the PredicatedSayCommand and re-implement the citation logic with a small change to avoid null:
Reproduction Steps
1. Create an AI Search index using a file container (and by default it will only create a Content field, no Title).
2. Connect this in your config.json
3. Ask the bot a question that would generate a citation
Language
Javascript/Typescript
Version
latest
Description
Using an Azure AI Search data source with Azure OpenAI can cause an error whenever a citation is passed through if there is not title on the citation. This can happen if the AI Search index doesn't have a title field. i.e. using an existing index and not the Studio to create one.
This results in the
name
property of the citation in the activity message to benull
which causes the error. To workaround this, I can override thePredicatedSayCommand
and re-implement the citation logic with a small change to avoidnull
:Reproduction Steps