Thanks for posting your question in the Microsoft Q&A forum.
To maintain historical context in repeat API calls with Azure OpenAI REST API, you can include a summary of previous interactions as context in your subsequent API calls. Unfortunately, OpenAI’s GPT-3 API does not currently support sessions or maintaining state between API calls. However, you can manually concatenate all the previous outputs and use them as the “prompt” in your next API call.
If the above response help answer your question, please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution. Thanks 😊