blob: 4f56565977aaedb7e689da3a995aea04ee21109e [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Protocol buffer definition for a delta file.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package journey;
message BatchGetSwitcherJourneyFromPageloadRequest {
// Next ID to use: 5
// The timestamps of the pageloads to request journeys from. This will be
// ignored if task_id is present.
// TODO(ghyde): Deprecate this once client moves over.
repeated int64 page_timestamp_usec = 1;
// Override journey creation parameters.
optional JourneyCreationOverrides journey_overrides = 2;
// The maximum number of pageloads allowed per autotabs.
optional int64 max_pageloads = 3 [default = 50];
// The task ids frokm the client to request journeys from.
repeated int64 task_id = 4;
}
message JourneyCreationOverrides {
optional JourneyAlgorithmParameters journey_algorithm_parameters = 1;
}
message JourneyAlgorithmParameters {
// Next ID to use: 11
// Similarity threshold in [0,1]. Clusters with similarity greater
// then this threshold and which were done in short timespans will be
// merged. If set to 1, non temporal merging is performed.
optional float temporal_merge_threshold = 1 [default = 1];
// Similarity threshold in [0,1]. Threshold above which journeys are
// considered to be related to each other.
optional float semantically_related_threshold = 2 [default = 0.1];
// Similarity threshold in [0, 1]. Threshold above which journeys appear in
// searches for a given query.
optional float search_threshold = 3 [default = 0.1];
// If true, dedupe pageloads in journeys by URL. remove_duplicate_titles
// and remove_duplicates_between_tasks will only be used if this value is
// true.
optional bool remove_duplicate_urls = 6 [default = true];
// If true, remove URLs as duplicates if they are from the same domain and
// have the same title. Otherwise, only remove duplicate URLs that have
// identical URLs.
// This value is only used if remove_duplicate_urls is also true.
optional bool remove_duplicate_titles = 4 [default = true];
// If true, remove duplicates across the whole journey. Otherwise,
// only remove duplicates within each task.
// Note: This value is only used if remove_duplicate_urls is also true.
optional bool remove_duplicates_between_tasks = 7 [default = false];
// Type of labels to use for subtitles.
enum SubtitleTermsType {
TYPE_UNKNOWN = 0;
// Use knowledge entities as subtitle terms.
TYPE_KE = 1;
// Use petacat as subtitle terms.
TYPE_PETACAT = 2;
}
optional SubtitleTermsType subtitle_type = 5 [default = TYPE_KE];
// If set to true, bookmarks will be fetched and pageloads will be annotated
// with them.
optional bool get_bookmarks = 8 [default = false];
// The number of days between tasks in the same cluster required in order
// to break into a new journey.
optional int32 journey_break_days = 9 [default = 7];
// The max number of pageloads to be added to a journey.
// NOTE: We will actually add tasks as long as we are under this limit, so
// it is possible that the last task pushes us over.
optional int32 max_pages_in_journey = 10 [default = 500];
}