File: model_execution.proto

package info (click to toggle)
chromium 138.0.7204.157-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,864 kB
  • sloc: cpp: 34,936,859; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,967; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (82 lines) | stat: -rw-r--r-- 2,741 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.optimization_guide.proto";
option java_outer_classname = "ModelExecutionProto";

package optimization_guide.proto;

import "components/optimization_guide/proto/common_types.proto";

message ExecuteRequest {
  reserved 3;

  // The feature that this execution request is for.
  optional ModelExecutionFeature feature = 1;

  // The metadata associated with this request used to understand how to
  // execute the necessary feature models.
  optional Any request_metadata = 2;
}

message ExecuteResponse {
  reserved 3;

  optional int64 model_version = 1;

  oneof response {
    // The metadata for the response returned for the feature.
    Any response_metadata = 2;
    ErrorResponse error_response = 5;
  }

  optional string server_execution_id = 4;
}

message ErrorResponse {
  optional ErrorState error_state = 1;
}

// Possible failure modes of the service
enum ErrorState {
  ERROR_STATE_UNSPECIFIED = 0;
  ERROR_STATE_INTERNAL_SERVER_ERROR_RETRY = 1;
  ERROR_STATE_INTERNAL_SERVER_ERROR_NO_RETRY = 2;
  ERROR_STATE_UNSUPPORTED_LANGUAGE = 3;
  ERROR_STATE_FILTERED = 4;
  ERROR_STATE_REQUEST_THROTTLED = 5;
  ERROR_STATE_DISABLED = 6;
}

enum ModelExecutionFeature {
  reserved 9, 10, 11, 16, 19, 21, 22, 25;

  MODEL_EXECUTION_FEATURE_UNSPECIFIED = 0;
  MODEL_EXECUTION_FEATURE_COMPOSE = 1;
  MODEL_EXECUTION_FEATURE_TAB_ORGANIZATION = 2;
  MODEL_EXECUTION_FEATURE_WALLPAPER_SEARCH = 3;
  // This test feature cannot be used for launch but can be used for
  // prototyping. Please reach out to optimization_guide OWNERS when looking to
  // use this enum or want to go beyond prototyping.
  MODEL_EXECUTION_FEATURE_TEST = 4;
  // This feature does not map to a user-visible feature that is being
  // launched, but instead is an internal detail to support other model
  // execution features.
  MODEL_EXECUTION_FEATURE_TEXT_SAFETY = 5;
  MODEL_EXECUTION_FEATURE_PROMPT_API = 6;
  MODEL_EXECUTION_FEATURE_HISTORY_SEARCH = 7;
  MODEL_EXECUTION_FEATURE_SUMMARIZE = 8;
  MODEL_EXECUTION_FEATURE_HISTORY_QUERY_INTENT = 12;
  MODEL_EXECUTION_FEATURE_BLING_PROTOTYPING = 13;
  MODEL_EXECUTION_FEATURE_PASSWORD_CHANGE_SUBMISSION = 14;
  MODEL_EXECUTION_FEATURE_SCAM_DETECTION = 15;
  MODEL_EXECUTION_FEATURE_PERMISSIONS_AI = 17;
  MODEL_EXECUTION_FEATURE_WRITING_ASSISTANCE_API = 18;
  MODEL_EXECUTION_FEATURE_FORMS_CLASSIFICATIONS = 20;
  MODEL_EXECUTION_FEATURE_ENHANCED_CALENDAR = 23;
  MODEL_EXECUTION_FEATURE_ZERO_STATE_SUGGESTIONS = 24;
  MODEL_EXECUTION_FEATURE_PROOFREADER_API = 26;
}