Giter VIP home page Giter VIP logo

The `response.text` quick accessor only works when the response contains a valid `Part`, but none was returned. Check the `candidate.safety_ratings` to see if the response was blocked. about generative-ai-python HOT 7 OPEN

141forever avatar 141forever commented on July 29, 2024
The `response.text` quick accessor only works when the response contains a valid `Part`, but none was returned. Check the `candidate.safety_ratings` to see if the response was blocked.

from generative-ai-python.

Comments (7)

singhniraj08 avatar singhniraj08 commented on July 29, 2024

@141forever, Similar feature request #282 is already filled. Requesting you to please follow and +1 the similar issue for updates and close this thread. Thank you!

from generative-ai-python.

trunglebka avatar trunglebka commented on July 29, 2024

@singhniraj08 I'm facing similar problem as the OP, since the finish_reason is always OTHER and the issue you linked is talking about safety I'm not sure it is related problem.
My prompt is as simple as translating a JSON object with the content "Hi Peter, how's it going?" or "Chief Technology Officer" along with related metadata. Using the same prompt, I can easily get the result from ChatGPT, but Gemini (both Pro and Flash) just responds with finish_reason=OTHER so I don't even know what the problem is with the prompt.

from generative-ai-python.

trunglebka avatar trunglebka commented on July 29, 2024

Additional information:
With the same prompt I always get the expected result via the public gemini website https://gemini.google.com
With https://aistudio.google.com/app/prompts/new_chat , it is failed every time.
I can share the prompt via email if you guys are interested

from generative-ai-python.

singhniraj08 avatar singhniraj08 commented on July 29, 2024

@trunglebka, #282 is for implementation of more helpful error messages when the response is blocked by Gemini because of safety or other reasons. The SDK doesn't control the service's responses. If you feel the response is blocked which shouldn't be the normal case, we would suggest you to use "Send Feedback" option in Gemini docs. Ref: Screenshot below. You can also post this issue on Discourse forum.
image

from generative-ai-python.

trunglebka avatar trunglebka commented on July 29, 2024

@singhniraj08 Thanks for pointing that out, I wasn't paying close attention

from generative-ai-python.

baptvit avatar baptvit commented on July 29, 2024

Im having the same issue, Im doing some rewriting text about healthcare USML dataset. And in a specific question I got this error.

from generative-ai-python.

github-actions avatar github-actions commented on July 29, 2024

Marking this issue as stale since it has been open for 14 days with no activity. This issue will be closed if no further activity occurs.

from generative-ai-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.