xref: /aosp_15_r20/external/googleapis/google/cloud/discoveryengine/v1beta/grounding.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.discoveryengine.v1beta;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21
22option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
23option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
24option java_multiple_files = true;
25option java_outer_classname = "GroundingProto";
26option java_package = "com.google.cloud.discoveryengine.v1beta";
27option objc_class_prefix = "DISCOVERYENGINE";
28option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1beta";
29option ruby_package = "Google::Cloud::DiscoveryEngine::V1beta";
30
31// Grounding Fact.
32message GroundingFact {
33  // Text content of the fact. Can be at most 10K characters long.
34  string fact_text = 1;
35
36  // Attributes associated with the fact.
37  // Common attributes include `source` (indicating where the fact was sourced
38  // from), `author` (indicating the author of the fact), and so on.
39  map<string, string> attributes = 2;
40}
41
42// Fact Chunk.
43message FactChunk {
44  // Text content of the fact chunk. Can be at most 10K characters long.
45  string chunk_text = 1;
46
47  // Source from which this fact chunk was retrieved. If it was retrieved
48  // from the GroundingFacts provided in the request then this field will
49  // contain the index of the specific fact from which this chunk was
50  // retrieved.
51  string source = 2;
52
53  // More fine-grained information for the source reference.
54  map<string, string> source_metadata = 3;
55}
56