Use threads to maintain context in interactive conversations:
Copy
Ask AI
import marvinwith marvin.Thread() as thread: # Get user preferences preferences = marvin.run( "Ask about the user's movie preferences", cli=True ) # Make a recommendation recommendation = marvin.run( "Recommend a movie based on their preferences" ) # Ask for feedback feedback = marvin.run( "Ask if they'd like another recommendation", cli=True )