# --- START OF FILE abot_channel_bot.py --- # Bot profile for the private 'abot-channel' used for testing. # Contains configuration variables and a list of enabled tool *names*. # No longer contains tool imports or the call_tool function. import logging # import json # No longer needed here # from typing import Dict, Any # No longer needed here # --- Configuration constants for the Abot Channel Test Bot profile --- # Define the primary instructions for the LLM. # Focused on testing functionality. SYSTEM_PROMPT = """ You are Abot (<@U08B3QR3C30>) running in TEST MODE within the 'abot-channel' channel (channel id = C08B9A6RPN1). Keep responses extremely concise (1-2 sentences maximum). If you decide to use a tool, state very clearly which tool you are about to use and exactly what inputs you are providing *before* generating the tool_use call. Let the user know you are thinking about using a tool if you are. Your primary goal is to help the user test your functionality, including tool use and prompt understanding. Acknowledge test instructions. """ # Controls whether this bot profile queries Pinecone RAG for context. ENABLE_RAG_QUERY: bool = True # Default to True for existing profiles, adjust as needed # Controls whether messages *from* the channel(s) associated with this profile are inserted into Pinecone. ENABLE_RAG_INSERT: bool = False # Default to True for existing profiles, adjust as needed # Choose the Anthropic model to use. Haiku is good for testing. MODEL = "claude-3-5-haiku-20241022" # Set the maximum number of tokens the LLM can generate in a single response. # Lowered slightly for concise test responses. MAX_TOKENS = 512 # Configure context lengths included in the prompt: SLACK_HISTORY_LENGTH = 3 # Recent Slack messages from channel log. SLACK_RAG_HISTORY_LENGTH = 3 # Relevant historical messages via RAG. MAX_HISTORY_LENGTH = 6 # LLM's conversational memory turns for this interaction. # A unique identifier string used in logging messages from this bot profile. BOT_IDENTIFIER = "abot-channel" # --- Enabled Tools --- # List the *names* (strings) of the tools this bot profile is allowed to use. # These names must correspond to keys in the GLOBAL_TOOL_REGISTRY defined in abot.py. ENABLED_TOOL_NAMES = [ "get_weather", "web_search", "get_user_info", "generate_mikrotik_CPE_script", ] # --- Tool Definitions and Dispatcher (REMOVED) --- # Tool imports are now handled centrally in abot.py for the GLOBAL_TOOL_REGISTRY # (Imports removed from here) # Define the tools available to this Bot profile (Anthropic format) # Build the list by referencing the imported TOOL_DEFINITION constants # TOOLS = [ # REMOVED - Constructed dynamically in message_processor.py # weather_tool.TOOL_DEFINITION, # user_lookup_tool.TOOL_DEFINITION, # mtscripter.TOOL_DEFINITION, # ] # Tool dispatcher function for this bot profile # def call_tool(tool_name: str, tool_args: Dict[str, Any]) -> Dict[str, Any]: # REMOVED - Handled centrally # """ # Dispatch tool calls to the appropriate function for the Abot Channel Test Bot. # (REMOVED - Logic is now centralized in claude_functions.py using GLOBAL_TOOL_REGISTRY) # """ # # (Function body removed) # --- END OF FILE abot_channel_bot.py ---