Skip to content

Commit eb97dbc

Browse files
Fixing a bug in langchain_agent.py that was causing the agent to crash when intent is set to True
1 parent ee529f1 commit eb97dbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/langchain_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,8 @@ def run(self, query, prompt_id, redis_conn, filter_param):
568568
self.intent_output = self.agent_name + ': ' + query
569569

570570
if self.check_intent:
571-
intent, self.intent_output = self.agent_name + ': ' + self.get_intent(query)
571+
intent, intent_output = self.get_intent(query)
572+
self.intent_output = self.agent_name + ': ' + intent_output
572573
print("Intent:", intent, '-', self.intent_output)
573574

574575
if intent == "chit chat":

0 commit comments

Comments
 (0)