Generate code from previous response

Hi all,

I’m providing information in prompts to generate python code, but I would like the chat to remember the code in previous responses in order to generate next response. I already did the “LangChain Chat with Your Data” course but trying this with code seems to be not working properly. Does anyone know which is the proper way to do this? Is there any course I can do that would help?

Thank you!

I think they teach this in Prompt Engineering short course. I am not sure though…

I’ve seen examples with plain text there but this does not work with code responses, do you know if there is any course working with conversationBufferMemory and code?

I am sorry, I don’t know.