Add function results to conversation history after we do an action

This commit is contained in:
mudler
2023-08-05 11:09:11 +02:00
parent a380d4eba1
commit 881edbad07

View File

@@ -694,6 +694,11 @@ def evaluate(user_input, conversation_history = [],re_evaluate=False, agent_acti
conversation_history.extend(responses)
return conversation_history
# unwrap the list of responses
conversation_history.append(responses[-1])
#responses = converse(responses)
# TODO: this needs to be optimized
responses = analyze(responses, prefix=f"You are an AI assistant. Return an appropriate answer to the user input '{user_input}' given the context below and summarizing the actions taken\n")