KvrParaskevi commited on
Commit
db581a6
·
verified ·
1 Parent(s): 37ab1fa

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +3 -3
chatbot.py CHANGED
@@ -68,8 +68,8 @@ def demo_miny_memory():
68
  return memory
69
 
70
  def demo_chain(input_text,history):
71
- #PROMPT = ChatPromptTemplate.from_template(template)
72
- PROMPT = PromptTemplate(template=template, input_variables=["history", "input"])
73
  conversation = ConversationChain(
74
  prompt=PROMPT,
75
  llm=llm,
@@ -82,4 +82,4 @@ def demo_chain(input_text,history):
82
  "input" : input_text,
83
  "history" : history
84
  })
85
- return chat_reply['response'].split('AI:')[-1]
 
68
  return memory
69
 
70
  def demo_chain(input_text,history):
71
+ PROMPT = ChatPromptTemplate.from_template(template)
72
+ #PROMPT = PromptTemplate(template=template, input_variables=["history", "input"])
73
  conversation = ConversationChain(
74
  prompt=PROMPT,
75
  llm=llm,
 
82
  "input" : input_text,
83
  "history" : history
84
  })
85
+ return chat_reply['response'] #.split('AI:')[-1]