Return data sources to use if exception in data source chat actor

Previously no value was returned if an exception got triggered when
collecting information sources to search.
This commit is contained in:
Debanjum Singh Solanky 2024-10-14 18:14:40 -07:00
parent a932564169
commit 731ea3779e

View file

@ -353,13 +353,13 @@ async def aget_relevant_information_sources(
final_response = [ConversationCommand.Default] final_response = [ConversationCommand.Default]
else: else:
final_response = [ConversationCommand.General] final_response = [ConversationCommand.General]
return final_response except Exception:
except Exception as e:
logger.error(f"Invalid response for determining relevant tools: {response}") logger.error(f"Invalid response for determining relevant tools: {response}")
if len(agent_tools) == 0: if len(agent_tools) == 0:
final_response = [ConversationCommand.Default] final_response = [ConversationCommand.Default]
else: else:
final_response = agent_tools final_response = agent_tools
return final_response
async def aget_relevant_output_modes( async def aget_relevant_output_modes(