robertselvam commited on
Commit
3d6fe90
·
verified ·
1 Parent(s): fc51d0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -38,6 +38,7 @@ def get_response( candidate, chat_history, resume, jd):
38
 
39
  chain = prompt | chat
40
 
 
41
 
42
  answer = chain.invoke(
43
  {
@@ -45,7 +46,8 @@ def get_response( candidate, chat_history, resume, jd):
45
  HumanMessage(
46
  content=f" job description :{jd}\n Resume :{resume}"
47
  ),
48
- AIMessage(content=f"Perform as intelligent interviewer, Your Task is ask question to the resume's candidate by following candidate Answer:"),
 
49
  HumanMessage(content=candidate),
50
  ],
51
  }
@@ -54,7 +56,7 @@ def get_response( candidate, chat_history, resume, jd):
54
  # chat_history.append({"candidate":candidate,"interviewer":answer.content })
55
 
56
  result = answer.content
57
- chat_history.append((f'candidate{candidate}', f'interviewer{result}'))
58
  print("chat_history", chat_history)
59
  return "", chat_history
60
 
 
38
 
39
  chain = prompt | chat
40
 
41
+ # chat_histroy_prompt = chat_history
42
 
43
  answer = chain.invoke(
44
  {
 
46
  HumanMessage(
47
  content=f" job description :{jd}\n Resume :{resume}"
48
  ),
49
+ AIMessage(content=f"""Perform as intelligent interviewer, Your Task is ask question to the resume's candidate by following candidate Answer.
50
+ chat history : {chat_history}"""),
51
  HumanMessage(content=candidate),
52
  ],
53
  }
 
56
  # chat_history.append({"candidate":candidate,"interviewer":answer.content })
57
 
58
  result = answer.content
59
+ chat_history.append((f'candidate:{candidate}', result))
60
  print("chat_history", chat_history)
61
  return "", chat_history
62