Skip to content

Keep a timed out RapidAPI reply marked as a timeout - #385

Open
SashaMIT wants to merge 1 commit into
OpenBMB:masterfrom
SashaMIT:codered-timeout-cache
Open

SashaMIT wants to merge 1 commit into
OpenBMB:masterfrom
SashaMIT:codered-timeout-cache

Conversation

@SashaMIT

Copy link
Copy Markdown

A RapidAPI timeout was stored as a normal cached result. process_error matches the timeout sentence, then a second if starts a new chain whose else clears the error and sets the cache flag. The timeout check is now the first branch of that chain.

A timeout reply stays API temporarily not working error... and is not cached. An unauthorized reply is still cached. A gateway failure is still API not working error.... A normal payload is still cached with an empty error.

Test plan

  • python -m unittest toolbench.inference.test_process_error (red on tip: the timeout error was ''; green after: 4 tests pass)

The timeout check stood alone, so the later else stored the reply as a normal cached result.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant