ChatBot.continue_conversation()

Continue an existing conversation with a new message.

Usage

Source

ChatBot.continue_conversation(
    conversation,
    message,
)

This is a convenience method that’s equivalent to calling chat(message, conversation=conversation) but makes the intent of continuing a conversation more explicit.

Parameters

conversation: Conversation

The existing conversation to continue.

message: str
The user’s message to add to the conversation.

Returns

Conversation
The updated conversation with the new exchange.

Examples

# Start conversation
conversation = bot.start_conversation()

# Continue it explicitly
conversation = bot.continue_conversation(conversation, "What's the weather like?")
conversation = bot.continue_conversation(conversation, "What about tomorrow?")