Automatic update from web-platform-tests Create renderer side code for ai taxonomy API Implementation stubbed out in accordance to go/chrome-ipc-stubs-trial Feature currently disabled and returns an empty promise pending browser side implementation and link What is this API supposed to do? - It will be used in devTrial for adds to perform Taxonomy on Webpages. Strings will be passed through this layer (blink) and then end up on the ai engine within optimization_guide to classify text into IAB taxonomies using a tinyGemma model. Who will call it and who will implement it? -It should be an open endpoint eventually for developers, but for now it will be a built in API to pass text to and provide IAB Taxonomies. Browser process will eventually pass the logic to optimization_guide to perform inference What data will be passed where and by whom? -For the DevTrial we will be focused on the developer(Ads) passing a simple text string (the input to be classified) and an optional dictionary of settings If text is being parsed (it sounds like it is), where does that occur? -In the Blink (Renderer) layer, the text is treated strictly as a string. No linguistic parsing or tokenization occurs in the rendering engine. The string is serialized and passed across the Mojo IPC boundary to the Browser process. The actual "parsing" (tokenization, embedding, and model inference) happens safely inside the underlying AI execution engine Bug: 483707964 Change-Id: I93f53ebb5d06c86a84a21f104b2e53ff78d8dedf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7568249 Reviewed-by: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Devin Cabillo <devincabillo@google.com> Reviewed-by: Jingyun Liu <jingyun@google.com> Reviewed-by: Nathan Memmott <memmott@chromium.org> Cr-Commit-Position: refs/heads/main@{#1595586} -- wpt-commits: adfc1984c7c53841f67d9d0cd8ab17391bc20a62 wpt-pr: 58120
13 lines
407 B
JavaScript
13 lines
407 B
JavaScript
// META: title=Classifier Availability
|
|
// META: script=/resources/testdriver.js
|
|
// META: script=../resources/util.js
|
|
// META: timeout=long
|
|
|
|
'use strict';
|
|
|
|
promise_test(async () => {
|
|
const availability = await Classifier.availability();
|
|
// Assert that the result is a valid state.
|
|
assert_in_array(availability, kValidAvailabilities);
|
|
}, 'Classifier.availability() returns a valid availability state');
|