From 11e5253df9a9810d1dac098d5926f79653768afc Mon Sep 17 00:00:00 2001 From: Georgijs <48869301+gvilums@users.noreply.github.com> Date: Sat, 28 Oct 2023 15:37:01 +0200 Subject: [PATCH] Update platform/reworkd_platform/web/api/agent/tools/sidsearch.py Co-authored-by: Adam Watkins --- .../web/api/agent/tools/sidsearch.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/platform/reworkd_platform/web/api/agent/tools/sidsearch.py b/platform/reworkd_platform/web/api/agent/tools/sidsearch.py index 625be299f7..e99453cd77 100644 --- a/platform/reworkd_platform/web/api/agent/tools/sidsearch.py +++ b/platform/reworkd_platform/web/api/agent/tools/sidsearch.py @@ -137,13 +137,7 @@ async def call( *args: Any, **kwargs: Any, ) -> FastAPIStreamingResponse: - res = await self._run_sid( - goal, task, input_str, user, oauth_crud - ) - if res is None: - # fall back to search if no results are found - return await Search(self.model, self.language).call( - goal, task, input_str, user, oauth_crud - ) - else: - return res + # fall back to search if no results are found + return await self._run_sid(goal, task, input_str, user, oauth_crud) or await Search(self.model, self.language).call( + goal, task, input_str, user, oauth_crud + )