aaj
This commit is contained in:
parent
681de69f1f
commit
143d8a6414
@ -223,11 +223,12 @@ async def get_ai_response(cog: 'GurtCog', message: discord.Message, model_name:
|
||||
# We just need to provide the system message part.
|
||||
# Note: The exact structure might depend on the agent type used by LangchainAgent.
|
||||
# Assuming a standard structure:
|
||||
# Use the variable names provided by the agent ('history', 'intermediate_steps')
|
||||
prompt_template = ChatPromptTemplate.from_messages([
|
||||
("system", system_prompt_text),
|
||||
MessagesPlaceholder(variable_name="chat_history"), # Standard placeholder
|
||||
MessagesPlaceholder(variable_name="history"), # Matches agent input
|
||||
("user", "{input}"), # User input placeholder
|
||||
MessagesPlaceholder(variable_name="agent_scratchpad"), # Tool execution placeholder
|
||||
MessagesPlaceholder(variable_name="intermediate_steps"), # Matches agent input
|
||||
])
|
||||
|
||||
# --- 2. Prepare Tools ---
|
||||
@ -741,4 +742,4 @@ async def get_internal_ai_json_response(
|
||||
except Exception as log_e:
|
||||
logger.error(f"Error logging internal API call: {log_e}", exc_info=True)
|
||||
|
||||
return final_parsed_data
|
||||
return final_parsed_data
|
||||
|
Loading…
x
Reference in New Issue
Block a user