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

Wrap experimental Local Chromium AI APIs as bricks #9310

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Conversation

twschiller
Copy link
Contributor

@twschiller twschiller commented Oct 20, 2024

What does this PR do?

  • Wrap experimental Local Chromium AI APIs as bricks

Discussion

  • These APIs are experimental/still only in Canary, so not useful for enterprise projects
  • Adding for some experiments - particularly for when running AI doesn't have a marginal "cost"

Future Work

  • Add the other APIs, e.g., language detection, write, etc.
  • For Language Detection, need to find a types file
  • For write/rewrite, need to reach out to Chrome Dev Rel team on why the capabilities method is missing

For more information on our expectations for the PR process, see the
code review principles doc

@twschiller twschiller self-assigned this Oct 20, 2024
@twschiller twschiller added the enhancement New feature or request label Oct 20, 2024
Copy link

codecov bot commented Oct 20, 2024

Codecov Report

Attention: Patch coverage is 36.89320% with 65 lines in your changes missing coverage. Please review.

Project coverage is 75.15%. Comparing base (8318d74) to head (0e1a259).
Report is 394 commits behind head on main.

Files with missing lines Patch % Lines
src/bricks/transformers/ai/domAiHelpers.ts 12.00% 22 Missing ⚠️
src/bricks/transformers/ai/LocalChatCompletion.ts 36.66% 19 Missing ⚠️
src/bricks/transformers/ai/LocalPrompt.ts 45.45% 12 Missing ⚠️
src/bricks/transformers/ai/LocalSummarization.ts 45.45% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9310      +/-   ##
==========================================
+ Coverage   74.24%   75.15%   +0.90%     
==========================================
  Files        1332     1367      +35     
  Lines       40817    42188    +1371     
  Branches     7634     7843     +209     
==========================================
+ Hits        30306    31705    +1399     
+ Misses      10511    10483      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Oct 20, 2024

Playwright test results

passed  139 passed
flaky  1 flaky
skipped  2 skipped

Details

report  Open report ↗︎
stats  142 tests across 46 suites
duration  9 minutes, 53 seconds
commit  0e1a259
info  For more information on how to debug and view this report, see our readme

Flaky tests

msedge-setup › setup/unaffiliated.setup.ts › authenticate with unaffiliated user

Skipped tests

chrome › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options
msedge › tests/runtime/googleSheetsIntegration.spec.ts › can activate a google spreadsheet mod with config options

throwIfBusinessError,
} from "@/bricks/transformers/ai/domAiHelpers";

// Copied from @types/dom-chromium-ai because they're not exported
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we end up using this, we should open an issue/PR to export them. Probably an oversight by the maintainers

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link

No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack.

Do not edit this comment manually.

@twschiller twschiller merged commit 656ced1 into main Oct 21, 2024
22 checks passed
@twschiller twschiller deleted the feature/local-ai branch October 21, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brick enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants