ChatBot.start_conversation()

Start a new conversation with this chatbot.

Usage

Source

ChatBot.start_conversation()

Creates a fresh conversation instance that can be used for multi-turn interactions with the chatbot. This is useful when you want to explicitly manage conversation state and context.

Returns

Conversation
A new, empty conversation instance ready for interaction.

Examples

Starting a managed conversation

import talk_box as tb

# Configure chatbot
bot = tb.ChatBot().model("gpt-4").temperature(0.7).preset("helpful")

# Start a new conversation
conversation = bot.start_conversation()

# Add messages manually or use chat method
conversation.add_user_message("Hello!")
updated_conversation = bot.chat("How are you?", conversation=conversation)