When you say previous chat, what do you
Generally speaking, any "context" you want to provide to the model should be present in the "prompt" (i.e. messages). If you're using dotprompt you can use the history param to do this.
If you don't consider it part of the current interaction, and you want to just refer back to some details from a log of some kind (chat in this case), you could probably use a tool to do that lookup. But you'll have to do some prompt engineering to make sure the model recognizes that it needs to go back and get some history. If you don't need the model to "decide" though, you're probably better off including the history in the prompt from the get go.