mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-02 14:30:43 +00:00

This adds a new Suggest backend for ML-based suggestions called `SuggestBackendMl`. Before, with the JS and Rust backends, only one backend was enabled at a time, but both the ML and Rust backends can be enabled at the same time since we will want to serve suggestions from both for the foreseeable future. Features can support ML suggestions by implementing the new `BaseFeature.mlIntent` getter and handling ML suggestions in `makeResult()`. Each feature can decide whether it supports ML suggestions and whether they should be preferred over Rust suggestions. I've updated the Yelp feature to hook into this, since Yelp suggestions are supported by the ML model that Chidam is working on. If ML is enabled, then the feature will only serve ML suggestions. I'm not sure if that's what we want long term, but for now that will make it clear to people which backend is being used while we develop this feature. The `quickSuggestMlEnabled` variable/pref determines whether the ML backend is enabled. The `yelpMlEnabled` variable/pref determines whether Yelp ML suggestions are enabled. We can create similar variable/prefs for each feature that supports ML suggestions so that they can be toggled independently of each other. Other changes: Move the `is_sponsored` logic out of the Rust backend and into the provider. Otherwise it would need to be duplicated in the ML backend too. Depends on D224523 Differential Revision: https://phabricator.services.mozilla.com/D226736
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
An explanation of the Firefox Source Code Directory Structure and links to project pages with documentation can be found at: https://firefox-source-docs.mozilla.org/contributing/directory_structure.html For information on how to build Firefox from the source code and create the patch see: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html If you have a question about developing Firefox, and can't find the solution on https://firefox-source-docs.mozilla.org/, you can try asking your question on Matrix at chat.mozilla.org in `Introduction` (https://chat.mozilla.org/#/room/#introduction:mozilla.org) channel. Nightly development builds can be downloaded from: https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central/ - or - https://www.mozilla.org/firefox/channel/desktop/#nightly Keep in mind that nightly builds, which are used by Firefox developers for testing, may be buggy.
Description
Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Languages
JavaScript
32.3%
C++
25.4%
HTML
21.1%
C
10.8%
Python
2.8%
Other
7.1%