| // 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. |
| |
| syntax = "proto3"; |
| |
| package optimization_guide.proto; |
| |
| import "components/optimization_guide/proto/features/common_quality_data.proto"; |
| |
| option optimize_for = LITE_RUNTIME; |
| option java_package = "org.chromium.components.optimization_guide.features.proto"; |
| |
| option java_outer_classname = "HistoryDocumentProto"; |
| |
| // DO NOT EDIT THIS FILE DIRECTLY! |
| // |
| // This file is generated in g3 and then synced to Chrome. Instead, please |
| // refer to http://go/chrome-intelligence-feature-protos (Google-internal link), |
| // and then changes will be synced with Chrome automatically. |
| |
| message HistoryDocumentLoggingData { |
| HistoryDocumentRequest request = 1; |
| |
| HistoryDocumentResponse response = 2; |
| } |
| |
| // Next ID: 2 |
| message HistoryDocumentRequest { |
| // The documents to compute embeddings from. This is repeated to support |
| // batching and reducing the number of requests to the model execution server. |
| // The caller must ensure that no two documents have the same URL. |
| repeated Document documents = 1; |
| } |
| |
| // Protos for the AiData representing the flow where Chrome sends a batch of |
| // documents to the server and the server returns an embedding for each of those |
| // documents. There is no quality data because there is no relevant user |
| // interaction for this step. |
| |
| // Next ID: 4 |
| message Document { |
| // The ID of the document. Only guaranteed to be unique within this request. |
| // This is provided by the client and is opaque to the server. |
| uint64 id = 1; |
| |
| // The URL of the document. |
| string url = 2; |
| |
| // The passages for the document. |
| repeated string passages = 3; |
| } |
| |
| // Next ID: 2 |
| message HistoryDocumentResponse { |
| // The embeddings for each document. It is not guaranteed that this will |
| // contain all the documents from the request or that the ordering remains |
| // the same. Instead, matching with the request document should be done by |
| // looking at the document ID. |
| repeated DocumentWithEmbeddings embeddings = 1; |
| } |
| |
| // Next ID: 3 |
| message DocumentWithEmbeddings { |
| // The ID of the document. Corresponds to the ID used in Document. |
| uint64 id = 1; |
| |
| repeated Embedding embeddings = 2; |
| } |