Skip to main content
This guide builds a working command-line chatbot that remembers the conversation, in about 30 lines.
1

Install the SDK

2

Write the loop

3

Run it

Type to chat; type quit to exit. Switch model to try Claude, Gemini or any other model.