Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

cody-gateway: handle missing Google response#63895

Merged
abeatrix merged 3 commits into
mainfrom
bee/google-decode
Jul 24, 2024
Merged

cody-gateway: handle missing Google response#63895
abeatrix merged 3 commits into
mainfrom
bee/google-decode

Conversation

@abeatrix

Copy link
Copy Markdown
Contributor
  • Logs a warning instead of returning an error when the Google response is missing
  • This prevents the API from returning an error when the Google response is empty, which can happen when Google is not happy with the question due to safety issues. We will only log a decoder error as error.

Test plan

only the log level was updated for empty responses. the function behavior was not changed.

Changelog

cody-gateway: log missing Google response as warning

- Logs a warning instead of returning an error when the Google response is missing
- This prevents the API from returning an error when the Google response is empty, which can happen in some cases
@cla-bot cla-bot Bot added the cla-signed label Jul 17, 2024
@abeatrix abeatrix requested review from a team and chrsmith July 17, 2024 23:31

@chrsmith chrsmith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit. But what do end-users see when they hit this situation? Do they see a message from Google to the effect of "no dawg, I ain't going to answer that"?

@abeatrix

Copy link
Copy Markdown
Contributor Author

Seems legit. But what do end-users see when they hit this situation? Do they see a message from Google to the effect of "no dawg, I ain't going to answer that"?

When I try it in Google AI studio I just get an empty answer 😭

@abeatrix abeatrix enabled auto-merge (squash) July 24, 2024 17:43
@abeatrix abeatrix merged commit 468a01a into main Jul 24, 2024
@abeatrix abeatrix deleted the bee/google-decode branch July 24, 2024 17:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants