UNPKG

@google-ai/generativelanguage

Version:
1,235 lines 738 kB
{ "options": { "syntax": "proto3" }, "nested": { "google": { "nested": { "ai": { "nested": { "generativelanguage": { "nested": { "v1": { "options": { "go_package": "cloud.google.com/go/ai/generativelanguage/apiv1/generativelanguagepb;generativelanguagepb", "java_multiple_files": true, "java_outer_classname": "ModelServiceProto", "java_package": "com.google.ai.generativelanguage.v1" }, "nested": { "CitationMetadata": { "fields": { "citationSources": { "rule": "repeated", "type": "CitationSource", "id": 1 } } }, "CitationSource": { "oneofs": { "_startIndex": { "oneof": [ "startIndex" ] }, "_endIndex": { "oneof": [ "endIndex" ] }, "_uri": { "oneof": [ "uri" ] }, "_license": { "oneof": [ "license" ] } }, "fields": { "startIndex": { "type": "int32", "id": 1, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "endIndex": { "type": "int32", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "uri": { "type": "string", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "license": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } } } }, "Modality": { "values": { "MODALITY_UNSPECIFIED": 0, "TEXT": 1, "IMAGE": 2, "VIDEO": 3, "AUDIO": 4, "DOCUMENT": 5 } }, "Content": { "fields": { "parts": { "rule": "repeated", "type": "Part", "id": 1 }, "role": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, "Part": { "oneofs": { "data": { "oneof": [ "text", "inlineData" ] } }, "fields": { "text": { "type": "string", "id": 2 }, "inlineData": { "type": "Blob", "id": 3 } } }, "Blob": { "fields": { "mimeType": { "type": "string", "id": 1 }, "data": { "type": "bytes", "id": 2 } } }, "ModalityTokenCount": { "fields": { "modality": { "type": "Modality", "id": 1 }, "tokenCount": { "type": "int32", "id": 2 } } }, "GenerativeService": { "options": { "(google.api.default_host)": "generativelanguage.googleapis.com" }, "methods": { "GenerateContent": { "requestType": "GenerateContentRequest", "responseType": "GenerateContentResponse", "options": { "(google.api.http).post": "/v1/{model=models/*}:generateContent", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{model=dynamic/*}:generateContent", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "model,contents" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{model=models/*}:generateContent", "body": "*", "additional_bindings": [ { "post": "/v1/{model=tunedModels/*}:generateContent", "body": "*" }, { "post": "/v1/{model=dynamic/*}:generateContent", "body": "*" } ] } }, { "(google.api.method_signature)": "model,contents" } ] }, "StreamGenerateContent": { "requestType": "GenerateContentRequest", "responseType": "GenerateContentResponse", "responseStream": true, "options": { "(google.api.http).post": "/v1/{model=models/*}:streamGenerateContent", "(google.api.http).body": "*", "(google.api.http).additional_bindings.post": "/v1/{model=dynamic/*}:streamGenerateContent", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "model,contents" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{model=models/*}:streamGenerateContent", "body": "*", "additional_bindings": [ { "post": "/v1/{model=tunedModels/*}:streamGenerateContent", "body": "*" }, { "post": "/v1/{model=dynamic/*}:streamGenerateContent", "body": "*" } ] } }, { "(google.api.method_signature)": "model,contents" } ] }, "EmbedContent": { "requestType": "EmbedContentRequest", "responseType": "EmbedContentResponse", "options": { "(google.api.http).post": "/v1/{model=models/*}:embedContent", "(google.api.http).body": "*", "(google.api.method_signature)": "model,content" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{model=models/*}:embedContent", "body": "*" } }, { "(google.api.method_signature)": "model,content" } ] }, "BatchEmbedContents": { "requestType": "BatchEmbedContentsRequest", "responseType": "BatchEmbedContentsResponse", "options": { "(google.api.http).post": "/v1/{model=models/*}:batchEmbedContents", "(google.api.http).body": "*", "(google.api.method_signature)": "model,requests" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{model=models/*}:batchEmbedContents", "body": "*" } }, { "(google.api.method_signature)": "model,requests" } ] }, "CountTokens": { "requestType": "CountTokensRequest", "responseType": "CountTokensResponse", "options": { "(google.api.http).post": "/v1/{model=models/*}:countTokens", "(google.api.http).body": "*", "(google.api.method_signature)": "model,contents" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/{model=models/*}:countTokens", "body": "*" } }, { "(google.api.method_signature)": "model,contents" } ] } } }, "TaskType": { "values": { "TASK_TYPE_UNSPECIFIED": 0, "RETRIEVAL_QUERY": 1, "RETRIEVAL_DOCUMENT": 2, "SEMANTIC_SIMILARITY": 3, "CLASSIFICATION": 4, "CLUSTERING": 5, "QUESTION_ANSWERING": 6, "FACT_VERIFICATION": 7, "CODE_RETRIEVAL_QUERY": 8 } }, "GenerateContentRequest": { "oneofs": { "_generationConfig": { "oneof": [ "generationConfig" ] } }, "fields": { "model": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" } }, "contents": { "rule": "repeated", "type": "Content", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "safetySettings": { "rule": "repeated", "type": "SafetySetting", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "generationConfig": { "type": "GenerationConfig", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } } } }, "GenerationConfig": { "oneofs": { "_candidateCount": { "oneof": [ "candidateCount" ] }, "_maxOutputTokens": { "oneof": [ "maxOutputTokens" ] }, "_temperature": { "oneof": [ "temperature" ] }, "_topP": { "oneof": [ "topP" ] }, "_topK": { "oneof": [ "topK" ] }, "_seed": { "oneof": [ "seed" ] }, "_presencePenalty": { "oneof": [ "presencePenalty" ] }, "_frequencyPenalty": { "oneof": [ "frequencyPenalty" ] }, "_responseLogprobs": { "oneof": [ "responseLogprobs" ] }, "_logprobs": { "oneof": [ "logprobs" ] }, "_enableEnhancedCivicAnswers": { "oneof": [ "enableEnhancedCivicAnswers" ] } }, "fields": { "candidateCount": { "type": "int32", "id": 1, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "stopSequences": { "rule": "repeated", "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "maxOutputTokens": { "type": "int32", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "temperature": { "type": "float", "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "topP": { "type": "float", "id": 6, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "topK": { "type": "int32", "id": 7, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "seed": { "type": "int32", "id": 8, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "presencePenalty": { "type": "float", "id": 15, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "frequencyPenalty": { "type": "float", "id": 16, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "responseLogprobs": { "type": "bool", "id": 17, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "logprobs": { "type": "int32", "id": 18, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "enableEnhancedCivicAnswers": { "type": "bool", "id": 19, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } } } }, "GenerateContentResponse": { "fields": { "candidates": { "rule": "repeated", "type": "Candidate", "id": 1 }, "promptFeedback": { "type": "PromptFeedback", "id": 2 }, "usageMetadata": { "type": "UsageMetadata", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "modelVersion": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } }, "nested": { "PromptFeedback": { "fields": { "blockReason": { "type": "BlockReason", "id": 1, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "safetyRatings": { "rule": "repeated", "type": "SafetyRating", "id": 2 } }, "nested": { "BlockReason": { "values": { "BLOCK_REASON_UNSPECIFIED": 0, "SAFETY": 1, "OTHER": 2, "BLOCKLIST": 3, "PROHIBITED_CONTENT": 4, "IMAGE_SAFETY": 5 } } } }, "UsageMetadata": { "fields": { "promptTokenCount": { "type": "int32", "id": 1 }, "candidatesTokenCount": { "type": "int32", "id": 2 }, "toolUsePromptTokenCount": { "type": "int32", "id": 8, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "thoughtsTokenCount": { "type": "int32", "id": 10, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "totalTokenCount": { "type": "int32", "id": 3 }, "promptTokensDetails": { "rule": "repeated", "type": "ModalityTokenCount", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "cacheTokensDetails": { "rule": "repeated", "type": "ModalityTokenCount", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "candidatesTokensDetails": { "rule": "repeated", "type": "ModalityTokenCount", "id": 7, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "toolUsePromptTokensDetails": { "rule": "repeated", "type": "ModalityTokenCount", "id": 9, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } } } }, "Candidate": { "oneofs": { "_index": { "oneof": [ "index" ] } }, "fields": { "index": { "type": "int32", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } }, "content": { "type": "Content", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "finishReason": { "type": "FinishReason", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "safetyRatings": { "rule": "repeated", "type": "SafetyRating", "id": 5 }, "citationMetadata": { "type": "CitationMetadata", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "tokenCount": { "type": "int32", "id": 7, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "groundingMetadata": { "type": "GroundingMetadata", "id": 9, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "avgLogprobs": { "type": "double", "id": 10, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "logprobsResult": { "type": "LogprobsResult", "id": 11, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } }, "nested": { "FinishReason": { "values": { "FINISH_REASON_UNSPECIFIED": 0, "STOP": 1, "MAX_TOKENS": 2, "SAFETY": 3, "RECITATION": 4, "LANGUAGE": 6, "OTHER": 5, "BLOCKLIST": 7, "PROHIBITED_CONTENT": 8, "SPII": 9, "MALFORMED_FUNCTION_CALL": 10, "IMAGE_SAFETY": 11 } } } }, "LogprobsResult": { "fields": { "topCandidates": { "rule": "repeated", "type": "TopCandidates", "id": 1 }, "chosenCandidates": { "rule": "repeated", "type": "Candidate", "id": 2 } }, "nested": { "Candidate": { "oneofs": { "_token": { "oneof": [ "token" ] }, "_tokenId": { "oneof": [ "tokenId" ] }, "_logProbability": { "oneof": [ "logProbability" ] } }, "fields": { "token": { "type": "string", "id": 1, "options": { "proto3_optional": true } }, "tokenId": { "type": "int32", "id": 3, "options": { "proto3_optional": true } }, "logProbability": { "type": "float", "id": 2, "options": { "proto3_optional": true } } } }, "TopCandidates": { "fields": { "candidates": { "rule": "repeated", "type": "Candidate", "id": 1 } } } } }, "RetrievalMetadata": { "fields": { "googleSearchDynamicRetrievalScore": { "type": "float", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, "GroundingMetadata": { "oneofs": { "_searchEntryPoint": { "oneof": [ "searchEntryPoint" ] }, "_retrievalMetadata": { "oneof": [ "retrievalMetadata" ] } }, "fields": { "searchEntryPoint": { "type": "SearchEntryPoint", "id": 1, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "groundingChunks": { "rule": "repeated", "type": "GroundingChunk", "id": 2 }, "groundingSupports": { "rule": "repeated", "type": "GroundingSupport", "id": 3 }, "retrievalMetadata": { "type": "RetrievalMetadata", "id": 4, "options": { "proto3_optional": true } }, "webSearchQueries": { "rule": "repeated", "type": "string", "id": 5 } } }, "SearchEntryPoint": { "fields": { "renderedContent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "sdkBlob": { "type": "bytes", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, "GroundingChunk": { "oneofs": { "chunkType": { "oneof": [ "web" ] } }, "fields": { "web": { "type": "Web", "id": 1 } }, "nested": { "Web": { "oneofs": { "_uri": { "oneof": [ "uri" ] }, "_title": { "oneof": [ "title" ] } }, "fields": { "uri": { "type": "string", "id": 1, "options": { "proto3_optional": true } }, "title": { "type": "string", "id": 2, "options": { "proto3_optional": true } } } } } }, "Segment": { "fields": { "partIndex": { "type": "int32", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "startIndex": { "type": "int32", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "endIndex": { "type": "int32", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "text": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "GroundingSupport": { "oneofs": { "_segment": { "oneof": [ "segment" ] } }, "fields": { "segment": { "type": "Segment", "id": 1, "options": { "proto3_optional": true } }, "groundingChunkIndices": { "rule": "repeated", "type": "int32", "id": 2 }, "confidenceScores": { "rule": "repeated", "type": "float", "id": 3 } } }, "EmbedContentRequest": { "oneofs": { "_taskType": { "oneof": [ "taskType" ] }, "_title": { "oneof": [ "title" ] }, "_outputDimensionality": { "oneof": [ "outputDimensionality" ] } }, "fields": { "model": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" } }, "content": { "type": "Content", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "taskType": { "type": "TaskType", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "title": { "type": "string", "id": 4, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } }, "outputDimensionality": { "type": "int32", "id": 5, "options": { "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } } } }, "ContentEmbedding": { "fields": { "values": { "rule": "repeated", "type": "float", "id": 1 } } }, "EmbedContentResponse": { "fields": { "embedding": { "type": "ContentEmbedding", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "BatchEmbedContentsRequest": { "fields": { "model": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" } }, "requests": { "rule": "repeated", "type": "EmbedContentRequest", "id": 2, "options": { "(google.api.field_behavior)": "REQUIRED" } } } }, "BatchEmbedContentsResponse": { "fields": { "embeddings": { "rule": "repeated", "type": "ContentEmbedding", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "CountTokensRequest": { "fields": { "model": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", "(google.api.resource_reference).type": "generativelanguage.googleapis.com/Model" } }, "contents": { "rule": "repeated", "type": "Content", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, "generateContentRequest": { "type": "GenerateContentRequest", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, "CountTokensResponse": { "fields": { "totalTokens": { "type": "int32", "id": 1 }, "promptTokensDetails": { "rule": "repeated", "type": "ModalityTokenCount", "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "cacheTokensDetails": { "rule": "repeated", "type": "ModalityTokenCount", "id": 7, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, "HarmCategory": { "values": { "HARM_CATEGORY_UNSPECIFIED": 0, "HARM_CATEGORY_DEROGATORY": 1, "HARM_CATEGORY_TOXICITY": 2, "HARM_CATEGORY_VIOLENCE": 3, "HARM_CATEGORY_SEXUAL": 4, "HARM_CATEGORY_MEDICAL": 5, "HARM_CATEGORY_DANGEROUS": 6, "HARM_CATEGORY_HARASSMENT": 7, "HARM_CATEGORY_HATE_SPEECH": 8, "HARM_CATEGORY_SEXUALLY_EXPLICIT": 9, "HARM_CATEGORY_DANGEROUS_CONTENT": 10, "HARM_CATEGORY_CIVIC_INTEGRITY": 11 } }, "SafetyRating": { "fields": { "category": { "type": "HarmCategory", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "probability": { "type": "HarmProbability", "id": 4, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "blocked": { "type": "bool", "id": 5 } }, "nested": { "HarmProbability": { "values": { "HARM_PROBABILITY_UNSPECIFIED": 0, "NEGLIGIBLE": 1, "LOW": 2, "MEDIUM": 3, "HIGH": 4 } } } }, "SafetySetting": { "fields": { "category": { "type": "HarmCategory", "id": 3, "options": { "(google.api.field_behavior)": "REQUIRED" } }, "threshold": { "type": "HarmBlockThreshold", "id": 4, "options": { "(google.api.field_behavior)": "REQUIRED" } } }, "nested": { "HarmBlockThreshold": { "values": { "HARM_BLOCK_THRESHOLD_UNSPECIFIED": 0, "BLOCK_LOW_AND_ABOVE": 1, "BLOCK_MEDIUM_AND_ABOVE": 2, "BLOCK_ONLY_HIGH": 3, "BLOCK_NONE": 4, "OFF": 5 } } } }, "Model": { "options": { "(google.api.resource).type": "generativelanguage.googleapis.com/Model", "(google.api.resource).pattern": "models/{model}" }, "oneofs": { "_temperature": { "oneof": [ "temperature" ] }, "_maxTemperature": { "oneof": [ "maxTemperature" ] }, "_topP": { "oneof": [ "topP" ] }, "_topK": { "oneof": [ "topK" ] } }, "fields": { "name": { "type": "string", "id": 1, "options": { "(google.api.fie