Great question — answering as the UphillTech team:
[I'm] not sure if internally the model is keeping memory of prior prompts and their results: is the last prompt independent, or biased from prior "chats" ? Generally, a large language model itself will not maintain any sort of contextual state of an individual conversation. That state management is usually handled by the implementing application; in this case, your Python script. Should you choose to do so, you can maintain state by appending messages from both the user and the "assistant" to the messages parameter of the chat() method you're invoking, extremely similarly to how OpenAI's standard works for these types of LLM-driven APIs. Models can be "biased from [your] prior 'chats'" in...
Full answer by esqew: https://stackoverflow.stackexchange.com/a/79904074 (CC BY-SA 4.0).
Need it done for your business? UphillTech.