| // Copyright 2025 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package optimization_guide.proto; |
| |
| import "components/optimization_guide/proto/features/common_quality_data.proto"; |
| |
| import "components/optimization_guide/proto/model_quality_metadata.proto"; |
| |
| option optimize_for = LITE_RUNTIME; |
| option java_package = "org.chromium.components.optimization_guide.features.proto"; |
| |
| option java_outer_classname = "FormsClassificationsProto"; |
| |
| // DO NOT EDIT THIS FILE DIRECTLY! |
| // |
| // This file is generated in g3 and then synced to Chrome. Instead, please |
| // refer to http://go/chrome-intelligence-feature-protos (Google-internal link), |
| // and then changes will be synced with Chrome automatically. |
| |
| // Next ID: 6 |
| message FormsClassificationsLoggingData { |
| AutofillAiTypeRequest request = 1; |
| |
| AutofillAiTypeResponse response = 2; |
| |
| FormTypeQuality quality = 3; |
| |
| ModelExecutionInfo model_execution_info = 4; |
| |
| PageContent page_content = 5; |
| } |
| |
| message AutofillAiTypeRequest { |
| // The context of the page that the form is on. |
| PageContext page_context = 1; |
| |
| // The form to predict values for. It is expected that the values for each |
| // field are empty. |
| FormData form_data = 2; |
| |
| // A screenshot of the form. |
| // This is optional and may be used by the model to improve predictions. |
| FormMedia media = 3; |
| } |
| |
| message FormMedia { |
| // Screenshots in base64-encoded PNG format |
| repeated bytes screenshots = 1; |
| } |
| |
| message AutofillAiTypeResponse { |
| // A list of field-level type predictions for the form. |
| repeated FieldTypeResponse field_responses = 1; |
| } |
| |
| message FieldTypeResponse { |
| // A globally unique identifier for the form field, passed from the client. |
| // Used to match the request field with the corresponding response field. |
| // This value is provided by the client and should remain consistent between |
| // request and response. |
| string field_global_id = 1; |
| |
| // The predicted type for the field. |
| int32 field_type = 2; |
| |
| // Optional formatting metadata for downstream use. |
| // Example formats: "dd/mm/yyyy" for dates, "NAME_FIRST_LAST" for names. |
| string formatting_meta = 3; |
| |
| // The confidence score for the prediction, ranging from 0.0 to 1.0. |
| // Higher values indicate greater confidence in the predicted type. |
| float confidence = 4; |
| } |
| |
| message FormTypeQuality { |
| // User-provided feedback on the predictions. |
| UserFeedback user_feedback = 1; |
| } |
| |
| // Next ID: 4 |
| message PageContent { |
| // The form data extracted from the page, including form and field names, |
| // types, and other relevant information. |
| repeated FormInfo forms = 1; |
| |
| // Information about unowned form control elements found on the page. |
| repeated FormControlData unowned_form_controls = 2; |
| |
| // The page content represented as a tree of semantic chunks and (in the |
| // future) annotated with additional information about the page. |
| AnnotatedPageContent annotated_page_content = 3; |
| } |