Skip to content

Commit

Permalink
perf: testing of gpt4free
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Oct 30, 2023
1 parent d0c9b50 commit 6d00504
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion free_one_api/impls/adapter/gpt4free.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ async def _select_provider(self):
],
provider=self._use_provider
)
non_stream_tested = True

if 'Rock' in resp and '<' not in resp:
non_stream_tested = True
except Exception as e:
self._use_provider = None
if non_stream_tested and self._use_stream_provider is not None:
Expand Down Expand Up @@ -158,6 +160,8 @@ async def _select_provider(self):
provider=provider
)

logging.debug("Testing provider %s, resp %s", provider, resp)

if 'Rock' in resp and '<' not in resp:
if self._use_provider is None:
self._use_provider = provider
Expand Down

0 comments on commit 6d00504

Please sign in to comment.