Reason: When I was testing the limits of this project I noticed that passing off any instructions through the agent as a query broke the choose_agent function as the response contained non-JSON formatted text.
Suggestion: I have added two new async functions to handle different JSON errors using the already imported json_repair library and regex as a last resort.
Importance: This contribution is important because it makes the user experience remain relevant to the research task even when the user (who might not be technically adept) decides to pass instructions in the prompt.
Reason: When I was testing the limits of this project I noticed that passing off any instructions through the agent as a query broke the choose_agent function as the response contained non-JSON formatted text.
Suggestion: I have added two new async functions to handle different JSON errors using the already imported json_repair library and regex as a last resort.
Importance: This contribution is important because it makes the user experience remain relevant to the research task even when the user (who might not be technically adept) decides to pass instructions in the prompt.