liveBook · Manning

Dialogue

As explained in Build Applications with Local AI Models on a Mac

The example chatbot's ordered exchange of messages between a user and an AI assistant.

A dialogue is an ordered exchange of user and assistant messages. In a chatbot, sending the full conversation history with each turn lets the model use earlier details, such as a name the user shared. section 7.4.3

Chat with AI! (type 'quit' to exit)
----------------------------------------

You: Hi! My name is Alex.

AI: Hello, Alex! It's nice to meet you. How can I help you today?

You: What's my name?

AI: Your name is Alex! You just told me. Is there anything you'd like
to chat about?

You: Can you suggest a good book for a beginner programmer?

AI: Absolutely, Alex! I'd recommend "Automate the Boring Stuff with
Python" by Al Sweigart. It's free to read online, written for complete
beginners, and teaches Python through practical, real-world projects
like renaming files, web scraping, and automating spreadsheets.

You: quit

Goodbye!

See a sample chat where the assistant recalls a name and answers a follow-up question. section 7.4.3

How Build Applications with Local AI Models on a Mac covers it

How deep it goes
Explains that the script sends full history and runs in a loop, without detailing history storage or message construction.
Examples
Uses a chatbot exchange where the assistant recalls a name and recommends a beginner programming book.
What it assumes
Assumes Ollama is installed and running before starting an interactive conversation with a local LLM.
What you can do after
Operate a looping chatbot and end the conversation by typing quit, exit, or bye.
How it connects
Connects dialogue to local large language models and the Ollama Python library.

Also explained in

Compare how 10 books explain dialogue →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Applications with Local AI Models on a Mac. The section links point to the parts of the book it draws on.