You can pass the filter expression as a parameter in the "parameters" object of the "AzureCognitiveSearch" data source in your OpenAI GPT API call. Specifically, you can add a "filter" parameter to the "parameters" object with the filter expression you want to use.
Here's an example of how you can modify your API call to include the filter expression:
{
"messages": [
{
"role": "user",
"content": "Can you list the technologies used during project ABC"
}
],
"dataSources": [
{
"type": "AzureCognitiveSearch",
"parameters": {
"endpoint": "'$SearchEndpoint'",
"key": "'$SearchKey'",
"indexName": "'$SearchIndex'",
"filter": "projectName eq 'ABC'"
}
}
]
}
By adding the "filter" parameter with the expression "projectName eq 'ABC'", you are telling the Azure Cognitive Search data source to only return documents that have a "projectName" field equal to "ABC".
You may refer to examples mentioned here- https://learn.microsoft.com/en-us/azure/search/search-query-odata-filter#examples
I hope this helps!
Let me know if you have any further questions.