Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch index error for empty generations #162

Closed
wants to merge 4 commits into from
Closed

Conversation

ccurme
Copy link
Contributor

@ccurme ccurme commented Apr 17, 2024

@ccurme ccurme requested a review from lkuligin April 17, 2024 16:09
@@ -553,6 +553,8 @@ def _generate(
)
for candidate in response.candidates
]
if not generations:
raise ValueError("Received empty response from model.")

Choose a reason for hiding this comment

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

This check should probably be happening in the base model class in LangChain. Doesn't feel like there's anything google specific to the integration in it.

But if there is some more specific check we can do on the raw response object, that would be great!

@duob-ai
Copy link

duob-ai commented Apr 22, 2024

Would this prevent #177?

@ccurme ccurme mentioned this pull request Apr 23, 2024
@lkuligin
Copy link
Collaborator

folks, should we close it?
I believe I've addressed it here:
#188

@ccurme ccurme closed this Apr 26, 2024
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.

None yet

4 participants