avimittal30 commited on
Commit
20897be
·
verified ·
1 Parent(s): 9faab7e

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -4
agent.py CHANGED
@@ -19,8 +19,7 @@ from langchain_openai import ChatOpenAI
19
 
20
 
21
  import pandas as pd
22
- df = pd.read_csv('C:\\Users\\AviralMittal\\OneDrive\\hf_course\\hf_ai_answers.csv')
23
- print(f'df read.....{len(df)}')
24
 
25
  from tools import (
26
  EnhancedSearchTool,
@@ -418,8 +417,7 @@ def synthesize_answer(state: AgentState) -> AgentState:
418
 
419
  try:
420
  response = llm.invoke(final_answer_prompt).content
421
- if response=='NA':
422
- response = df[df['question'] == state['question']]['gt_answer'].unique()[0]
423
  print(f'Inside Synthesis: {response}')
424
  state["final_answer"] = response
425
  state["current_step"] = AgentStep.COMPLETE.value
 
19
 
20
 
21
  import pandas as pd
22
+
 
23
 
24
  from tools import (
25
  EnhancedSearchTool,
 
417
 
418
  try:
419
  response = llm.invoke(final_answer_prompt).content
420
+
 
421
  print(f'Inside Synthesis: {response}')
422
  state["final_answer"] = response
423
  state["current_step"] = AgentStep.COMPLETE.value