Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -356,13 +356,17 @@ generic_chat_llm.callbacks = [my_callback_handler]
|
|
356 |
# Initialize
|
357 |
agent = initialize_agent(
|
358 |
[retrieve_answer_for_country, compare], # tools
|
359 |
-
#
|
|
|
|
|
360 |
llm=llm,
|
361 |
agent="zero-shot-react-description", # this is good
|
362 |
verbose=False,
|
363 |
handle_parsing_errors=True,
|
364 |
return_intermediate_steps=True,
|
365 |
callbacks=[my_callback_handler]
|
|
|
|
|
366 |
# memory=ConversationBufferMemory(
|
367 |
# memory_key="chat_history", return_messages=True
|
368 |
# ),
|
|
|
356 |
# Initialize
|
357 |
agent = initialize_agent(
|
358 |
[retrieve_answer_for_country, compare], # tools
|
359 |
+
# uncomment below if want to enable general chat option also, if user engages bot with casual talk
|
360 |
+
# however user should be advised not to do this
|
361 |
+
# [generic_chat_llm, retrieve_answer_for_country, compare],
|
362 |
llm=llm,
|
363 |
agent="zero-shot-react-description", # this is good
|
364 |
verbose=False,
|
365 |
handle_parsing_errors=True,
|
366 |
return_intermediate_steps=True,
|
367 |
callbacks=[my_callback_handler]
|
368 |
+
# no memories, limited RAM in HuggingFaceSpaces
|
369 |
+
# in production mode conversation can be stored for separate users/chat sessions in postgresql database
|
370 |
# memory=ConversationBufferMemory(
|
371 |
# memory_key="chat_history", return_messages=True
|
372 |
# ),
|