Function reference

Getting Started

Core classes and basic chatbot setup

ChatBot
Main entry point for building and managing conversational AI chatbots with integrated
ChatBot.model()
Configure the language model to use for generating responses.
ChatBot.preset()
Apply a pre-configured behavior template to instantly specialize the chatbot.
ChatBot.temperature()
Control the randomness and creativity level of chatbot responses.
ChatBot.max_tokens()
Set the maximum number of tokens for chatbot responses.
ChatBot.tools()
Configure tools for this chatbot with unified API for custom and built-in tools.
ChatBot.persona()
Set the persona for the chatbot.
ChatBot.avoid()
Set topics or behaviors to avoid.
ChatBot.verbose()
Enable or disable verbose output.

Prompt Engineering

Advanced prompt building and conversation pathways

PromptBuilder
Builds structured prompts using attention mechanisms and cognitive principles.
PromptBuilder.persona()
Set a behavioral persona to anchor the model’s response style and establish expertise
PromptBuilder.task_context()
Define the primary task context that establishes what needs to be accomplished.
PromptBuilder.focus_on()
Set the primary focus that leverages both front-loading and recency bias for maximum
PromptBuilder.critical_constraint()
Add a critical constraint that will be front-loaded for maximum attention and impact.
PromptBuilder.core_analysis()
Define core analysis requirements as a high-priority, required structured section.
PromptBuilder.structured_section()
Add a structured section with clear hierarchical boundaries and visual organization.
PromptBuilder.constraint()
Add a standard constraint to the prompt that will appear in the additional constraints
PromptBuilder.avoid_topics()
Specify topics or behaviors to avoid through negative constraints that guide AI responses
PromptBuilder.output_format()
Specify output formatting requirements to prevent ambiguous responses and ensure structured
PromptBuilder.example()
Add an input/output example for few-shot learning and response format demonstration.
PromptBuilder.final_emphasis()
Set final emphasis that leverages recency bias to ensure critical instructions receive
PromptBuilder.vocabulary()
Add domain-specific vocabulary definitions to ensure consistent understanding of
PromptBuilder.pathways()
Add conversational pathway guidance to structure and guide conversation flow.
VocabularyTerm
Define domain-specific terminology with multilingual support for consistent AI understanding.
Pathways
Chainable builder for defining structured conversational pathways.
Pathways.state()
Define a state with natural language description as the primary identifier.
Pathways.required()
Specify required information for the current state to be considered complete.
Pathways.optional()
Specify optional information that would be helpful but not required.
Pathways.tools()
Specify tools available for use in the current state.
Pathways.success_condition()
Define what indicates successful completion of the current state.
Pathways.next_state()
Define direct transition to the next state.
Pathways.branch_on()
Define conditional branch to another state based on specific conditions.
Pathways.fallback()
Define fallback transition when normal state progression fails.
ChatBot.prompt_builder()
Create an attention-optimized prompt builder for declarative prompt composition.
ChatBot.structured_prompt()
Configure the chatbot with a structured prompt built from keyword sections.
ChatBot.chain_prompts()
Chain multiple structured prompts in attention-optimized order.
architectural_analysis_prompt()
Create a pre-configured prompt builder for architectural analysis tasks.
code_review_prompt()
Create a pre-configured prompt builder for code review tasks.
debugging_prompt()
Create a pre-configured prompt builder for debugging tasks.

Conversations & Messages

Managing conversations, messages, and context

Conversation
Manages sequences of messages in conversational AI interactions, primarily returned by ChatBot methods.
Conversation.add_message()
Add a new message to the conversation.
Conversation.add_user_message()
Add a user message to the conversation.
Conversation.add_assistant_message()
Add an assistant message to the conversation.
Conversation.add_system_message()
Add a system message to the conversation.
Conversation.clear_messages()
Clear all messages from the conversation.
Conversation.get_messages()
Get all messages, optionally filtered by role.
Conversation.get_last_message()
Get the last message, optionally filtered by role.
Conversation.get_message_count()
Get the total number of messages.
Conversation.get_context_messages()
Get messages within the context window.
Conversation.set_context_window()
Set the maximum context window length.
Conversation.to_dict()
Convert conversation to dictionary format.
Conversation.from_dict()
Create a conversation from dictionary data.
Message
Represents a single message in a conversational AI interaction, discovered through Conversation objects.
Message.to_dict()
Convert message to dictionary format.
Message.from_dict()
Create a message from dictionary data.

File Attachments

Attaching and processing files in conversations

Attachments
File attachment handler for Talk Box conversations.
Attachments.with_prompt()
Add a text prompt to accompany the file attachments.
Attachments.get_metadata()
Get metadata for all processed attachments.
Attachments.summary()
Get a human-readable summary of attached files.
AttachmentMetadata
Metadata for individual file attachments.

Presets & Templates

Behavior templates and preset management

Preset
Defines reusable behavior templates for chatbot personality and capabilities.
PresetManager
Centralized manager for loading, storing, and applying chatbot behavior presets.

Testing & Validation

Tools for testing chatbot behavior and compliance

autotest_avoid_topics()
Comprehensive avoid topics testing with automated violation detection.
TestResults
Enhanced test results container with rich reporting and analysis capabilities.

Supporting Types

Internal types and enums for advanced usage

Priority
Priority levels for prompt components based on attention positioning.
PromptSection
Represents a structured section of an attention-optimized prompt with priority and ordering
BuilderTypes
Predefined builder types for autocomplete and type safety when using prompt builders.