File: manta.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (161 lines) | stat: -rw-r--r-- 3,107 bytes parent folder | download | duplicates (6)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// 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;

import "components/manta/proto/common.proto";

package manta.proto;

enum FeatureName {
  reserved 1 to 299;

  CHROMEOS_VC_BACKGROUNDS = 300;
  CHROMEOS_WALLPAPER = 301;
  TEXT_TEST = 302;
  CHROMEOS_READER_SUMMARY = 303;
  CHROMEOS_READER_TOC = 312;
  CHROMEOS_READER_Q_AND_A = 313;
  CHROMEOS_LOBSTER = 315;
  CHROMEOS_SCANNER = 316;
  CHROMEOS_READER_ELUCIDATION = 317;
  CHROMEOS_WALRUS = 318;
  reserved 304 to 311;

  ACCESSIBILITY_IMAGE_DESCRIPTION = 700;
}

message ClientInfo {
  enum ClientType {
    reserved 0, 1;
    CHROME = 2;
  }

  optional ClientType client_type = 1;
  optional ChromeClientInfo chrome_client_info = 4;
  reserved 2, 3;
}

message ChromeClientInfo {
  optional string chrome_version = 1;
  optional string locale = 4;

  // The channel of the Chrome client.
  enum Channel {
    UNKNOWN = 0;
    CANARY = 1;
    DEV = 2;
    BETA = 3;
    STABLE = 4;
  }
  optional Channel chrome_channel = 5;
  reserved 2, 3;
}

enum ImageResolution {
  reserved 0, 4, 5, 6, 7, 8, 9, 10, 11;

  RESOLUTION_64 = 1;
  RESOLUTION_256 = 2;
  RESOLUTION_1024 = 3;
  RESOLUTION_LARGE = 12;
}

message ImageDimensions {
  optional uint32 width = 1;
  optional uint32 height = 2;
}

enum AspectRatio {
  ASPECT_RATIO_UNSPECIFIED = 0;  // Defaults to 1:1
  ASPECT_RATIO_16_9 = 1;
  ASPECT_RATIO_16_10 = 2;
  ASPECT_RATIO_4_3 = 3;
}

message RequestConfig {
  reserved 4, 6;

  optional uint32 generation_seed = 1;
  optional ImageResolution image_resolution = 2;
  optional uint32 num_outputs = 3;

  enum Tone {
    UNSPECIFIED = 0;
    SHORTEN = 1;
    ELABORATE = 2;
    REPHRASE = 3;
    FORMALIZE = 4;
    EMOJIFY = 5;
    FREEFORM_REWRITE = 6;
    FREEFORM_WRITE = 7;
    PROOFREAD = 8;
  }

  optional Tone tone = 5;

  optional ImageDimensions image_dimensions = 7;

  optional AspectRatio aspect_ratio = 8;

  optional Proto3Any specific_options = 9;
}

message InputData {

  oneof input_data {
    string text = 1;
    Image image = 2;
    Proto3Any custom = 3;
  }
  optional string tag = 4;
}

message Request {
  optional FeatureName feature_name = 1;
  optional ClientInfo client_info = 2;
  optional RequestConfig request_config = 3;
  repeated InputData input_data = 4;
}

message OutputData {
  reserved 4;
  oneof output_data {
    string text = 1;
    Image image = 2;
    Proto3Any custom = 3;
  }

  optional float score = 5;

  optional uint32 generation_seed = 6;

  optional string generative_prompt = 8;
}

enum FilteredReason {
  UNSPECIFIED = 0;
  IMAGE_SAFETY = 1;
  TEXT_SAFETY = 2;
  TEXT_LOW_QUALITY = 3;
  TEXT_BLOCKLIST = 4;
  IMAGE_SAFETY_PERSON = 8;

  reserved 5, 6, 7;
}

message FilteredData {
  reserved 1, 4;
  optional bool is_output_data = 2;
  optional FilteredReason reason = 3;
  repeated FilteredReason additional_reasons = 5;
}

message Response {
  reserved 3;

  repeated OutputData output_data = 1;
  repeated FilteredData filtered_data = 2;
}