ChatBot.create_chat_session()

Create a chat session backed by the configured LLM provider.

Usage

Source

ChatBot.create_chat_session()

When chatlas is installed this returns a fully configured chatlas.Chat instance ready for interactive use. If chatlas is unavailable a lightweight SimpleChatSession fallback is returned instead.

Returns

chatlas.Chat | SimpleChatSession
A chat session object. The concrete type depends on whether the chatlas package is installed.

Examples

import talk_box as tb

bot = tb.ChatBot().model("gpt-4")
session = bot.create_chat_session()