Update chatbot.py
Browse files- 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 |
-
|
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']
|
|
|
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]
|