1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC 2*d5c09012SAndroid Build Coastguard Worker// 3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*d5c09012SAndroid Build Coastguard Worker// 7*d5c09012SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*d5c09012SAndroid Build Coastguard Worker// 9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*d5c09012SAndroid Build Coastguard Worker// limitations under the License. 14*d5c09012SAndroid Build Coastguard Worker 15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3"; 16*d5c09012SAndroid Build Coastguard Worker 17*d5c09012SAndroid Build Coastguard Workerpackage google.ai.generativelanguage.v1beta; 18*d5c09012SAndroid Build Coastguard Worker 19*d5c09012SAndroid Build Coastguard Workerimport "google/api/field_behavior.proto"; 20*d5c09012SAndroid Build Coastguard Worker 21*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/ai/generativelanguage/apiv1beta/generativelanguagepb;generativelanguagepb"; 22*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true; 23*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "CitationProto"; 24*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.ai.generativelanguage.v1beta"; 25*d5c09012SAndroid Build Coastguard Worker 26*d5c09012SAndroid Build Coastguard Worker// A collection of source attributions for a piece of content. 27*d5c09012SAndroid Build Coastguard Workermessage CitationMetadata { 28*d5c09012SAndroid Build Coastguard Worker // Citations to sources for a specific response. 29*d5c09012SAndroid Build Coastguard Worker repeated CitationSource citation_sources = 1; 30*d5c09012SAndroid Build Coastguard Worker} 31*d5c09012SAndroid Build Coastguard Worker 32*d5c09012SAndroid Build Coastguard Worker// A citation to a source for a portion of a specific response. 33*d5c09012SAndroid Build Coastguard Workermessage CitationSource { 34*d5c09012SAndroid Build Coastguard Worker // Optional. Start of segment of the response that is attributed to this 35*d5c09012SAndroid Build Coastguard Worker // source. 36*d5c09012SAndroid Build Coastguard Worker // 37*d5c09012SAndroid Build Coastguard Worker // Index indicates the start of the segment, measured in bytes. 38*d5c09012SAndroid Build Coastguard Worker optional int32 start_index = 1 [(google.api.field_behavior) = OPTIONAL]; 39*d5c09012SAndroid Build Coastguard Worker 40*d5c09012SAndroid Build Coastguard Worker // Optional. End of the attributed segment, exclusive. 41*d5c09012SAndroid Build Coastguard Worker optional int32 end_index = 2 [(google.api.field_behavior) = OPTIONAL]; 42*d5c09012SAndroid Build Coastguard Worker 43*d5c09012SAndroid Build Coastguard Worker // Optional. URI that is attributed as a source for a portion of the text. 44*d5c09012SAndroid Build Coastguard Worker optional string uri = 3 [(google.api.field_behavior) = OPTIONAL]; 45*d5c09012SAndroid Build Coastguard Worker 46*d5c09012SAndroid Build Coastguard Worker // Optional. License for the GitHub project that is attributed as a source for 47*d5c09012SAndroid Build Coastguard Worker // segment. 48*d5c09012SAndroid Build Coastguard Worker // 49*d5c09012SAndroid Build Coastguard Worker // License info is required for code citations. 50*d5c09012SAndroid Build Coastguard Worker optional string license = 4 [(google.api.field_behavior) = OPTIONAL]; 51*d5c09012SAndroid Build Coastguard Worker} 52