Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // Experimental Translation Assist Model to allow/suppress translation prompts. | |
| 6 | |
| 7 syntax = "proto2"; | |
| 8 | |
| 9 option optimize_for = LITE_RUNTIME; | |
| 10 | |
| 11 import "translate_ranker_model.proto"; | |
| 12 | |
| 13 package chrome_intelligence; | |
| 14 | |
| 15 // Metadata for a ranker model instance. This data describes how the ranker | |
| 16 // model should be interpreted/used. | |
| 17 message RankerModelMetadata { | |
| 18 // An identifier, typically a URL, denoting the source from which this model | |
| 19 // was obtained. The model referenced with a given source is presumed to be | |
| 20 // immutable; this can be used as a cache control mechanism. If the currently | |
| 21 // configured model source matches the source of a cached model, then there | |
| 22 // is no need to refresh the model. | |
| 23 optional string source = 1; | |
| 24 | |
| 25 // The timestamp at which this model was download.. | |
|
hamelphi
2017/01/20 18:44:18
downloaded, remove one '.'
Roger McFarlane (Chromium)
2017/02/08 23:08:09
Done.
| |
| 26 optional int64 last_modified_sec = 2; | |
| 27 | |
| 28 // The number of seconds after which this model should be considered expired. | |
| 29 // Defaults to 30 days, in seconds. | |
| 30 optional int64 cache_duration_sec = 3 [default = 2592000]; | |
|
hamelphi
2017/01/20 18:44:18
What does it mean for a model to be expired? Is th
Roger McFarlane (Chromium)
2017/02/08 23:08:09
Updated thee documentation and dropped the default
| |
| 31 } | |
| 32 | |
| 33 // Defines an envelope/wrapper for general models. | |
| 34 message RankerModel { | |
| 35 // Metadata. | |
| 36 optional RankerModelMetadata metadata = 1; | |
| 37 | |
| 38 oneof model_type { TranslateRankerModel translate = 2; } | |
|
hamelphi
2017/01/20 18:44:18
This could be only 'model'. I find that model_type
Roger McFarlane (Chromium)
2017/02/08 23:08:08
That's not how the proto API works. You don't acce
| |
| 39 } | |
| OLD | NEW |