Skip to content

feat(ai-logic): add hybrid on-device inference sample#2773

Open
thatfiredev wants to merge 8 commits intomasterfrom
rpf/add-hybrid-sample
Open

feat(ai-logic): add hybrid on-device inference sample#2773
thatfiredev wants to merge 8 commits intomasterfrom
rpf/add-hybrid-sample

Conversation

@thatfiredev
Copy link
Copy Markdown
Member

@thatfiredev thatfiredev commented Mar 26, 2026

Note that this also:

  • bumps the Firebase BoM from 34.7.0 to 34.11.0
  • bumps the minSdk from 23 to 26 (minimum required for ondevice)

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a Hybrid Receipt Scanner feature that utilizes Firebase AI to extract expense data from receipts, preferring on-device inference. The changes include the addition of a new ViewModel for managing model downloads and scanning logic, a Compose-based UI for displaying expenses, and necessary dependency updates. Review feedback highlights the need to handle exceptions in the image picker rather than leaving the catch block empty, improving the robustness of the CSV parsing logic to handle store names containing commas, and removing an unnecessary non-null assertion where Kotlin smart-casting is already available.

@thatfiredev
Copy link
Copy Markdown
Member Author

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a Hybrid Receipt Scanner feature that utilizes Firebase AI's hybrid inference to extract expense data from receipts, prioritizing on-device processing. The implementation includes a new ViewModel for model management and receipt parsing, a dedicated UI screen, and necessary dependency updates. Feedback focuses on enhancing error handling for parsing failures and image loading issues, as well as improving localization by using standard currency formatting instead of hardcoded symbols.

@thatfiredev thatfiredev marked this pull request as ready for review March 27, 2026 16:32
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.

1 participant