aa
This commit is contained in:
parent
2673729888
commit
de65098521
@ -567,7 +567,7 @@ async def background_processing_task(cog: 'GurtCog'):
|
|||||||
"should_follow_up": {"type": "boolean", "description": "Whether Gurt should perform a follow-up action based on the previous action's result."},
|
"should_follow_up": {"type": "boolean", "description": "Whether Gurt should perform a follow-up action based on the previous action's result."},
|
||||||
"reasoning": {"type": "string", "description": "Brief reasoning for the follow-up decision."},
|
"reasoning": {"type": "string", "description": "Brief reasoning for the follow-up decision."},
|
||||||
"follow_up_tool_name": {"type": ["string", "null"], "description": "If following up, the name of the tool to use (e.g., 'send_discord_message', 'remember_general_fact'). Null otherwise."},
|
"follow_up_tool_name": {"type": ["string", "null"], "description": "If following up, the name of the tool to use (e.g., 'send_discord_message', 'remember_general_fact'). Null otherwise."},
|
||||||
"follow_up_arguments": {"type": ["object", "null"], "description": "If following up, arguments for the follow-up tool. Null otherwise."}
|
"follow_up_arguments": {"type": ["object", "null"], "description": "If following up, arguments for the follow_up tool. Null otherwise."}
|
||||||
},
|
},
|
||||||
"required": ["should_follow_up", "reasoning"]
|
"required": ["should_follow_up", "reasoning"]
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,27 @@ class MemoryManager:
|
|||||||
logger.info("Goals table created/verified.")
|
logger.info("Goals table created/verified.")
|
||||||
# --- End Goals Table ---
|
# --- End Goals Table ---
|
||||||
|
|
||||||
|
# Add ALTER TABLE statements here to ensure columns exist
|
||||||
|
try:
|
||||||
|
# Check if guild_id column exists
|
||||||
|
cursor = await db.execute("PRAGMA table_info(gurt_goals)")
|
||||||
|
columns = await cursor.fetchall()
|
||||||
|
column_names = [column[1] for column in columns]
|
||||||
|
|
||||||
|
if 'guild_id' not in column_names:
|
||||||
|
logger.info("Adding guild_id column to gurt_goals table")
|
||||||
|
await db.execute("ALTER TABLE gurt_goals ADD COLUMN guild_id TEXT")
|
||||||
|
if 'channel_id' not in column_names:
|
||||||
|
logger.info("Adding channel_id column to gurt_goals table")
|
||||||
|
await db.execute("ALTER TABLE gurt_goals ADD COLUMN channel_id TEXT")
|
||||||
|
if 'user_id' not in column_names:
|
||||||
|
logger.info("Adding user_id column to gurt_goals table")
|
||||||
|
await db.execute("ALTER TABLE gurt_goals ADD COLUMN user_id TEXT")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Error checking/adding columns to gurt_goals table: {e}", exc_info=True)
|
||||||
|
|
||||||
|
|
||||||
# --- Add Internal Actions Log Table ---
|
# --- Add Internal Actions Log Table ---
|
||||||
await db.execute("""
|
await db.execute("""
|
||||||
CREATE TABLE IF NOT EXISTS internal_actions (
|
CREATE TABLE IF NOT EXISTS internal_actions (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user