Skip to content

VinF Hybrid Inference #3: Implement ChromeAdapter #8917

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

Conversation

erikeldridge
Copy link

PR #8877 introduces an internal abstraction called ChromeAdapter that encapsulates logic for detecting Chrome's API and using it for inference. Having agreed that abstraction seems reasonable, this PR implements it.

@erikeldridge erikeldridge requested a review from a team as a code owner April 10, 2025 15:27
Copy link

changeset-bot bot commented Apr 10, 2025

⚠️ No Changeset found

Latest commit: 5dfd435

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Vertex AI Mock Responses Check ⚠️

A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v10.0

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • @firebase/util

    TypeBase (08d341f)Merge (8751e39)Diff
    browser23.3 kB23.4 kB+108 B (+0.5%)
    main29.3 kB29.4 kB+170 B (+0.6%)
    module23.3 kB23.4 kB+108 B (+0.5%)
  • @firebase/vertexai

    TypeBase (08d341f)Merge (8751e39)Diff
    browser35.8 kB37.7 kB+1.83 kB (+5.1%)
    main36.8 kB38.6 kB+1.83 kB (+5.0%)
    module35.8 kB37.7 kB+1.83 kB (+5.1%)
  • firebase

    TypeBase (08d341f)Merge (8751e39)Diff
    firebase-vertexai.js28.9 kB34.5 kB+5.57 kB (+19.3%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/N0GAIbzpfS.html

@google-oss-bot
Copy link
Contributor

Size Analysis Report 1

Affected Products

  • @firebase/util

    • isChrome

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size?4.28 kB? (?)
      size-with-ext-deps?4.28 kB? (?)

      Dependency

      TypeBase (08d341f)Merge (8751e39)Diff
      functions?

      getGlobal
      isChrome
      isNode

      ?
      classes?

      DecodeBase64StringError

      ?
      variables?

      base64
      base64Decode
      byteArrayToString
      getDefaults
      getDefaultsFromCookie
      getDefaultsFromEnvVariable
      getDefaultsFromGlobal
      getDefaultsFromPostinstall
      stringToByteArray$1

      ?
      enums??
  • @firebase/vertexai

    • ChatSession

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size16.0 kB16.0 kB-16 B (-0.1%)
      size-with-ext-deps34.9 kB34.9 kB-16 B (-0.0%)
    • GenerativeModel

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size19.2 kB19.2 kB-16 B (-0.1%)
      size-with-ext-deps38.2 kB38.2 kB-16 B (-0.0%)
    • ImagenModel

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size21.0 kB20.9 kB-16 B (-0.1%)
      size-with-ext-deps39.9 kB39.9 kB-16 B (-0.0%)
    • VertexAIModel

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size19.2 kB19.2 kB-16 B (-0.1%)
      size-with-ext-deps38.2 kB38.2 kB-16 B (-0.0%)
    • getGenerativeModel

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size19.7 kB21.2 kB+1.50 kB (+7.6%)
      size-with-ext-deps38.7 kB41.4 kB+2.68 kB (+6.9%)

      External Dependency

      ModuleBase (08d341f)Merge (8751e39)Diff
      @firebase/util

      FirebaseError

      FirebaseError
      isChrome

      + isChrome

    • getImagenModel

      Size

      TypeBase (08d341f)Merge (8751e39)Diff
      size21.1 kB21.1 kB-16 B (-0.1%)
      size-with-ext-deps40.1 kB40.1 kB-16 B (-0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/qeOjBSfhYN.html

@erikeldridge
Copy link
Author

Since this will only be prerelease, we're merging into a non-main branch.

To avoid confusion, I'll close this in favor of #8943

I've added the review feedback to our burndown.

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

3 participants