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

Update Sentiment_Analysis notebook to use genai module #506

Merged

Conversation

Faakhir30
Copy link
Contributor

Refers #446

  • Updated module google-generativeai to use google-genai>=1.0.0
  • Refactored imports
  • Docs update was not required IMO

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder labels Mar 5, 2025
@markmcd markmcd self-assigned this Mar 5, 2025
@markmcd
Copy link
Member

markmcd commented Mar 5, 2025

Thanks for the update on this one - I like the work you've done and am happy to merge it but I think this doc needs more work.

Just to be clear, your work is great, we can track this separately. But if you are interested it'd be great to work on this.

Here's what I think needs to be done:

  • The schema should be moved out of the prompt and should use response_schema instead (so we use a real TypedDict or pydantic class)
  • We should use categorical outputs in the schema (like enums) instead of float outputs. The floats are not going to be calibrated probabilities, so we shouldn't represent them as such. Instead each field could be one of NONE, WEAK, STRONG.

If you like, we can just merge this and deal with these tasks in a separate issue. LMK what you'd like to do.

markmcd
markmcd previously approved these changes Mar 5, 2025
@markmcd markmcd merged commit 66ac426 into google-gemini:main Mar 6, 2025
5 checks passed
@Faakhir30 Faakhir30 deleted the genai_json_sentimemnt_analysis branch March 6, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:awaiting review PR awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants