Once you have indexed your document in Azure Search, you can use it as source for your ChatGPT prompt. Call is quite similar but instead of giving the data in REST API call, you give the index.
Below is the Power Automate structure where the OpenAI is called.
Version for the REST API is Preview.
URI: [].openai.azure.com/openai/deployments/[]/extensions/chat/completions?api-version=2023-08-01-preview
As mentioned in earlier post, I will use the GUID (RowID) for the index name which is given in the call. Remember to give OpenAI service permission with role Cognitive Services Contributor to use the Search Service. Key is just authenticating for it in the HTTP call.
Instructions Azure OpenAI Service REST API reference (Completions Extensions)