The Azure OpenAI Chat with History process is called by an HTTP request. It maintains chat history in a file and uses it as context for the last user question and LLM answer.
The process is called by an HTTP request using the following input parameters configured on the Input Fields tab of the Start Step:
•User_Prompt
•Path_To_File_With_History
•User_ID
The User_ID is used as the file name.
After configuring the prompt instructions, the process reads the file. If no file exists or the file is empty, the process prepares a request without history, and then creates or updates the file. It writes the last question and its LLM response in the following format:
Question_to_LLM: user question Answer_LLM: Azure OpenAI answer
If the file contains history, the process uses only the last question and response. The process then updates the file and appends the new question and answer. You can include additional parsing in a specific location and also include new changes to the request.