blob: 5afa3fbb72f7ef74f555e537d8f13929909cdaa5 [file] [log] [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
edition = "2023";
package optimization_guide.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 = "PermissionsAIProto";
// DO NOT EDIT THIS FILE DIRECTLY!
//
// This file is generated in g3 and then synced to Chrome. Instead, please refer to
// http://go/chrome-mqls-onboarding (Google-internal link), and then changes will
// be synced with Chrome automatically.
message PermissionsAILoggingData {
PermissionsAiRequest request = 1 [features = { field_presence: EXPLICIT }];
PermissionsAiResponse response = 2 [features = { field_presence: EXPLICIT }];
ModelExecutionInfo model_execution_info = 3 [features = { field_presence: EXPLICIT }];
}
message PermissionsAiRequest {
// Text that was extracted from the page through GetInnerText within Chromium.
// This text will be used to add onto the prompt under the model execution
// config.
string rendered_text = 2 [features = { field_presence: EXPLICIT }];
// The permission that the page requests from the user.
PermissionType permission_type = 3 [features = { field_presence: EXPLICIT }];
reserved 1;
}
// Information about LLM detection of a page of what the page is about. This
// information is used to determine if the page's request for a specific
// permission is backed up by the sites content.
message PermissionsAiResponse {
// The AI decision: whether the request seems legit and should be surfaced to
// the user, or whether it should be blocked directly.
bool is_permission_relevant = 1 [features = { field_presence: EXPLICIT }];
reserved 2;
}
enum PermissionType {
PERMISSION_TYPE_NOT_SPECIFIED = 0;
PERMISSION_TYPE_NOTIFICATIONS = 1;
PERMISSION_TYPE_GEOLOCATION = 2;
}