Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Invalid operation: The response.parts #526

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

Closed
Pratik-Kumar-Cse opened this issue Aug 26, 2024 · 3 comments
Closed

Invalid operation: The response.parts #526

Pratik-Kumar-Cse opened this issue Aug 26, 2024 · 3 comments

Comments

@Pratik-Kumar-Cse
Copy link

Description of the bug:

Invalid operation: The response.parts quick accessor requires a single candidate, but none were returned. Please check the response.prompt_feedback to determine if the prompt was blocked.

Actual vs expected behavior:

I am calling the llm using image and video like this

response = model.generate_content(
[prompt, video_file],
request_options={"timeout": 600},
safety_settings=safety_settings,
)

Any other information you'd like to share?

No response

@MarkDaoust MarkDaoust added status:awaiting user response Awaiting a response from the author and removed status:awaiting user response Awaiting a response from the author labels Aug 26, 2024
@MarkDaoust
Copy link
Collaborator

MarkDaoust commented Aug 26, 2024

There are some improved error messages in: #527

What was in response.prompt_feedback? Was it empty?

@MarkDaoust
Copy link
Collaborator

Unless there's something new, let's call this a duplicate of #170, with #527 as a fix.

@Pratik-Kumar-Cse
Copy link
Author

when I try to access the response.text then this error message will come but I am able to access token used

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

No branches or pull requests

2 participants