Package cloud.google.com/go/ai/generativelanguage/apiv1alpha/generativelanguagepb (v0.13.0)

Constants

CacheService_ListCachedContents_FullMethodName, CacheService_CreateCachedContent_FullMethodName, CacheService_GetCachedContent_FullMethodName, CacheService_UpdateCachedContent_FullMethodName, CacheService_DeleteCachedContent_FullMethodName

const (
	CacheService_ListCachedContents_FullMethodName  = "/google.ai.generativelanguage.v1alpha.CacheService/ListCachedContents"
	CacheService_CreateCachedContent_FullMethodName = "/google.ai.generativelanguage.v1alpha.CacheService/CreateCachedContent"
	CacheService_GetCachedContent_FullMethodName    = "/google.ai.generativelanguage.v1alpha.CacheService/GetCachedContent"
	CacheService_UpdateCachedContent_FullMethodName = "/google.ai.generativelanguage.v1alpha.CacheService/UpdateCachedContent"
	CacheService_DeleteCachedContent_FullMethodName = "/google.ai.generativelanguage.v1alpha.CacheService/DeleteCachedContent"
)

DiscussService_GenerateMessage_FullMethodName, DiscussService_CountMessageTokens_FullMethodName

const (
	DiscussService_GenerateMessage_FullMethodName    = "/google.ai.generativelanguage.v1alpha.DiscussService/GenerateMessage"
	DiscussService_CountMessageTokens_FullMethodName = "/google.ai.generativelanguage.v1alpha.DiscussService/CountMessageTokens"
)

FileService_CreateFile_FullMethodName, FileService_ListFiles_FullMethodName, FileService_GetFile_FullMethodName, FileService_DeleteFile_FullMethodName

const (
	FileService_CreateFile_FullMethodName = "/google.ai.generativelanguage.v1alpha.FileService/CreateFile"
	FileService_ListFiles_FullMethodName  = "/google.ai.generativelanguage.v1alpha.FileService/ListFiles"
	FileService_GetFile_FullMethodName    = "/google.ai.generativelanguage.v1alpha.FileService/GetFile"
	FileService_DeleteFile_FullMethodName = "/google.ai.generativelanguage.v1alpha.FileService/DeleteFile"
)

GenerativeService_GenerateContent_FullMethodName, GenerativeService_GenerateAnswer_FullMethodName, GenerativeService_StreamGenerateContent_FullMethodName, GenerativeService_EmbedContent_FullMethodName, GenerativeService_BatchEmbedContents_FullMethodName, GenerativeService_CountTokens_FullMethodName, GenerativeService_BidiGenerateContent_FullMethodName

const (
	GenerativeService_GenerateContent_FullMethodName       = "/google.ai.generativelanguage.v1alpha.GenerativeService/GenerateContent"
	GenerativeService_GenerateAnswer_FullMethodName        = "/google.ai.generativelanguage.v1alpha.GenerativeService/GenerateAnswer"
	GenerativeService_StreamGenerateContent_FullMethodName = "/google.ai.generativelanguage.v1alpha.GenerativeService/StreamGenerateContent"
	GenerativeService_EmbedContent_FullMethodName          = "/google.ai.generativelanguage.v1alpha.GenerativeService/EmbedContent"
	GenerativeService_BatchEmbedContents_FullMethodName    = "/google.ai.generativelanguage.v1alpha.GenerativeService/BatchEmbedContents"
	GenerativeService_CountTokens_FullMethodName           = "/google.ai.generativelanguage.v1alpha.GenerativeService/CountTokens"
	GenerativeService_BidiGenerateContent_FullMethodName   = "/google.ai.generativelanguage.v1alpha.GenerativeService/BidiGenerateContent"
)

ModelService_GetModel_FullMethodName, ModelService_ListModels_FullMethodName, ModelService_GetTunedModel_FullMethodName, ModelService_ListTunedModels_FullMethodName, ModelService_CreateTunedModel_FullMethodName, ModelService_UpdateTunedModel_FullMethodName, ModelService_DeleteTunedModel_FullMethodName

const (
	ModelService_GetModel_FullMethodName         = "/google.ai.generativelanguage.v1alpha.ModelService/GetModel"
	ModelService_ListModels_FullMethodName       = "/google.ai.generativelanguage.v1alpha.ModelService/ListModels"
	ModelService_GetTunedModel_FullMethodName    = "/google.ai.generativelanguage.v1alpha.ModelService/GetTunedModel"
	ModelService_ListTunedModels_FullMethodName  = "/google.ai.generativelanguage.v1alpha.ModelService/ListTunedModels"
	ModelService_CreateTunedModel_FullMethodName = "/google.ai.generativelanguage.v1alpha.ModelService/CreateTunedModel"
	ModelService_UpdateTunedModel_FullMethodName = "/google.ai.generativelanguage.v1alpha.ModelService/UpdateTunedModel"
	ModelService_DeleteTunedModel_FullMethodName = "/google.ai.generativelanguage.v1alpha.ModelService/DeleteTunedModel"
)

PermissionService_CreatePermission_FullMethodName, PermissionService_GetPermission_FullMethodName, PermissionService_ListPermissions_FullMethodName, PermissionService_UpdatePermission_FullMethodName, PermissionService_DeletePermission_FullMethodName, PermissionService_TransferOwnership_FullMethodName

const (
	PermissionService_CreatePermission_FullMethodName  = "/google.ai.generativelanguage.v1alpha.PermissionService/CreatePermission"
	PermissionService_GetPermission_FullMethodName     = "/google.ai.generativelanguage.v1alpha.PermissionService/GetPermission"
	PermissionService_ListPermissions_FullMethodName   = "/google.ai.generativelanguage.v1alpha.PermissionService/ListPermissions"
	PermissionService_UpdatePermission_FullMethodName  = "/google.ai.generativelanguage.v1alpha.PermissionService/UpdatePermission"
	PermissionService_DeletePermission_FullMethodName  = "/google.ai.generativelanguage.v1alpha.PermissionService/DeletePermission"
	PermissionService_TransferOwnership_FullMethodName = "/google.ai.generativelanguage.v1alpha.PermissionService/TransferOwnership"
)

RetrieverService_CreateCorpus_FullMethodName, RetrieverService_GetCorpus_FullMethodName, RetrieverService_UpdateCorpus_FullMethodName, RetrieverService_DeleteCorpus_FullMethodName, RetrieverService_ListCorpora_FullMethodName, RetrieverService_QueryCorpus_FullMethodName, RetrieverService_CreateDocument_FullMethodName, RetrieverService_GetDocument_FullMethodName, RetrieverService_UpdateDocument_FullMethodName, RetrieverService_DeleteDocument_FullMethodName, RetrieverService_ListDocuments_FullMethodName, RetrieverService_QueryDocument_FullMethodName, RetrieverService_CreateChunk_FullMethodName, RetrieverService_BatchCreateChunks_FullMethodName, RetrieverService_GetChunk_FullMethodName, RetrieverService_UpdateChunk_FullMethodName, RetrieverService_BatchUpdateChunks_FullMethodName, RetrieverService_DeleteChunk_FullMethodName, RetrieverService_BatchDeleteChunks_FullMethodName, RetrieverService_ListChunks_FullMethodName

const (
	RetrieverService_CreateCorpus_FullMethodName      = "/google.ai.generativelanguage.v1alpha.RetrieverService/CreateCorpus"
	RetrieverService_GetCorpus_FullMethodName         = "/google.ai.generativelanguage.v1alpha.RetrieverService/GetCorpus"
	RetrieverService_UpdateCorpus_FullMethodName      = "/google.ai.generativelanguage.v1alpha.RetrieverService/UpdateCorpus"
	RetrieverService_DeleteCorpus_FullMethodName      = "/google.ai.generativelanguage.v1alpha.RetrieverService/DeleteCorpus"
	RetrieverService_ListCorpora_FullMethodName       = "/google.ai.generativelanguage.v1alpha.RetrieverService/ListCorpora"
	RetrieverService_QueryCorpus_FullMethodName       = "/google.ai.generativelanguage.v1alpha.RetrieverService/QueryCorpus"
	RetrieverService_CreateDocument_FullMethodName    = "/google.ai.generativelanguage.v1alpha.RetrieverService/CreateDocument"
	RetrieverService_GetDocument_FullMethodName       = "/google.ai.generativelanguage.v1alpha.RetrieverService/GetDocument"
	RetrieverService_UpdateDocument_FullMethodName    = "/google.ai.generativelanguage.v1alpha.RetrieverService/UpdateDocument"
	RetrieverService_DeleteDocument_FullMethodName    = "/google.ai.generativelanguage.v1alpha.RetrieverService/DeleteDocument"
	RetrieverService_ListDocuments_FullMethodName     = "/google.ai.generativelanguage.v1alpha.RetrieverService/ListDocuments"
	RetrieverService_QueryDocument_FullMethodName     = "/google.ai.generativelanguage.v1alpha.RetrieverService/QueryDocument"
	RetrieverService_CreateChunk_FullMethodName       = "/google.ai.generativelanguage.v1alpha.RetrieverService/CreateChunk"
	RetrieverService_BatchCreateChunks_FullMethodName = "/google.ai.generativelanguage.v1alpha.RetrieverService/BatchCreateChunks"
	RetrieverService_GetChunk_FullMethodName          = "/google.ai.generativelanguage.v1alpha.RetrieverService/GetChunk"
	RetrieverService_UpdateChunk_FullMethodName       = "/google.ai.generativelanguage.v1alpha.RetrieverService/UpdateChunk"
	RetrieverService_BatchUpdateChunks_FullMethodName = "/google.ai.generativelanguage.v1alpha.RetrieverService/BatchUpdateChunks"
	RetrieverService_DeleteChunk_FullMethodName       = "/google.ai.generativelanguage.v1alpha.RetrieverService/DeleteChunk"
	RetrieverService_BatchDeleteChunks_FullMethodName = "/google.ai.generativelanguage.v1alpha.RetrieverService/BatchDeleteChunks"
	RetrieverService_ListChunks_FullMethodName        = "/google.ai.generativelanguage.v1alpha.RetrieverService/ListChunks"
)

TextService_GenerateText_FullMethodName, TextService_EmbedText_FullMethodName, TextService_BatchEmbedText_FullMethodName, TextService_CountTextTokens_FullMethodName

const (
	TextService_GenerateText_FullMethodName    = "/google.ai.generativelanguage.v1alpha.TextService/GenerateText"
	TextService_EmbedText_FullMethodName       = "/google.ai.generativelanguage.v1alpha.TextService/EmbedText"
	TextService_BatchEmbedText_FullMethodName  = "/google.ai.generativelanguage.v1alpha.TextService/BatchEmbedText"
	TextService_CountTextTokens_FullMethodName = "/google.ai.generativelanguage.v1alpha.TextService/CountTextTokens"
)

PredictionService_Predict_FullMethodName

const (
	PredictionService_Predict_FullMethodName = "/google.ai.generativelanguage.v1alpha.PredictionService/Predict"
)

Variables

Type_name, Type_value

var (
	Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "STRING",
		2: "NUMBER",
		3: "INTEGER",
		4: "BOOLEAN",
		5: "ARRAY",
		6: "OBJECT",
	}
	Type_value = map[string]int32{
		"TYPE_UNSPECIFIED": 0,
		"STRING":           1,
		"NUMBER":           2,
		"INTEGER":          3,
		"BOOLEAN":          4,
		"ARRAY":            5,
		"OBJECT":           6,
	}
)

Enum value maps for Type.

ExecutableCode_Language_name, ExecutableCode_Language_value

var (
	ExecutableCode_Language_name = map[int32]string{
		0: "LANGUAGE_UNSPECIFIED",
		1: "PYTHON",
	}
	ExecutableCode_Language_value = map[string]int32{
		"LANGUAGE_UNSPECIFIED": 0,
		"PYTHON":               1,
	}
)

Enum value maps for ExecutableCode_Language.

CodeExecutionResult_Outcome_name, CodeExecutionResult_Outcome_value

var (
	CodeExecutionResult_Outcome_name = map[int32]string{
		0: "OUTCOME_UNSPECIFIED",
		1: "OUTCOME_OK",
		2: "OUTCOME_FAILED",
		3: "OUTCOME_DEADLINE_EXCEEDED",
	}
	CodeExecutionResult_Outcome_value = map[string]int32{
		"OUTCOME_UNSPECIFIED":       0,
		"OUTCOME_OK":                1,
		"OUTCOME_FAILED":            2,
		"OUTCOME_DEADLINE_EXCEEDED": 3,
	}
)

Enum value maps for CodeExecutionResult_Outcome.

DynamicRetrievalConfig_Mode_name, DynamicRetrievalConfig_Mode_value

var (
	DynamicRetrievalConfig_Mode_name = map[int32]string{
		0: "MODE_UNSPECIFIED",
		1: "MODE_DYNAMIC",
	}
	DynamicRetrievalConfig_Mode_value = map[string]int32{
		"MODE_UNSPECIFIED": 0,
		"MODE_DYNAMIC":     1,
	}
)

Enum value maps for DynamicRetrievalConfig_Mode.

FunctionCallingConfig_Mode_name, FunctionCallingConfig_Mode_value

var (
	FunctionCallingConfig_Mode_name = map[int32]string{
		0: "MODE_UNSPECIFIED",
		1: "AUTO",
		2: "ANY",
		3: "NONE",
	}
	FunctionCallingConfig_Mode_value = map[string]int32{
		"MODE_UNSPECIFIED": 0,
		"AUTO":             1,
		"ANY":              2,
		"NONE":             3,
	}
)

Enum value maps for FunctionCallingConfig_Mode.

File_State_name, File_State_value

var (
	File_State_name = map[int32]string{
		0:  "STATE_UNSPECIFIED",
		1:  "PROCESSING",
		2:  "ACTIVE",
		10: "FAILED",
	}
	File_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"PROCESSING":        1,
		"ACTIVE":            2,
		"FAILED":            10,
	}
)

Enum value maps for File_State.

TaskType_name, TaskType_value

var (
	TaskType_name = map[int32]string{
		0: "TASK_TYPE_UNSPECIFIED",
		1: "RETRIEVAL_QUERY",
		2: "RETRIEVAL_DOCUMENT",
		3: "SEMANTIC_SIMILARITY",
		4: "CLASSIFICATION",
		5: "CLUSTERING",
		6: "QUESTION_ANSWERING",
		7: "FACT_VERIFICATION",
	}
	TaskType_value = map[string]int32{
		"TASK_TYPE_UNSPECIFIED": 0,
		"RETRIEVAL_QUERY":       1,
		"RETRIEVAL_DOCUMENT":    2,
		"SEMANTIC_SIMILARITY":   3,
		"CLASSIFICATION":        4,
		"CLUSTERING":            5,
		"QUESTION_ANSWERING":    6,
		"FACT_VERIFICATION":     7,
	}
)

Enum value maps for TaskType.

GenerationConfig_Modality_name, GenerationConfig_Modality_value

var (
	GenerationConfig_Modality_name = map[int32]string{
		0: "MODALITY_UNSPECIFIED",
		1: "TEXT",
		2: "IMAGE",
		3: "AUDIO",
	}
	GenerationConfig_Modality_value = map[string]int32{
		"MODALITY_UNSPECIFIED": 0,
		"TEXT":                 1,
		"IMAGE":                2,
		"AUDIO":                3,
	}
)

Enum value maps for GenerationConfig_Modality.

GenerateContentResponse_PromptFeedback_BlockReason_name, GenerateContentResponse_PromptFeedback_BlockReason_value

var (
	GenerateContentResponse_PromptFeedback_BlockReason_name = map[int32]string{
		0: "BLOCK_REASON_UNSPECIFIED",
		1: "SAFETY",
		2: "OTHER",
		3: "BLOCKLIST",
		4: "PROHIBITED_CONTENT",
		5: "IMAGE_SAFETY",
	}
	GenerateContentResponse_PromptFeedback_BlockReason_value = map[string]int32{
		"BLOCK_REASON_UNSPECIFIED": 0,
		"SAFETY":                   1,
		"OTHER":                    2,
		"BLOCKLIST":                3,
		"PROHIBITED_CONTENT":       4,
		"IMAGE_SAFETY":             5,
	}
)

Enum value maps for GenerateContentResponse_PromptFeedback_BlockReason.

Candidate_FinishReason_name, Candidate_FinishReason_value

var (
	Candidate_FinishReason_name = map[int32]string{
		0:  "FINISH_REASON_UNSPECIFIED",
		1:  "STOP",
		2:  "MAX_TOKENS",
		3:  "SAFETY",
		4:  "RECITATION",
		6:  "LANGUAGE",
		5:  "OTHER",
		7:  "BLOCKLIST",
		8:  "PROHIBITED_CONTENT",
		9:  "SPII",
		10: "MALFORMED_FUNCTION_CALL",
		11: "IMAGE_SAFETY",
	}
	Candidate_FinishReason_value = map[string]int32{
		"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,
	}
)

Enum value maps for Candidate_FinishReason.

GenerateAnswerRequest_AnswerStyle_name, GenerateAnswerRequest_AnswerStyle_value

var (
	GenerateAnswerRequest_AnswerStyle_name = map[int32]string{
		0: "ANSWER_STYLE_UNSPECIFIED",
		1: "ABSTRACTIVE",
		2: "EXTRACTIVE",
		3: "VERBOSE",
	}
	GenerateAnswerRequest_AnswerStyle_value = map[string]int32{
		"ANSWER_STYLE_UNSPECIFIED": 0,
		"ABSTRACTIVE":              1,
		"EXTRACTIVE":               2,
		"VERBOSE":                  3,
	}
)

Enum value maps for GenerateAnswerRequest_AnswerStyle.

GenerateAnswerResponse_InputFeedback_BlockReason_name, GenerateAnswerResponse_InputFeedback_BlockReason_value

var (
	GenerateAnswerResponse_InputFeedback_BlockReason_name = map[int32]string{
		0: "BLOCK_REASON_UNSPECIFIED",
		1: "SAFETY",
		2: "OTHER",
	}
	GenerateAnswerResponse_InputFeedback_BlockReason_value = map[string]int32{
		"BLOCK_REASON_UNSPECIFIED": 0,
		"SAFETY":                   1,
		"OTHER":                    2,
	}
)

Enum value maps for GenerateAnswerResponse_InputFeedback_BlockReason.

Permission_GranteeType_name, Permission_GranteeType_value

var (
	Permission_GranteeType_name = map[int32]string{
		0: "GRANTEE_TYPE_UNSPECIFIED",
		1: "USER",
		2: "GROUP",
		3: "EVERYONE",
	}
	Permission_GranteeType_value = map[string]int32{
		"GRANTEE_TYPE_UNSPECIFIED": 0,
		"USER":                     1,
		"GROUP":                    2,
		"EVERYONE":                 3,
	}
)

Enum value maps for Permission_GranteeType.

Permission_Role_name, Permission_Role_value

var (
	Permission_Role_name = map[int32]string{
		0: "ROLE_UNSPECIFIED",
		1: "OWNER",
		2: "WRITER",
		3: "READER",
	}
	Permission_Role_value = map[string]int32{
		"ROLE_UNSPECIFIED": 0,
		"OWNER":            1,
		"WRITER":           2,
		"READER":           3,
	}
)

Enum value maps for Permission_Role.

Condition_Operator_name, Condition_Operator_value

var (
	Condition_Operator_name = map[int32]string{
		0: "OPERATOR_UNSPECIFIED",
		1: "LESS",
		2: "LESS_EQUAL",
		3: "EQUAL",
		4: "GREATER_EQUAL",
		5: "GREATER",
		6: "NOT_EQUAL",
		7: "INCLUDES",
		8: "EXCLUDES",
	}
	Condition_Operator_value = map[string]int32{
		"OPERATOR_UNSPECIFIED": 0,
		"LESS":                 1,
		"LESS_EQUAL":           2,
		"EQUAL":                3,
		"GREATER_EQUAL":        4,
		"GREATER":              5,
		"NOT_EQUAL":            6,
		"INCLUDES":             7,
		"EXCLUDES":             8,
	}
)

Enum value maps for Condition_Operator.

Chunk_State_name, Chunk_State_value

var (
	Chunk_State_name = map[int32]string{
		0:  "STATE_UNSPECIFIED",
		1:  "STATE_PENDING_PROCESSING",
		2:  "STATE_ACTIVE",
		10: "STATE_FAILED",
	}
	Chunk_State_value = map[string]int32{
		"STATE_UNSPECIFIED":        0,
		"STATE_PENDING_PROCESSING": 1,
		"STATE_ACTIVE":             2,
		"STATE_FAILED":             10,
	}
)

Enum value maps for Chunk_State.

HarmCategory_name, HarmCategory_value

var (
	HarmCategory_name = map[int32]string{
		0:  "HARM_CATEGORY_UNSPECIFIED",
		1:  "HARM_CATEGORY_DEROGATORY",
		2:  "HARM_CATEGORY_TOXICITY",
		3:  "HARM_CATEGORY_VIOLENCE",
		4:  "HARM_CATEGORY_SEXUAL",
		5:  "HARM_CATEGORY_MEDICAL",
		6:  "HARM_CATEGORY_DANGEROUS",
		7:  "HARM_CATEGORY_HARASSMENT",
		8:  "HARM_CATEGORY_HATE_SPEECH",
		9:  "HARM_CATEGORY_SEXUALLY_EXPLICIT",
		10: "HARM_CATEGORY_DANGEROUS_CONTENT",
		11: "HARM_CATEGORY_CIVIC_INTEGRITY",
	}
	HarmCategory_value = map[string]int32{
		"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,
	}
)

Enum value maps for HarmCategory.

ContentFilter_BlockedReason_name, ContentFilter_BlockedReason_value

var (
	ContentFilter_BlockedReason_name = map[int32]string{
		0: "BLOCKED_REASON_UNSPECIFIED",
		1: "SAFETY",
		2: "OTHER",
	}
	ContentFilter_BlockedReason_value = map[string]int32{
		"BLOCKED_REASON_UNSPECIFIED": 0,
		"SAFETY":                     1,
		"OTHER":                      2,
	}
)

Enum value maps for ContentFilter_BlockedReason.

SafetyRating_HarmProbability_name, SafetyRating_HarmProbability_value

var (
	SafetyRating_HarmProbability_name = map[int32]string{
		0: "HARM_PROBABILITY_UNSPECIFIED",
		1: "NEGLIGIBLE",
		2: "LOW",
		3: "MEDIUM",
		4: "HIGH",
	}
	SafetyRating_HarmProbability_value = map[string]int32{
		"HARM_PROBABILITY_UNSPECIFIED": 0,
		"NEGLIGIBLE":                   1,
		"LOW":                          2,
		"MEDIUM":                       3,
		"HIGH":                         4,
	}
)

Enum value maps for SafetyRating_HarmProbability.

SafetySetting_HarmBlockThreshold_name, SafetySetting_HarmBlockThreshold_value

var (
	SafetySetting_HarmBlockThreshold_name = map[int32]string{
		0: "HARM_BLOCK_THRESHOLD_UNSPECIFIED",
		1: "BLOCK_LOW_AND_ABOVE",
		2: "BLOCK_MEDIUM_AND_ABOVE",
		3: "BLOCK_ONLY_HIGH",
		4: "BLOCK_NONE",
		5: "OFF",
	}
	SafetySetting_HarmBlockThreshold_value = map[string]int32{
		"HARM_BLOCK_THRESHOLD_UNSPECIFIED": 0,
		"BLOCK_LOW_AND_ABOVE":              1,
		"BLOCK_MEDIUM_AND_ABOVE":           2,
		"BLOCK_ONLY_HIGH":                  3,
		"BLOCK_NONE":                       4,
		"OFF":                              5,
	}
)

Enum value maps for SafetySetting_HarmBlockThreshold.

TunedModel_State_name, TunedModel_State_value

var (
	TunedModel_State_name = map[int32]string{
		0: "STATE_UNSPECIFIED",
		1: "CREATING",
		2: "ACTIVE",
		3: "FAILED",
	}
	TunedModel_State_value = map[string]int32{
		"STATE_UNSPECIFIED": 0,
		"CREATING":          1,
		"ACTIVE":            2,
		"FAILED":            3,
	}
)

Enum value maps for TunedModel_State.

CacheService_ServiceDesc

var CacheService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.CacheService",
	HandlerType: (*CacheServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListCachedContents",
			Handler:    _CacheService_ListCachedContents_Handler,
		},
		{
			MethodName: "CreateCachedContent",
			Handler:    _CacheService_CreateCachedContent_Handler,
		},
		{
			MethodName: "GetCachedContent",
			Handler:    _CacheService_GetCachedContent_Handler,
		},
		{
			MethodName: "UpdateCachedContent",
			Handler:    _CacheService_UpdateCachedContent_Handler,
		},
		{
			MethodName: "DeleteCachedContent",
			Handler:    _CacheService_DeleteCachedContent_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/cache_service.proto",
}

CacheService_ServiceDesc is the grpc.ServiceDesc for CacheService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

DiscussService_ServiceDesc

var DiscussService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.DiscussService",
	HandlerType: (*DiscussServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateMessage",
			Handler:    _DiscussService_GenerateMessage_Handler,
		},
		{
			MethodName: "CountMessageTokens",
			Handler:    _DiscussService_CountMessageTokens_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/discuss_service.proto",
}

DiscussService_ServiceDesc is the grpc.ServiceDesc for DiscussService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

FileService_ServiceDesc

var FileService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.FileService",
	HandlerType: (*FileServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateFile",
			Handler:    _FileService_CreateFile_Handler,
		},
		{
			MethodName: "ListFiles",
			Handler:    _FileService_ListFiles_Handler,
		},
		{
			MethodName: "GetFile",
			Handler:    _FileService_GetFile_Handler,
		},
		{
			MethodName: "DeleteFile",
			Handler:    _FileService_DeleteFile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/file_service.proto",
}

FileService_ServiceDesc is the grpc.ServiceDesc for FileService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

File_google_ai_generativelanguage_v1alpha_cache_service_proto

var File_google_ai_generativelanguage_v1alpha_cache_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_cached_content_proto

var File_google_ai_generativelanguage_v1alpha_cached_content_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_citation_proto

var File_google_ai_generativelanguage_v1alpha_citation_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_content_proto

var File_google_ai_generativelanguage_v1alpha_content_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_discuss_service_proto

var File_google_ai_generativelanguage_v1alpha_discuss_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_file_proto

var File_google_ai_generativelanguage_v1alpha_file_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_file_service_proto

var File_google_ai_generativelanguage_v1alpha_file_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_generative_service_proto

var File_google_ai_generativelanguage_v1alpha_generative_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_model_proto

var File_google_ai_generativelanguage_v1alpha_model_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_model_service_proto

var File_google_ai_generativelanguage_v1alpha_model_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_permission_proto

var File_google_ai_generativelanguage_v1alpha_permission_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_permission_service_proto

var File_google_ai_generativelanguage_v1alpha_permission_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_prediction_service_proto

var File_google_ai_generativelanguage_v1alpha_prediction_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_retriever_proto

var File_google_ai_generativelanguage_v1alpha_retriever_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_retriever_service_proto

var File_google_ai_generativelanguage_v1alpha_retriever_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_safety_proto

var File_google_ai_generativelanguage_v1alpha_safety_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_text_service_proto

var File_google_ai_generativelanguage_v1alpha_text_service_proto protoreflect.FileDescriptor

File_google_ai_generativelanguage_v1alpha_tuned_model_proto

var File_google_ai_generativelanguage_v1alpha_tuned_model_proto protoreflect.FileDescriptor

GenerativeService_ServiceDesc

var GenerativeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.GenerativeService",
	HandlerType: (*GenerativeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateContent",
			Handler:    _GenerativeService_GenerateContent_Handler,
		},
		{
			MethodName: "GenerateAnswer",
			Handler:    _GenerativeService_GenerateAnswer_Handler,
		},
		{
			MethodName: "EmbedContent",
			Handler:    _GenerativeService_EmbedContent_Handler,
		},
		{
			MethodName: "BatchEmbedContents",
			Handler:    _GenerativeService_BatchEmbedContents_Handler,
		},
		{
			MethodName: "CountTokens",
			Handler:    _GenerativeService_CountTokens_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamGenerateContent",
			Handler:       _GenerativeService_StreamGenerateContent_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "BidiGenerateContent",
			Handler:       _GenerativeService_BidiGenerateContent_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "google/ai/generativelanguage/v1alpha/generative_service.proto",
}

GenerativeService_ServiceDesc is the grpc.ServiceDesc for GenerativeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

ModelService_ServiceDesc

var ModelService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.ModelService",
	HandlerType: (*ModelServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetModel",
			Handler:    _ModelService_GetModel_Handler,
		},
		{
			MethodName: "ListModels",
			Handler:    _ModelService_ListModels_Handler,
		},
		{
			MethodName: "GetTunedModel",
			Handler:    _ModelService_GetTunedModel_Handler,
		},
		{
			MethodName: "ListTunedModels",
			Handler:    _ModelService_ListTunedModels_Handler,
		},
		{
			MethodName: "CreateTunedModel",
			Handler:    _ModelService_CreateTunedModel_Handler,
		},
		{
			MethodName: "UpdateTunedModel",
			Handler:    _ModelService_UpdateTunedModel_Handler,
		},
		{
			MethodName: "DeleteTunedModel",
			Handler:    _ModelService_DeleteTunedModel_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/model_service.proto",
}

ModelService_ServiceDesc is the grpc.ServiceDesc for ModelService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

PermissionService_ServiceDesc

var PermissionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.PermissionService",
	HandlerType: (*PermissionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePermission",
			Handler:    _PermissionService_CreatePermission_Handler,
		},
		{
			MethodName: "GetPermission",
			Handler:    _PermissionService_GetPermission_Handler,
		},
		{
			MethodName: "ListPermissions",
			Handler:    _PermissionService_ListPermissions_Handler,
		},
		{
			MethodName: "UpdatePermission",
			Handler:    _PermissionService_UpdatePermission_Handler,
		},
		{
			MethodName: "DeletePermission",
			Handler:    _PermissionService_DeletePermission_Handler,
		},
		{
			MethodName: "TransferOwnership",
			Handler:    _PermissionService_TransferOwnership_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/permission_service.proto",
}

PermissionService_ServiceDesc is the grpc.ServiceDesc for PermissionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

PredictionService_ServiceDesc

var PredictionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.PredictionService",
	HandlerType: (*PredictionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Predict",
			Handler:    _PredictionService_Predict_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/prediction_service.proto",
}

PredictionService_ServiceDesc is the grpc.ServiceDesc for PredictionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

RetrieverService_ServiceDesc

var RetrieverService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.RetrieverService",
	HandlerType: (*RetrieverServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateCorpus",
			Handler:    _RetrieverService_CreateCorpus_Handler,
		},
		{
			MethodName: "GetCorpus",
			Handler:    _RetrieverService_GetCorpus_Handler,
		},
		{
			MethodName: "UpdateCorpus",
			Handler:    _RetrieverService_UpdateCorpus_Handler,
		},
		{
			MethodName: "DeleteCorpus",
			Handler:    _RetrieverService_DeleteCorpus_Handler,
		},
		{
			MethodName: "ListCorpora",
			Handler:    _RetrieverService_ListCorpora_Handler,
		},
		{
			MethodName: "QueryCorpus",
			Handler:    _RetrieverService_QueryCorpus_Handler,
		},
		{
			MethodName: "CreateDocument",
			Handler:    _RetrieverService_CreateDocument_Handler,
		},
		{
			MethodName: "GetDocument",
			Handler:    _RetrieverService_GetDocument_Handler,
		},
		{
			MethodName: "UpdateDocument",
			Handler:    _RetrieverService_UpdateDocument_Handler,
		},
		{
			MethodName: "DeleteDocument",
			Handler:    _RetrieverService_DeleteDocument_Handler,
		},
		{
			MethodName: "ListDocuments",
			Handler:    _RetrieverService_ListDocuments_Handler,
		},
		{
			MethodName: "QueryDocument",
			Handler:    _RetrieverService_QueryDocument_Handler,
		},
		{
			MethodName: "CreateChunk",
			Handler:    _RetrieverService_CreateChunk_Handler,
		},
		{
			MethodName: "BatchCreateChunks",
			Handler:    _RetrieverService_BatchCreateChunks_Handler,
		},
		{
			MethodName: "GetChunk",
			Handler:    _RetrieverService_GetChunk_Handler,
		},
		{
			MethodName: "UpdateChunk",
			Handler:    _RetrieverService_UpdateChunk_Handler,
		},
		{
			MethodName: "BatchUpdateChunks",
			Handler:    _RetrieverService_BatchUpdateChunks_Handler,
		},
		{
			MethodName: "DeleteChunk",
			Handler:    _RetrieverService_DeleteChunk_Handler,
		},
		{
			MethodName: "BatchDeleteChunks",
			Handler:    _RetrieverService_BatchDeleteChunks_Handler,
		},
		{
			MethodName: "ListChunks",
			Handler:    _RetrieverService_ListChunks_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/retriever_service.proto",
}

RetrieverService_ServiceDesc is the grpc.ServiceDesc for RetrieverService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

TextService_ServiceDesc

var TextService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "google.ai.generativelanguage.v1alpha.TextService",
	HandlerType: (*TextServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GenerateText",
			Handler:    _TextService_GenerateText_Handler,
		},
		{
			MethodName: "EmbedText",
			Handler:    _TextService_EmbedText_Handler,
		},
		{
			MethodName: "BatchEmbedText",
			Handler:    _TextService_BatchEmbedText_Handler,
		},
		{
			MethodName: "CountTextTokens",
			Handler:    _TextService_CountTextTokens_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "google/ai/generativelanguage/v1alpha/text_service.proto",
}

TextService_ServiceDesc is the grpc.ServiceDesc for TextService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterCacheServiceServer

func RegisterCacheServiceServer(s grpc.ServiceRegistrar, srv CacheServiceServer)

func RegisterDiscussServiceServer

func RegisterDiscussServiceServer(s grpc.ServiceRegistrar, srv DiscussServiceServer)

func RegisterFileServiceServer

func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer)

func RegisterGenerativeServiceServer

func RegisterGenerativeServiceServer(s grpc.ServiceRegistrar, srv GenerativeServiceServer)

func RegisterModelServiceServer

func RegisterModelServiceServer(s grpc.ServiceRegistrar, srv ModelServiceServer)

func RegisterPermissionServiceServer

func RegisterPermissionServiceServer(s grpc.ServiceRegistrar, srv PermissionServiceServer)

func RegisterPredictionServiceServer

func RegisterPredictionServiceServer(s grpc.ServiceRegistrar, srv PredictionServiceServer)

func RegisterRetrieverServiceServer

func RegisterRetrieverServiceServer(s grpc.ServiceRegistrar, srv RetrieverServiceServer)

func RegisterTextServiceServer

func RegisterTextServiceServer(s grpc.ServiceRegistrar, srv TextServiceServer)

AttributionSourceId

type AttributionSourceId struct {

	// Types that are assignable to Source:
	//
	//	*AttributionSourceId_GroundingPassage
	//	*AttributionSourceId_SemanticRetrieverChunk_
	Source isAttributionSourceId_Source `protobuf_oneof:"source"`
	// contains filtered or unexported fields
}

Identifier for the source contributing to this attribution.

func (*AttributionSourceId) Descriptor

func (*AttributionSourceId) Descriptor() ([]byte, []int)

Deprecated: Use AttributionSourceId.ProtoReflect.Descriptor instead.

func (*AttributionSourceId) GetGroundingPassage

func (*AttributionSourceId) GetSemanticRetrieverChunk

func (x *AttributionSourceId) GetSemanticRetrieverChunk() *AttributionSourceId_SemanticRetrieverChunk

func (*AttributionSourceId) GetSource

func (m *AttributionSourceId) GetSource() isAttributionSourceId_Source

func (*AttributionSourceId) ProtoMessage

func (*AttributionSourceId) ProtoMessage()

func (*AttributionSourceId) ProtoReflect

func (x *AttributionSourceId) ProtoReflect() protoreflect.Message

func (*AttributionSourceId) Reset

func (x *AttributionSourceId) Reset()

func (*AttributionSourceId) String

func (x *AttributionSourceId) String() string

AttributionSourceId_GroundingPassage

type AttributionSourceId_GroundingPassage struct {
	// Identifier for an inline passage.
	GroundingPassage *AttributionSourceId_GroundingPassageId `protobuf:"bytes,1,opt,name=grounding_passage,json=groundingPassage,proto3,oneof"`
}

AttributionSourceId_GroundingPassageId

type AttributionSourceId_GroundingPassageId struct {

	// Output only. ID of the passage matching the `GenerateAnswerRequest`'s
	// `GroundingPassage.id`.
	PassageId string `protobuf:"bytes,1,opt,name=passage_id,json=passageId,proto3" json:"passage_id,omitempty"`
	// Output only. Index of the part within the `GenerateAnswerRequest`'s
	// `GroundingPassage.content`.
	PartIndex int32 `protobuf:"varint,2,opt,name=part_index,json=partIndex,proto3" json:"part_index,omitempty"`
	// contains filtered or unexported fields
}

Identifier for a part within a GroundingPassage.

func (*AttributionSourceId_GroundingPassageId) Descriptor

func (*AttributionSourceId_GroundingPassageId) Descriptor() ([]byte, []int)

Deprecated: Use AttributionSourceId_GroundingPassageId.ProtoReflect.Descriptor instead.

func (*AttributionSourceId_GroundingPassageId) GetPartIndex

func (*AttributionSourceId_GroundingPassageId) GetPassageId

func (*AttributionSourceId_GroundingPassageId) ProtoMessage

func (*AttributionSourceId_GroundingPassageId) ProtoReflect

func (*AttributionSourceId_GroundingPassageId) Reset

func (*AttributionSourceId_GroundingPassageId) String

AttributionSourceId_SemanticRetrieverChunk

type AttributionSourceId_SemanticRetrieverChunk struct {

	// Output only. Name of the source matching the request's
	// `SemanticRetrieverConfig.source`. Example: `corpora/123` or
	// `corpora/123/documents/abc`
	Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// Output only. Name of the `Chunk` containing the attributed text.
	// Example: `corpora/123/documents/abc/chunks/xyz`
	Chunk string `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

Identifier for a Chunk retrieved via Semantic Retriever specified in the GenerateAnswerRequest using SemanticRetrieverConfig.

func (*AttributionSourceId_SemanticRetrieverChunk) Descriptor

Deprecated: Use AttributionSourceId_SemanticRetrieverChunk.ProtoReflect.Descriptor instead.

func (*AttributionSourceId_SemanticRetrieverChunk) GetChunk

func (*AttributionSourceId_SemanticRetrieverChunk) GetSource

func (*AttributionSourceId_SemanticRetrieverChunk) ProtoMessage

func (*AttributionSourceId_SemanticRetrieverChunk) ProtoReflect

func (*AttributionSourceId_SemanticRetrieverChunk) Reset

func (*AttributionSourceId_SemanticRetrieverChunk) String

AttributionSourceId_SemanticRetrieverChunk_

type AttributionSourceId_SemanticRetrieverChunk_ struct {
	// Identifier for a `Chunk` fetched via Semantic Retriever.
	SemanticRetrieverChunk *AttributionSourceId_SemanticRetrieverChunk `protobuf:"bytes,2,opt,name=semantic_retriever_chunk,json=semanticRetrieverChunk,proto3,oneof"`
}

BatchCreateChunksRequest

type BatchCreateChunksRequest struct {

	// Optional. The name of the `Document` where this batch of `Chunk`s will be
	// created. The parent field in every `CreateChunkRequest` must match this
	// value. Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The request messages specifying the `Chunk`s to create.
	// A maximum of 100 `Chunk`s can be created in a batch.
	Requests []*CreateChunkRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

Request to batch create Chunks.

func (*BatchCreateChunksRequest) Descriptor

func (*BatchCreateChunksRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchCreateChunksRequest.ProtoReflect.Descriptor instead.

func (*BatchCreateChunksRequest) GetParent

func (x *BatchCreateChunksRequest) GetParent() string

func (*BatchCreateChunksRequest) GetRequests

func (x *BatchCreateChunksRequest) GetRequests() []*CreateChunkRequest

func (*BatchCreateChunksRequest) ProtoMessage

func (*BatchCreateChunksRequest) ProtoMessage()

func (*BatchCreateChunksRequest) ProtoReflect

func (x *BatchCreateChunksRequest) ProtoReflect() protoreflect.Message

func (*BatchCreateChunksRequest) Reset

func (x *BatchCreateChunksRequest) Reset()

func (*BatchCreateChunksRequest) String

func (x *BatchCreateChunksRequest) String() string

BatchCreateChunksResponse

type BatchCreateChunksResponse struct {

	// `Chunk`s created.
	Chunks []*Chunk `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"`
	// contains filtered or unexported fields
}

Response from BatchCreateChunks containing a list of created Chunks.

func (*BatchCreateChunksResponse) Descriptor

func (*BatchCreateChunksResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchCreateChunksResponse.ProtoReflect.Descriptor instead.

func (*BatchCreateChunksResponse) GetChunks

func (x *BatchCreateChunksResponse) GetChunks() []*Chunk

func (*BatchCreateChunksResponse) ProtoMessage

func (*BatchCreateChunksResponse) ProtoMessage()

func (*BatchCreateChunksResponse) ProtoReflect

func (*BatchCreateChunksResponse) Reset

func (x *BatchCreateChunksResponse) Reset()

func (*BatchCreateChunksResponse) String

func (x *BatchCreateChunksResponse) String() string

BatchDeleteChunksRequest

type BatchDeleteChunksRequest struct {

	// Optional. The name of the `Document` containing the `Chunk`s to delete.
	// The parent field in every `DeleteChunkRequest` must match this value.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The request messages specifying the `Chunk`s to delete.
	Requests []*DeleteChunkRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

Request to batch delete Chunks.

func (*BatchDeleteChunksRequest) Descriptor

func (*BatchDeleteChunksRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchDeleteChunksRequest.ProtoReflect.Descriptor instead.

func (*BatchDeleteChunksRequest) GetParent

func (x *BatchDeleteChunksRequest) GetParent() string

func (*BatchDeleteChunksRequest) GetRequests

func (x *BatchDeleteChunksRequest) GetRequests() []*DeleteChunkRequest

func (*BatchDeleteChunksRequest) ProtoMessage

func (*BatchDeleteChunksRequest) ProtoMessage()

func (*BatchDeleteChunksRequest) ProtoReflect

func (x *BatchDeleteChunksRequest) ProtoReflect() protoreflect.Message

func (*BatchDeleteChunksRequest) Reset

func (x *BatchDeleteChunksRequest) Reset()

func (*BatchDeleteChunksRequest) String

func (x *BatchDeleteChunksRequest) String() string

BatchEmbedContentsRequest

type BatchEmbedContentsRequest struct {

	// Required. The model's resource name. This serves as an ID for the Model to
	// use.
	//
	// This name should match a model name returned by the `ListModels` method.
	//
	// Format: `models/{model}`
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. Embed requests for the batch. The model in each of these requests
	// must match the model specified `BatchEmbedContentsRequest.model`.
	Requests []*EmbedContentRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

Batch request to get embeddings from the model for a list of prompts.

func (*BatchEmbedContentsRequest) Descriptor

func (*BatchEmbedContentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchEmbedContentsRequest.ProtoReflect.Descriptor instead.

func (*BatchEmbedContentsRequest) GetModel

func (x *BatchEmbedContentsRequest) GetModel() string

func (*BatchEmbedContentsRequest) GetRequests

func (x *BatchEmbedContentsRequest) GetRequests() []*EmbedContentRequest

func (*BatchEmbedContentsRequest) ProtoMessage

func (*BatchEmbedContentsRequest) ProtoMessage()

func (*BatchEmbedContentsRequest) ProtoReflect

func (*BatchEmbedContentsRequest) Reset

func (x *BatchEmbedContentsRequest) Reset()

func (*BatchEmbedContentsRequest) String

func (x *BatchEmbedContentsRequest) String() string

BatchEmbedContentsResponse

type BatchEmbedContentsResponse struct {

	// Output only. The embeddings for each request, in the same order as provided
	// in the batch request.
	Embeddings []*ContentEmbedding `protobuf:"bytes,1,rep,name=embeddings,proto3" json:"embeddings,omitempty"`
	// contains filtered or unexported fields
}

The response to a BatchEmbedContentsRequest.

func (*BatchEmbedContentsResponse) Descriptor

func (*BatchEmbedContentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchEmbedContentsResponse.ProtoReflect.Descriptor instead.

func (*BatchEmbedContentsResponse) GetEmbeddings

func (x *BatchEmbedContentsResponse) GetEmbeddings() []*ContentEmbedding

func (*BatchEmbedContentsResponse) ProtoMessage

func (*BatchEmbedContentsResponse) ProtoMessage()

func (*BatchEmbedContentsResponse) ProtoReflect

func (*BatchEmbedContentsResponse) Reset

func (x *BatchEmbedContentsResponse) Reset()

func (*BatchEmbedContentsResponse) String

func (x *BatchEmbedContentsResponse) String() string

BatchEmbedTextRequest

type BatchEmbedTextRequest struct {

	// Required. The name of the `Model` to use for generating the embedding.
	// Examples:
	//
	//	models/embedding-gecko-001
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. The free-form input texts that the model will turn into an
	// embedding. The current limit is 100 texts, over which an error will be
	// thrown.
	Texts []string `protobuf:"bytes,2,rep,name=texts,proto3" json:"texts,omitempty"`
	// Optional. Embed requests for the batch. Only one of `texts` or `requests`
	// can be set.
	Requests []*EmbedTextRequest `protobuf:"bytes,3,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

Batch request to get a text embedding from the model.

func (*BatchEmbedTextRequest) Descriptor

func (*BatchEmbedTextRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchEmbedTextRequest.ProtoReflect.Descriptor instead.

func (*BatchEmbedTextRequest) GetModel

func (x *BatchEmbedTextRequest) GetModel() string

func (*BatchEmbedTextRequest) GetRequests

func (x *BatchEmbedTextRequest) GetRequests() []*EmbedTextRequest

func (*BatchEmbedTextRequest) GetTexts

func (x *BatchEmbedTextRequest) GetTexts() []string

func (*BatchEmbedTextRequest) ProtoMessage

func (*BatchEmbedTextRequest) ProtoMessage()

func (*BatchEmbedTextRequest) ProtoReflect

func (x *BatchEmbedTextRequest) ProtoReflect() protoreflect.Message

func (*BatchEmbedTextRequest) Reset

func (x *BatchEmbedTextRequest) Reset()

func (*BatchEmbedTextRequest) String

func (x *BatchEmbedTextRequest) String() string

BatchEmbedTextResponse

type BatchEmbedTextResponse struct {

	// Output only. The embeddings generated from the input text.
	Embeddings []*Embedding `protobuf:"bytes,1,rep,name=embeddings,proto3" json:"embeddings,omitempty"`
	// contains filtered or unexported fields
}

The response to a EmbedTextRequest.

func (*BatchEmbedTextResponse) Descriptor

func (*BatchEmbedTextResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchEmbedTextResponse.ProtoReflect.Descriptor instead.

func (*BatchEmbedTextResponse) GetEmbeddings

func (x *BatchEmbedTextResponse) GetEmbeddings() []*Embedding

func (*BatchEmbedTextResponse) ProtoMessage

func (*BatchEmbedTextResponse) ProtoMessage()

func (*BatchEmbedTextResponse) ProtoReflect

func (x *BatchEmbedTextResponse) ProtoReflect() protoreflect.Message

func (*BatchEmbedTextResponse) Reset

func (x *BatchEmbedTextResponse) Reset()

func (*BatchEmbedTextResponse) String

func (x *BatchEmbedTextResponse) String() string

BatchUpdateChunksRequest

type BatchUpdateChunksRequest struct {

	// Optional. The name of the `Document` containing the `Chunk`s to update.
	// The parent field in every `UpdateChunkRequest` must match this value.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The request messages specifying the `Chunk`s to update.
	// A maximum of 100 `Chunk`s can be updated in a batch.
	Requests []*UpdateChunkRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

Request to batch update Chunks.

func (*BatchUpdateChunksRequest) Descriptor

func (*BatchUpdateChunksRequest) Descriptor() ([]byte, []int)

Deprecated: Use BatchUpdateChunksRequest.ProtoReflect.Descriptor instead.

func (*BatchUpdateChunksRequest) GetParent

func (x *BatchUpdateChunksRequest) GetParent() string

func (*BatchUpdateChunksRequest) GetRequests

func (x *BatchUpdateChunksRequest) GetRequests() []*UpdateChunkRequest

func (*BatchUpdateChunksRequest) ProtoMessage

func (*BatchUpdateChunksRequest) ProtoMessage()

func (*BatchUpdateChunksRequest) ProtoReflect

func (x *BatchUpdateChunksRequest) ProtoReflect() protoreflect.Message

func (*BatchUpdateChunksRequest) Reset

func (x *BatchUpdateChunksRequest) Reset()

func (*BatchUpdateChunksRequest) String

func (x *BatchUpdateChunksRequest) String() string

BatchUpdateChunksResponse

type BatchUpdateChunksResponse struct {

	// `Chunk`s updated.
	Chunks []*Chunk `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"`
	// contains filtered or unexported fields
}

Response from BatchUpdateChunks containing a list of updated Chunks.

func (*BatchUpdateChunksResponse) Descriptor

func (*BatchUpdateChunksResponse) Descriptor() ([]byte, []int)

Deprecated: Use BatchUpdateChunksResponse.ProtoReflect.Descriptor instead.

func (*BatchUpdateChunksResponse) GetChunks

func (x *BatchUpdateChunksResponse) GetChunks() []*Chunk

func (*BatchUpdateChunksResponse) ProtoMessage

func (*BatchUpdateChunksResponse) ProtoMessage()

func (*BatchUpdateChunksResponse) ProtoReflect

func (*BatchUpdateChunksResponse) Reset

func (x *BatchUpdateChunksResponse) Reset()

func (*BatchUpdateChunksResponse) String

func (x *BatchUpdateChunksResponse) String() string

BidiGenerateContentClientContent

type BidiGenerateContentClientContent struct {

	// Optional. The content appended to the current conversation with the model.
	//
	// For single-turn queries, this is a single instance. For multi-turn
	// queries, this is a repeated field that contains conversation history and
	// the latest request.
	Turns []*Content `protobuf:"bytes,1,rep,name=turns,proto3" json:"turns,omitempty"`
	// Optional. If true, indicates that the server content generation should
	// start with the currently accumulated prompt. Otherwise, the server awaits
	// additional messages before starting generation.
	TurnComplete bool `protobuf:"varint,2,opt,name=turn_complete,json=turnComplete,proto3" json:"turn_complete,omitempty"`
	// contains filtered or unexported fields
}

Incremental update of the current conversation delivered from the client. All of the content here is unconditionally appended to the conversation history and used as part of the prompt to the model to generate content.

A message here will interrupt any current model generation.

func (*BidiGenerateContentClientContent) Descriptor

func (*BidiGenerateContentClientContent) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentClientContent.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentClientContent) GetTurnComplete

func (x *BidiGenerateContentClientContent) GetTurnComplete() bool

func (*BidiGenerateContentClientContent) GetTurns

func (x *BidiGenerateContentClientContent) GetTurns() []*Content

func (*BidiGenerateContentClientContent) ProtoMessage

func (*BidiGenerateContentClientContent) ProtoMessage()

func (*BidiGenerateContentClientContent) ProtoReflect

func (*BidiGenerateContentClientContent) Reset

func (*BidiGenerateContentClientContent) String

BidiGenerateContentClientMessage

type BidiGenerateContentClientMessage struct {

	// The type of the message.
	//
	// Types that are assignable to MessageType:
	//
	//	*BidiGenerateContentClientMessage_Setup
	//	*BidiGenerateContentClientMessage_ClientContent
	//	*BidiGenerateContentClientMessage_RealtimeInput
	//	*BidiGenerateContentClientMessage_ToolResponse
	MessageType isBidiGenerateContentClientMessage_MessageType `protobuf_oneof:"message_type"`
	// contains filtered or unexported fields
}

Messages sent by the client in the BidiGenerateContent call.

func (*BidiGenerateContentClientMessage) Descriptor

func (*BidiGenerateContentClientMessage) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentClientMessage.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentClientMessage) GetClientContent

func (*BidiGenerateContentClientMessage) GetMessageType

func (m *BidiGenerateContentClientMessage) GetMessageType() isBidiGenerateContentClientMessage_MessageType

func (*BidiGenerateContentClientMessage) GetRealtimeInput

func (*BidiGenerateContentClientMessage) GetSetup

func (*BidiGenerateContentClientMessage) GetToolResponse

func (*BidiGenerateContentClientMessage) ProtoMessage

func (*BidiGenerateContentClientMessage) ProtoMessage()

func (*BidiGenerateContentClientMessage) ProtoReflect

func (*BidiGenerateContentClientMessage) Reset

func (*BidiGenerateContentClientMessage) String

BidiGenerateContentClientMessage_ClientContent

type BidiGenerateContentClientMessage_ClientContent struct {
	// Optional. Incremental update of the current conversation delivered from
	// the client.
	ClientContent *BidiGenerateContentClientContent `protobuf:"bytes,2,opt,name=client_content,json=clientContent,proto3,oneof"`
}

BidiGenerateContentClientMessage_RealtimeInput

type BidiGenerateContentClientMessage_RealtimeInput struct {
	// Optional. User input that is sent in real time.
	RealtimeInput *BidiGenerateContentRealtimeInput `protobuf:"bytes,3,opt,name=realtime_input,json=realtimeInput,proto3,oneof"`
}

BidiGenerateContentClientMessage_Setup

type BidiGenerateContentClientMessage_Setup struct {
	// Optional. Session configuration sent in the first and only first client
	// message.
	Setup *BidiGenerateContentSetup `protobuf:"bytes,1,opt,name=setup,proto3,oneof"`
}

BidiGenerateContentClientMessage_ToolResponse

type BidiGenerateContentClientMessage_ToolResponse struct {
	// Optional. Response to a `ToolCallMessage` received from the server.
	ToolResponse *BidiGenerateContentToolResponse `protobuf:"bytes,4,opt,name=tool_response,json=toolResponse,proto3,oneof"`
}

BidiGenerateContentRealtimeInput

type BidiGenerateContentRealtimeInput struct {

	// Optional. Inlined bytes data for media input.
	MediaChunks []*Blob `protobuf:"bytes,1,rep,name=media_chunks,json=mediaChunks,proto3" json:"media_chunks,omitempty"`
	// contains filtered or unexported fields
}

User input that is sent in real time.

This is different from [BidiGenerateContentClientContent][google.ai.generativelanguage.v1alpha.BidiGenerateContentClientContent] in a few ways:

  • Can be sent continuously without interruption to model generation.
  • If there is a need to mix data interleaved across the [BidiGenerateContentClientContent][google.ai.generativelanguage.v1alpha.BidiGenerateContentClientContent] and the [BidiGenerateContentRealtimeInput][google.ai.generativelanguage.v1alpha.BidiGenerateContentRealtimeInput], the server attempts to optimize for best response, but there are no guarantees.
  • End of turn is not explicitly specified, but is rather derived from user activity (for example, end of speech).
  • Even before the end of turn, the data is processed incrementally to optimize for a fast start of the response from the model.
  • Is always direct user input that is sent in real time. Can be sent continuously without interruptions. The model automatically detects the beginning and the end of user speech and starts or terminates streaming the response accordingly. Data is processed incrementally as it arrives, minimizing latency.

func (*BidiGenerateContentRealtimeInput) Descriptor

func (*BidiGenerateContentRealtimeInput) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentRealtimeInput.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentRealtimeInput) GetMediaChunks

func (x *BidiGenerateContentRealtimeInput) GetMediaChunks() []*Blob

func (*BidiGenerateContentRealtimeInput) ProtoMessage

func (*BidiGenerateContentRealtimeInput) ProtoMessage()

func (*BidiGenerateContentRealtimeInput) ProtoReflect

func (*BidiGenerateContentRealtimeInput) Reset

func (*BidiGenerateContentRealtimeInput) String

BidiGenerateContentServerContent

type BidiGenerateContentServerContent struct {

	// Output only. The content that the model has generated as part of the
	// current conversation with the user.
	ModelTurn *Content `protobuf:"bytes,1,opt,name=model_turn,json=modelTurn,proto3,oneof" json:"model_turn,omitempty"`
	// Output only. If true, indicates that the model is done generating.
	// Generation will only start in response to additional client messages. Can
	// be set alongside `content`, indicating that the `content` is the last in
	// the turn.
	TurnComplete bool `protobuf:"varint,2,opt,name=turn_complete,json=turnComplete,proto3" json:"turn_complete,omitempty"`
	// Output only. If true, indicates that a client message has interrupted
	// current model generation. If the client is playing out the content in real
	// time, this is a good signal to stop and empty the current playback queue.
	Interrupted bool `protobuf:"varint,3,opt,name=interrupted,proto3" json:"interrupted,omitempty"`
	// Output only. Grounding metadata for the generated content.
	GroundingMetadata *GroundingMetadata `protobuf:"bytes,4,opt,name=grounding_metadata,json=groundingMetadata,proto3" json:"grounding_metadata,omitempty"`
	// contains filtered or unexported fields
}

Incremental server update generated by the model in response to client messages.

Content is generated as quickly as possible, and not in real time. Clients may choose to buffer and play it out in real time.

func (*BidiGenerateContentServerContent) Descriptor

func (*BidiGenerateContentServerContent) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentServerContent.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentServerContent) GetGroundingMetadata

func (x *BidiGenerateContentServerContent) GetGroundingMetadata() *GroundingMetadata

func (*BidiGenerateContentServerContent) GetInterrupted

func (x *BidiGenerateContentServerContent) GetInterrupted() bool

func (*BidiGenerateContentServerContent) GetModelTurn

func (x *BidiGenerateContentServerContent) GetModelTurn() *Content

func (*BidiGenerateContentServerContent) GetTurnComplete

func (x *BidiGenerateContentServerContent) GetTurnComplete() bool

func (*BidiGenerateContentServerContent) ProtoMessage

func (*BidiGenerateContentServerContent) ProtoMessage()

func (*BidiGenerateContentServerContent) ProtoReflect

func (*BidiGenerateContentServerContent) Reset

func (*BidiGenerateContentServerContent) String

BidiGenerateContentServerMessage

type BidiGenerateContentServerMessage struct {

	// The type of the message.
	//
	// Types that are assignable to MessageType:
	//
	//	*BidiGenerateContentServerMessage_SetupComplete
	//	*BidiGenerateContentServerMessage_ServerContent
	//	*BidiGenerateContentServerMessage_ToolCall
	//	*BidiGenerateContentServerMessage_ToolCallCancellation
	MessageType isBidiGenerateContentServerMessage_MessageType `protobuf_oneof:"message_type"`
	// contains filtered or unexported fields
}

Response message for the BidiGenerateContent call.

func (*BidiGenerateContentServerMessage) Descriptor

func (*BidiGenerateContentServerMessage) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentServerMessage.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentServerMessage) GetMessageType

func (m *BidiGenerateContentServerMessage) GetMessageType() isBidiGenerateContentServerMessage_MessageType

func (*BidiGenerateContentServerMessage) GetServerContent

func (*BidiGenerateContentServerMessage) GetSetupComplete

func (*BidiGenerateContentServerMessage) GetToolCall

func (*BidiGenerateContentServerMessage) GetToolCallCancellation

func (*BidiGenerateContentServerMessage) ProtoMessage

func (*BidiGenerateContentServerMessage) ProtoMessage()

func (*BidiGenerateContentServerMessage) ProtoReflect

func (*BidiGenerateContentServerMessage) Reset

func (*BidiGenerateContentServerMessage) String

BidiGenerateContentServerMessage_ServerContent

type BidiGenerateContentServerMessage_ServerContent struct {
	// Output only. Content generated by the model in response to client
	// messages.
	ServerContent *BidiGenerateContentServerContent `protobuf:"bytes,3,opt,name=server_content,json=serverContent,proto3,oneof"`
}

BidiGenerateContentServerMessage_SetupComplete

type BidiGenerateContentServerMessage_SetupComplete struct {
	// Output only. Sent in response to a `BidiGenerateContentSetup` message
	// from the client when setup is complete.
	SetupComplete *BidiGenerateContentSetupComplete `protobuf:"bytes,2,opt,name=setup_complete,json=setupComplete,proto3,oneof"`
}

BidiGenerateContentServerMessage_ToolCall

type BidiGenerateContentServerMessage_ToolCall struct {
	// Output only. Request for the client to execute the `function_calls` and
	// return the responses with the matching `id`s.
	ToolCall *BidiGenerateContentToolCall `protobuf:"bytes,4,opt,name=tool_call,json=toolCall,proto3,oneof"`
}

BidiGenerateContentServerMessage_ToolCallCancellation

type BidiGenerateContentServerMessage_ToolCallCancellation struct {
	// Output only. Notification for the client that a previously issued
	// `ToolCallMessage` with the specified `id`s should be cancelled.
	ToolCallCancellation *BidiGenerateContentToolCallCancellation `protobuf:"bytes,5,opt,name=tool_call_cancellation,json=toolCallCancellation,proto3,oneof"`
}

BidiGenerateContentSetup

type BidiGenerateContentSetup struct {

	// Required. The model's resource name. This serves as an ID for the Model to
	// use.
	//
	// Format: `models/{model}`
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. Generation config.
	//
	// The following fields are not supported:
	//
	//   - `response_logprobs`
	//   - `response_mime_type`
	//   - `logprobs`
	//   - `response_schema`
	//   - `stop_sequence`
	//   - `routing_config`
	//   - `audio_timestamp`
	GenerationConfig *GenerationConfig `protobuf:"bytes,2,opt,name=generation_config,json=generationConfig,proto3" json:"generation_config,omitempty"`
	// Optional. The user provided system instructions for the model.
	//
	// Note: Only text should be used in parts and content in each part will be
	// in a separate paragraph.
	SystemInstruction *Content `protobuf:"bytes,3,opt,name=system_instruction,json=systemInstruction,proto3" json:"system_instruction,omitempty"`
	// Optional. A list of `Tools` the model may use to generate the next
	// response.
	//
	// A `Tool` is a piece of code that enables the system to interact with
	// external systems to perform an action, or set of actions, outside of
	// knowledge and scope of the model.
	Tools []*Tool `protobuf:"bytes,4,rep,name=tools,proto3" json:"tools,omitempty"`
	// contains filtered or unexported fields
}

Message to be sent in the first and only first BidiGenerateContentClientMessage. Contains configuration that will apply for the duration of the streaming RPC.

Clients should wait for a BidiGenerateContentSetupComplete message before sending any additional messages.

func (*BidiGenerateContentSetup) Descriptor

func (*BidiGenerateContentSetup) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentSetup.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentSetup) GetGenerationConfig

func (x *BidiGenerateContentSetup) GetGenerationConfig() *GenerationConfig

func (*BidiGenerateContentSetup) GetModel

func (x *BidiGenerateContentSetup) GetModel() string

func (*BidiGenerateContentSetup) GetSystemInstruction

func (x *BidiGenerateContentSetup) GetSystemInstruction() *Content

func (*BidiGenerateContentSetup) GetTools

func (x *BidiGenerateContentSetup) GetTools() []*Tool

func (*BidiGenerateContentSetup) ProtoMessage

func (*BidiGenerateContentSetup) ProtoMessage()

func (*BidiGenerateContentSetup) ProtoReflect

func (x *BidiGenerateContentSetup) ProtoReflect() protoreflect.Message

func (*BidiGenerateContentSetup) Reset

func (x *BidiGenerateContentSetup) Reset()

func (*BidiGenerateContentSetup) String

func (x *BidiGenerateContentSetup) String() string

BidiGenerateContentSetupComplete

type BidiGenerateContentSetupComplete struct {
	// contains filtered or unexported fields
}

Sent in response to a BidiGenerateContentSetup message from the client.

func (*BidiGenerateContentSetupComplete) Descriptor

func (*BidiGenerateContentSetupComplete) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentSetupComplete.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentSetupComplete) ProtoMessage

func (*BidiGenerateContentSetupComplete) ProtoMessage()

func (*BidiGenerateContentSetupComplete) ProtoReflect

func (*BidiGenerateContentSetupComplete) Reset

func (*BidiGenerateContentSetupComplete) String

BidiGenerateContentToolCall

type BidiGenerateContentToolCall struct {

	// Output only. The function call to be executed.
	FunctionCalls []*FunctionCall `protobuf:"bytes,2,rep,name=function_calls,json=functionCalls,proto3" json:"function_calls,omitempty"`
	// contains filtered or unexported fields
}

Request for the client to execute the function_calls and return the responses with the matching ids.

func (*BidiGenerateContentToolCall) Descriptor

func (*BidiGenerateContentToolCall) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentToolCall.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentToolCall) GetFunctionCalls

func (x *BidiGenerateContentToolCall) GetFunctionCalls() []*FunctionCall

func (*BidiGenerateContentToolCall) ProtoMessage

func (*BidiGenerateContentToolCall) ProtoMessage()

func (*BidiGenerateContentToolCall) ProtoReflect

func (*BidiGenerateContentToolCall) Reset

func (x *BidiGenerateContentToolCall) Reset()

func (*BidiGenerateContentToolCall) String

func (x *BidiGenerateContentToolCall) String() string

BidiGenerateContentToolCallCancellation

type BidiGenerateContentToolCallCancellation struct {

	// Output only. The ids of the tool calls to be cancelled.
	Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
	// contains filtered or unexported fields
}

Notification for the client that a previously issued ToolCallMessage with the specified ids should have been not executed and should be cancelled. If there were side-effects to those tool calls, clients may attempt to undo the tool calls. This message occurs only in cases where the clients interrupt server turns.

func (*BidiGenerateContentToolCallCancellation) Descriptor

func (*BidiGenerateContentToolCallCancellation) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentToolCallCancellation.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentToolCallCancellation) GetIds

func (*BidiGenerateContentToolCallCancellation) ProtoMessage

func (*BidiGenerateContentToolCallCancellation) ProtoReflect

func (*BidiGenerateContentToolCallCancellation) Reset

func (*BidiGenerateContentToolCallCancellation) String

BidiGenerateContentToolResponse

type BidiGenerateContentToolResponse struct {

	// Optional. The response to the function calls.
	FunctionResponses []*FunctionResponse `protobuf:"bytes,1,rep,name=function_responses,json=functionResponses,proto3" json:"function_responses,omitempty"`
	// contains filtered or unexported fields
}

Client generated response to a ToolCall received from the server. Individual FunctionResponse objects are matched to the respective FunctionCall objects by the id field.

Note that in the unary and server-streaming GenerateContent APIs function calling happens by exchanging the Content parts, while in the bidi GenerateContent APIs function calling happens over these dedicated set of messages.

func (*BidiGenerateContentToolResponse) Descriptor

func (*BidiGenerateContentToolResponse) Descriptor() ([]byte, []int)

Deprecated: Use BidiGenerateContentToolResponse.ProtoReflect.Descriptor instead.

func (*BidiGenerateContentToolResponse) GetFunctionResponses

func (x *BidiGenerateContentToolResponse) GetFunctionResponses() []*FunctionResponse

func (*BidiGenerateContentToolResponse) ProtoMessage

func (*BidiGenerateContentToolResponse) ProtoMessage()

func (*BidiGenerateContentToolResponse) ProtoReflect

func (*BidiGenerateContentToolResponse) Reset

func (*BidiGenerateContentToolResponse) String

Blob

type Blob struct {

	// The IANA standard MIME type of the source data.
	// Examples:
	//   - image/png
	//   - image/jpeg
	//
	// If an unsupported MIME type is provided, an error will be returned. For a
	// complete list of supported types, see [Supported file
	// formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats).
	MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Raw bytes for media formats.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Raw media bytes.

Text should not be sent as raw bytes, use the 'text' field.

func (*Blob) Descriptor

func (*Blob) Descriptor() ([]byte, []int)

Deprecated: Use Blob.ProtoReflect.Descriptor instead.

func (*Blob) GetData

func (x *Blob) GetData() []byte

func (*Blob) GetMimeType

func (x *Blob) GetMimeType() string

func (*Blob) ProtoMessage

func (*Blob) ProtoMessage()

func (*Blob) ProtoReflect

func (x *Blob) ProtoReflect() protoreflect.Message

func (*Blob) Reset

func (x *Blob) Reset()

func (*Blob) String

func (x *Blob) String() string

CacheServiceClient

type CacheServiceClient interface {
	// Lists CachedContents.
	ListCachedContents(ctx context.Context, in *ListCachedContentsRequest, opts ...grpc.CallOption) (*ListCachedContentsResponse, error)
	// Creates CachedContent resource.
	CreateCachedContent(ctx context.Context, in *CreateCachedContentRequest, opts ...grpc.CallOption) (*CachedContent, error)
	// Reads CachedContent resource.
	GetCachedContent(ctx context.Context, in *GetCachedContentRequest, opts ...grpc.CallOption) (*CachedContent, error)
	// Updates CachedContent resource (only expiration is updatable).
	UpdateCachedContent(ctx context.Context, in *UpdateCachedContentRequest, opts ...grpc.CallOption) (*CachedContent, error)
	// Deletes CachedContent resource.
	DeleteCachedContent(ctx context.Context, in *DeleteCachedContentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

CacheServiceClient is the client API for CacheService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewCacheServiceClient

func NewCacheServiceClient(cc grpc.ClientConnInterface) CacheServiceClient

CacheServiceServer

type CacheServiceServer interface {
	// Lists CachedContents.
	ListCachedContents(context.Context, *ListCachedContentsRequest) (*ListCachedContentsResponse, error)
	// Creates CachedContent resource.
	CreateCachedContent(context.Context, *CreateCachedContentRequest) (*CachedContent, error)
	// Reads CachedContent resource.
	GetCachedContent(context.Context, *GetCachedContentRequest) (*CachedContent, error)
	// Updates CachedContent resource (only expiration is updatable).
	UpdateCachedContent(context.Context, *UpdateCachedContentRequest) (*CachedContent, error)
	// Deletes CachedContent resource.
	DeleteCachedContent(context.Context, *DeleteCachedContentRequest) (*emptypb.Empty, error)
}

CacheServiceServer is the server API for CacheService service. All implementations should embed UnimplementedCacheServiceServer for forward compatibility

CachedContent

type CachedContent struct {

	// Specifies when this resource will expire.
	//
	// Types that are assignable to Expiration:
	//
	//	*CachedContent_ExpireTime
	//	*CachedContent_Ttl
	Expiration isCachedContent_Expiration `protobuf_oneof:"expiration"`
	// Optional. Identifier. The resource name referring to the cached content.
	// Format: `cachedContents/{id}`
	Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"`
	// Optional. Immutable. The user-generated meaningful display name of the
	// cached content. Maximum 128 Unicode characters.
	DisplayName *string `protobuf:"bytes,11,opt,name=display_name,json=displayName,proto3,oneof" json:"display_name,omitempty"`
	// Required. Immutable. The name of the `Model` to use for cached content
	// Format: `models/{model}`
	Model *string `protobuf:"bytes,2,opt,name=model,proto3,oneof" json:"model,omitempty"`
	// Optional. Input only. Immutable. Developer set system instruction.
	// Currently text only.
	SystemInstruction *Content `protobuf:"bytes,3,opt,name=system_instruction,json=systemInstruction,proto3,oneof" json:"system_instruction,omitempty"`
	// Optional. Input only. Immutable. The content to cache.
	Contents []*Content `protobuf:"bytes,4,rep,name=contents,proto3" json:"contents,omitempty"`
	// Optional. Input only. Immutable. A list of `Tools` the model may use to
	// generate the next response
	Tools []*Tool `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"`
	// Optional. Input only. Immutable. Tool config. This config is shared for all
	// tools.
	ToolConfig *ToolConfig `protobuf:"bytes,6,opt,name=tool_config,json=toolConfig,proto3,oneof" json:"tool_config,omitempty"`
	// Output only. Creation time of the cache entry.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. When the cache entry was last updated in UTC time.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Output only. Metadata on the usage of the cached content.
	UsageMetadata *CachedContent_UsageMetadata `protobuf:"bytes,12,opt,name=usage_metadata,json=usageMetadata,proto3" json:"usage_metadata,omitempty"`
	// contains filtered or unexported fields
}

Content that has been preprocessed and can be used in subsequent request to GenerativeService.

Cached content can be only used with model it was created for.

func (*CachedContent) Descriptor

func (*CachedContent) Descriptor() ([]byte, []int)

Deprecated: Use CachedContent.ProtoReflect.Descriptor instead.

func (*CachedContent) GetContents

func (x *CachedContent) GetContents() []*Content

func (*CachedContent) GetCreateTime

func (x *CachedContent) GetCreateTime() *timestamppb.Timestamp

func (*CachedContent) GetDisplayName

func (x *CachedContent) GetDisplayName() string

func (*CachedContent) GetExpiration

func (m *CachedContent) GetExpiration() isCachedContent_Expiration

func (*CachedContent) GetExpireTime

func (x *CachedContent) GetExpireTime() *timestamppb.Timestamp

func (*CachedContent) GetModel

func (x *CachedContent) GetModel() string

func (*CachedContent) GetName

func (x *CachedContent) GetName() string

func (*CachedContent) GetSystemInstruction

func (x *CachedContent) GetSystemInstruction() *Content

func (*CachedContent) GetToolConfig

func (x *CachedContent) GetToolConfig() *ToolConfig

func (*CachedContent) GetTools

func (x *CachedContent) GetTools() []*Tool

func (*CachedContent) GetTtl

func (x *CachedContent) GetTtl() *durationpb.Duration

func (*CachedContent) GetUpdateTime

func (x *CachedContent) GetUpdateTime() *timestamppb.Timestamp

func (*CachedContent) GetUsageMetadata

func (x *CachedContent) GetUsageMetadata() *CachedContent_UsageMetadata

func (*CachedContent) ProtoMessage

func (*CachedContent) ProtoMessage()

func (*CachedContent) ProtoReflect

func (x *CachedContent) ProtoReflect() protoreflect.Message

func (*CachedContent) Reset

func (x *CachedContent) Reset()

func (*CachedContent) String

func (x *CachedContent) String() string

CachedContent_ExpireTime

type CachedContent_ExpireTime struct {
	// Timestamp in UTC of when this resource is considered expired.
	// This is *always* provided on output, regardless of what was sent
	// on input.
	ExpireTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expire_time,json=expireTime,proto3,oneof"`
}

CachedContent_Ttl

type CachedContent_Ttl struct {
	// Input only. New TTL for this resource, input only.
	Ttl *durationpb.Duration `protobuf:"bytes,10,opt,name=ttl,proto3,oneof"`
}

CachedContent_UsageMetadata

type CachedContent_UsageMetadata struct {

	// Total number of tokens that the cached content consumes.
	TotalTokenCount int32 `protobuf:"varint,1,opt,name=total_token_count,json=totalTokenCount,proto3" json:"total_token_count,omitempty"`
	// contains filtered or unexported fields
}

Metadata on the usage of the cached content.

func (*CachedContent_UsageMetadata) Descriptor

func (*CachedContent_UsageMetadata) Descriptor() ([]byte, []int)

Deprecated: Use CachedContent_UsageMetadata.ProtoReflect.Descriptor instead.

func (*CachedContent_UsageMetadata) GetTotalTokenCount

func (x *CachedContent_UsageMetadata) GetTotalTokenCount() int32

func (*CachedContent_UsageMetadata) ProtoMessage

func (*CachedContent_UsageMetadata) ProtoMessage()

func (*CachedContent_UsageMetadata) ProtoReflect

func (*CachedContent_UsageMetadata) Reset

func (x *CachedContent_UsageMetadata) Reset()

func (*CachedContent_UsageMetadata) String

func (x *CachedContent_UsageMetadata) String() string

Candidate

type Candidate struct {

	// Output only. Index of the candidate in the list of response candidates.
	Index *int32 `protobuf:"varint,3,opt,name=index,proto3,oneof" json:"index,omitempty"`
	// Output only. Generated content returned from the model.
	Content *Content `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// Optional. Output only. The reason why the model stopped generating tokens.
	//
	// If empty, the model has not stopped generating tokens.
	FinishReason Candidate_FinishReason `protobuf:"varint,2,opt,name=finish_reason,json=finishReason,proto3,enum=google.ai.generativelanguage.v1alpha.Candidate_FinishReason" json:"finish_reason,omitempty"`
	// List of ratings for the safety of a response candidate.
	//
	// There is at most one rating per category.
	SafetyRatings []*SafetyRating `protobuf:"bytes,5,rep,name=safety_ratings,json=safetyRatings,proto3" json:"safety_ratings,omitempty"`
	// Output only. Citation information for model-generated candidate.
	//
	// This field may be populated with recitation information for any text
	// included in the `content`. These are passages that are "recited" from
	// copyrighted material in the foundational LLM's training data.
	CitationMetadata *CitationMetadata `protobuf:"bytes,6,opt,name=citation_metadata,json=citationMetadata,proto3" json:"citation_metadata,omitempty"`
	// Output only. Token count for this candidate.
	TokenCount int32 `protobuf:"varint,7,opt,name=token_count,json=tokenCount,proto3" json:"token_count,omitempty"`
	// Output only. Attribution information for sources that contributed to a
	// grounded answer.
	//
	// This field is populated for `GenerateAnswer` calls.
	GroundingAttributions []*GroundingAttribution `protobuf:"bytes,8,rep,name=grounding_attributions,json=groundingAttributions,proto3" json:"grounding_attributions,omitempty"`
	// Output only. Grounding metadata for the candidate.
	//
	// This field is populated for `GenerateContent` calls.
	GroundingMetadata *GroundingMetadata `protobuf:"bytes,9,opt,name=grounding_metadata,json=groundingMetadata,proto3" json:"grounding_metadata,omitempty"`
	// Output only. Average log probability score of the candidate.
	AvgLogprobs float64 `protobuf:"fixed64,10,opt,name=avg_logprobs,json=avgLogprobs,proto3" json:"avg_logprobs,omitempty"`
	// Output only. Log-likelihood scores for the response tokens and top tokens
	LogprobsResult *LogprobsResult `protobuf:"bytes,11,opt,name=logprobs_result,json=logprobsResult,proto3" json:"logprobs_result,omitempty"`
	// contains filtered or unexported fields
}

A response candidate generated from the model.

func (*Candidate) Descriptor

func (*Candidate) Descriptor() ([]byte, []int)

Deprecated: Use Candidate.ProtoReflect.Descriptor instead.

func (*Candidate) GetAvgLogprobs

func (x *Candidate) GetAvgLogprobs() float64

func (*Candidate) GetCitationMetadata

func (x *Candidate) GetCitationMetadata() *CitationMetadata

func (*Candidate) GetContent

func (x *Candidate) GetContent() *Content

func (*Candidate) GetFinishReason

func (x *Candidate) GetFinishReason() Candidate_FinishReason

func (*Candidate) GetGroundingAttributions

func (x *Candidate) GetGroundingAttributions() []*GroundingAttribution

func (*Candidate) GetGroundingMetadata

func (x *Candidate) GetGroundingMetadata() *GroundingMetadata

func (*Candidate) GetIndex

func (x *Candidate) GetIndex() int32

func (*Candidate) GetLogprobsResult

func (x *Candidate) GetLogprobsResult() *LogprobsResult

func (*Candidate) GetSafetyRatings

func (x *Candidate) GetSafetyRatings() []*SafetyRating

func (*Candidate) GetTokenCount

func (x *Candidate) GetTokenCount() int32

func (*Candidate) ProtoMessage

func (*Candidate) ProtoMessage()

func (*Candidate) ProtoReflect

func (x *Candidate) ProtoReflect() protoreflect.Message

func (*Candidate) Reset

func (x *Candidate) Reset()

func (*Candidate) String

func (x *Candidate) String() string

Candidate_FinishReason

type Candidate_FinishReason int32

Defines the reason why the model stopped generating tokens.

Candidate_FINISH_REASON_UNSPECIFIED, Candidate_STOP, Candidate_MAX_TOKENS, Candidate_SAFETY, Candidate_RECITATION, Candidate_LANGUAGE, Candidate_OTHER, Candidate_BLOCKLIST, Candidate_PROHIBITED_CONTENT, Candidate_SPII, Candidate_MALFORMED_FUNCTION_CALL, Candidate_IMAGE_SAFETY

const (
	// Default value. This value is unused.
	Candidate_FINISH_REASON_UNSPECIFIED Candidate_FinishReason = 0
	// Natural stop point of the model or provided stop sequence.
	Candidate_STOP Candidate_FinishReason = 1
	// The maximum number of tokens as specified in the request was reached.
	Candidate_MAX_TOKENS Candidate_FinishReason = 2
	// The response candidate content was flagged for safety reasons.
	Candidate_SAFETY Candidate_FinishReason = 3
	// The response candidate content was flagged for recitation reasons.
	Candidate_RECITATION Candidate_FinishReason = 4
	// The response candidate content was flagged for using an unsupported
	// language.
	Candidate_LANGUAGE Candidate_FinishReason = 6
	// Unknown reason.
	Candidate_OTHER Candidate_FinishReason = 5
	// Token generation stopped because the content contains forbidden terms.
	Candidate_BLOCKLIST Candidate_FinishReason = 7
	// Token generation stopped for potentially containing prohibited content.
	Candidate_PROHIBITED_CONTENT Candidate_FinishReason = 8
	// Token generation stopped because the content potentially contains
	// Sensitive Personally Identifiable Information (SPII).
	Candidate_SPII Candidate_FinishReason = 9
	// The function call generated by the model is invalid.
	Candidate_MALFORMED_FUNCTION_CALL Candidate_FinishReason = 10
	// Token generation stopped because generated images contain safety
	// violations.
	Candidate_IMAGE_SAFETY Candidate_FinishReason = 11
)

func (Candidate_FinishReason) Descriptor

func (Candidate_FinishReason) Enum

func (Candidate_FinishReason) EnumDescriptor

func (Candidate_FinishReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use Candidate_FinishReason.Descriptor instead.

func (Candidate_FinishReason) Number

func (Candidate_FinishReason) String

func (x Candidate_FinishReason) String() string

func (Candidate_FinishReason) Type

Chunk

type Chunk struct {

	// Immutable. Identifier. The `Chunk` resource name. The ID (name excluding
	// the "corpora/*/documents/*/chunks/" prefix) can contain up to 40 characters
	// that are lowercase alphanumeric or dashes (-). The ID cannot start or end
	// with a dash. If the name is empty on create, a random 12-character unique
	// ID will be generated.
	// Example: `corpora/{corpus_id}/documents/{document_id}/chunks/123a456b789c`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The content for the `Chunk`, such as the text string.
	// The maximum number of tokens per chunk is 2043.
	Data *ChunkData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// Optional. User provided custom metadata stored as key-value pairs.
	// The maximum number of `CustomMetadata` per chunk is 20.
	CustomMetadata []*CustomMetadata `protobuf:"bytes,3,rep,name=custom_metadata,json=customMetadata,proto3" json:"custom_metadata,omitempty"`
	// Output only. The Timestamp of when the `Chunk` was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. The Timestamp of when the `Chunk` was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Output only. Current state of the `Chunk`.
	State Chunk_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.ai.generativelanguage.v1alpha.Chunk_State" json:"state,omitempty"`
	// contains filtered or unexported fields
}

A Chunk is a subpart of a Document that is treated as an independent unit for the purposes of vector representation and storage. A Corpus can have a maximum of 1 million Chunks.

func (*Chunk) Descriptor

func (*Chunk) Descriptor() ([]byte, []int)

Deprecated: Use Chunk.ProtoReflect.Descriptor instead.

func (*Chunk) GetCreateTime

func (x *Chunk) GetCreateTime() *timestamppb.Timestamp

func (*Chunk) GetCustomMetadata

func (x *Chunk) GetCustomMetadata() []*CustomMetadata

func (*Chunk) GetData

func (x *Chunk) GetData() *ChunkData

func (*Chunk) GetName

func (x *Chunk) GetName() string

func (*Chunk) GetState

func (x *Chunk) GetState() Chunk_State

func (*Chunk) GetUpdateTime

func (x *Chunk) GetUpdateTime() *timestamppb.Timestamp

func (*Chunk) ProtoMessage

func (*Chunk) ProtoMessage()

func (*Chunk) ProtoReflect

func (x *Chunk) ProtoReflect() protoreflect.Message

func (*Chunk) Reset

func (x *Chunk) Reset()

func (*Chunk) String

func (x *Chunk) String() string

ChunkData

type ChunkData struct {

	// Types that are assignable to Data:
	//
	//	*ChunkData_StringValue
	Data isChunkData_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

Extracted data that represents the Chunk content.

func (*ChunkData) Descriptor

func (*ChunkData) Descriptor() ([]byte, []int)

Deprecated: Use ChunkData.ProtoReflect.Descriptor instead.

func (*ChunkData) GetData

func (m *ChunkData) GetData() isChunkData_Data

func (*ChunkData) GetStringValue

func (x *ChunkData) GetStringValue() string

func (*ChunkData) ProtoMessage

func (*ChunkData) ProtoMessage()

func (*ChunkData) ProtoReflect

func (x *ChunkData) ProtoReflect() protoreflect.Message

func (*ChunkData) Reset

func (x *ChunkData) Reset()

func (*ChunkData) String

func (x *ChunkData) String() string

ChunkData_StringValue

type ChunkData_StringValue struct {
	// The `Chunk` content as a string.
	// The maximum number of tokens per chunk is 2043.
	StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}

Chunk_State

type Chunk_State int32

States for the lifecycle of a Chunk.

Chunk_STATE_UNSPECIFIED, Chunk_STATE_PENDING_PROCESSING, Chunk_STATE_ACTIVE, Chunk_STATE_FAILED

const (
	// The default value. This value is used if the state is omitted.
	Chunk_STATE_UNSPECIFIED Chunk_State = 0
	// `Chunk` is being processed (embedding and vector storage).
	Chunk_STATE_PENDING_PROCESSING Chunk_State = 1
	// `Chunk` is processed and available for querying.
	Chunk_STATE_ACTIVE Chunk_State = 2
	// `Chunk` failed processing.
	Chunk_STATE_FAILED Chunk_State = 10
)

func (Chunk_State) Descriptor

func (Chunk_State) Enum

func (x Chunk_State) Enum() *Chunk_State

func (Chunk_State) EnumDescriptor

func (Chunk_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use Chunk_State.Descriptor instead.

func (Chunk_State) Number

func (x Chunk_State) Number() protoreflect.EnumNumber

func (Chunk_State) String

func (x Chunk_State) String() string

func (Chunk_State) Type

CitationMetadata

type CitationMetadata struct {

	// Citations to sources for a specific response.
	CitationSources []*CitationSource `protobuf:"bytes,1,rep,name=citation_sources,json=citationSources,proto3" json:"citation_sources,omitempty"`
	// contains filtered or unexported fields
}

A collection of source attributions for a piece of content.

func (*CitationMetadata) Descriptor

func (*CitationMetadata) Descriptor() ([]byte, []int)

Deprecated: Use CitationMetadata.ProtoReflect.Descriptor instead.

func (*CitationMetadata) GetCitationSources

func (x *CitationMetadata) GetCitationSources() []*CitationSource

func (*CitationMetadata) ProtoMessage

func (*CitationMetadata) ProtoMessage()

func (*CitationMetadata) ProtoReflect

func (x *CitationMetadata) ProtoReflect() protoreflect.Message

func (*CitationMetadata) Reset

func (x *CitationMetadata) Reset()

func (*CitationMetadata) String

func (x *CitationMetadata) String() string

CitationSource

type CitationSource struct {

	// Optional. Start of segment of the response that is attributed to this
	// source.
	//
	// Index indicates the start of the segment, measured in bytes.
	StartIndex *int32 `protobuf:"varint,1,opt,name=start_index,json=startIndex,proto3,oneof" json:"start_index,omitempty"`
	// Optional. End of the attributed segment, exclusive.
	EndIndex *int32 `protobuf:"varint,2,opt,name=end_index,json=endIndex,proto3,oneof" json:"end_index,omitempty"`
	// Optional. URI that is attributed as a source for a portion of the text.
	Uri *string `protobuf:"bytes,3,opt,name=uri,proto3,oneof" json:"uri,omitempty"`
	// Optional. License for the GitHub project that is attributed as a source for
	// segment.
	//
	// License info is required for code citations.
	License *string `protobuf:"bytes,4,opt,name=license,proto3,oneof" json:"license,omitempty"`
	// contains filtered or unexported fields
}

A citation to a source for a portion of a specific response.

func (*CitationSource) Descriptor

func (*CitationSource) Descriptor() ([]byte, []int)

Deprecated: Use CitationSource.ProtoReflect.Descriptor instead.

func (*CitationSource) GetEndIndex

func (x *CitationSource) GetEndIndex() int32

func (*CitationSource) GetLicense

func (x *CitationSource) GetLicense() string

func (*CitationSource) GetStartIndex

func (x *CitationSource) GetStartIndex() int32

func (*CitationSource) GetUri

func (x *CitationSource) GetUri() string

func (*CitationSource) ProtoMessage

func (*CitationSource) ProtoMessage()

func (*CitationSource) ProtoReflect

func (x *CitationSource) ProtoReflect() protoreflect.Message

func (*CitationSource) Reset

func (x *CitationSource) Reset()

func (*CitationSource) String

func (x *CitationSource) String() string

CodeExecution

type CodeExecution struct {
	// contains filtered or unexported fields
}

Tool that executes code generated by the model, and automatically returns the result to the model.

See also ExecutableCode and CodeExecutionResult which are only generated when using this tool.

func (*CodeExecution) Descriptor

func (*CodeExecution) Descriptor() ([]byte, []int)

Deprecated: Use CodeExecution.ProtoReflect.Descriptor instead.

func (*CodeExecution) ProtoMessage

func (*CodeExecution) ProtoMessage()

func (*CodeExecution) ProtoReflect

func (x *CodeExecution) ProtoReflect() protoreflect.Message

func (*CodeExecution) Reset

func (x *CodeExecution) Reset()

func (*CodeExecution) String

func (x *CodeExecution) String() string

CodeExecutionResult

type CodeExecutionResult struct {

	// Required. Outcome of the code execution.
	Outcome CodeExecutionResult_Outcome `protobuf:"varint,1,opt,name=outcome,proto3,enum=google.ai.generativelanguage.v1alpha.CodeExecutionResult_Outcome" json:"outcome,omitempty"`
	// Optional. Contains stdout when code execution is successful, stderr or
	// other description otherwise.
	Output string `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

Result of executing the ExecutableCode.

Only generated when using the CodeExecution, and always follows a part containing the ExecutableCode.

func (*CodeExecutionResult) Descriptor

func (*CodeExecutionResult) Descriptor() ([]byte, []int)

Deprecated: Use CodeExecutionResult.ProtoReflect.Descriptor instead.

func (*CodeExecutionResult) GetOutcome

func (*CodeExecutionResult) GetOutput

func (x *CodeExecutionResult) GetOutput() string

func (*CodeExecutionResult) ProtoMessage

func (*CodeExecutionResult) ProtoMessage()

func (*CodeExecutionResult) ProtoReflect

func (x *CodeExecutionResult) ProtoReflect() protoreflect.Message

func (*CodeExecutionResult) Reset

func (x *CodeExecutionResult) Reset()

func (*CodeExecutionResult) String

func (x *CodeExecutionResult) String() string

CodeExecutionResult_Outcome

type CodeExecutionResult_Outcome int32

Enumeration of possible outcomes of the code execution.

CodeExecutionResult_OUTCOME_UNSPECIFIED, CodeExecutionResult_OUTCOME_OK, CodeExecutionResult_OUTCOME_FAILED, CodeExecutionResult_OUTCOME_DEADLINE_EXCEEDED

const (
	// Unspecified status. This value should not be used.
	CodeExecutionResult_OUTCOME_UNSPECIFIED CodeExecutionResult_Outcome = 0
	// Code execution completed successfully.
	CodeExecutionResult_OUTCOME_OK CodeExecutionResult_Outcome = 1
	// Code execution finished but with a failure. `stderr` should contain the
	// reason.
	CodeExecutionResult_OUTCOME_FAILED CodeExecutionResult_Outcome = 2
	// Code execution ran for too long, and was cancelled. There may or may not
	// be a partial output present.
	CodeExecutionResult_OUTCOME_DEADLINE_EXCEEDED CodeExecutionResult_Outcome = 3
)

func (CodeExecutionResult_Outcome) Descriptor

func (CodeExecutionResult_Outcome) Enum

func (CodeExecutionResult_Outcome) EnumDescriptor

func (CodeExecutionResult_Outcome) EnumDescriptor() ([]byte, []int)

Deprecated: Use CodeExecutionResult_Outcome.Descriptor instead.

func (CodeExecutionResult_Outcome) Number

func (CodeExecutionResult_Outcome) String

func (CodeExecutionResult_Outcome) Type

Condition

type Condition struct {

	// The value type must be consistent with the value type defined in the field
	// for the corresponding key. If the value types are not consistent, the
	// result will be an empty set. When the `CustomMetadata` has a `StringList`
	// value type, the filtering condition should use `string_value` paired with
	// an INCLUDES/EXCLUDES operation, otherwise the result will also be an empty
	// set.
	//
	// Types that are assignable to Value:
	//
	//	*Condition_StringValue
	//	*Condition_NumericValue
	Value isCondition_Value `protobuf_oneof:"value"`
	// Required. Operator applied to the given key-value pair to trigger the
	// condition.
	Operation Condition_Operator `protobuf:"varint,5,opt,name=operation,proto3,enum=google.ai.generativelanguage.v1alpha.Condition_Operator" json:"operation,omitempty"`
	// contains filtered or unexported fields
}

Filter condition applicable to a single key.

func (*Condition) Descriptor

func (*Condition) Descriptor() ([]byte, []int)

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetNumericValue

func (x *Condition) GetNumericValue() float32

func (*Condition) GetOperation

func (x *Condition) GetOperation() Condition_Operator

func (*Condition) GetStringValue

func (x *Condition) GetStringValue() string

func (*Condition) GetValue

func (m *Condition) GetValue() isCondition_Value

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect

func (x *Condition) ProtoReflect() protoreflect.Message

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

Condition_NumericValue

type Condition_NumericValue struct {
	// The numeric value to filter the metadata on.
	NumericValue float32 `protobuf:"fixed32,6,opt,name=numeric_value,json=numericValue,proto3,oneof"`
}

Condition_Operator

type Condition_Operator int32

Defines the valid operators that can be applied to a key-value pair.

Condition_OPERATOR_UNSPECIFIED, Condition_LESS, Condition_LESS_EQUAL, Condition_EQUAL, Condition_GREATER_EQUAL, Condition_GREATER, Condition_NOT_EQUAL, Condition_INCLUDES, Condition_EXCLUDES

const (
	// The default value. This value is unused.
	Condition_OPERATOR_UNSPECIFIED Condition_Operator = 0
	// Supported by numeric.
	Condition_LESS Condition_Operator = 1
	// Supported by numeric.
	Condition_LESS_EQUAL Condition_Operator = 2
	// Supported by numeric & string.
	Condition_EQUAL Condition_Operator = 3
	// Supported by numeric.
	Condition_GREATER_EQUAL Condition_Operator = 4
	// Supported by numeric.
	Condition_GREATER Condition_Operator = 5
	// Supported by numeric & string.
	Condition_NOT_EQUAL Condition_Operator = 6
	// Supported by string only when `CustomMetadata` value type for the given
	// key has a `string_list_value`.
	Condition_INCLUDES Condition_Operator = 7
	// Supported by string only when `CustomMetadata` value type for the given
	// key has a `string_list_value`.
	Condition_EXCLUDES Condition_Operator = 8
)

func (Condition_Operator) Descriptor

func (Condition_Operator) Enum

func (Condition_Operator) EnumDescriptor

func (Condition_Operator) EnumDescriptor() ([]byte, []int)

Deprecated: Use Condition_Operator.Descriptor instead.

func (Condition_Operator) Number

func (Condition_Operator) String

func (x Condition_Operator) String() string

func (Condition_Operator) Type

Condition_StringValue

type Condition_StringValue struct {
	// The string value to filter the metadata on.
	StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}

Content

type Content struct {

	// Ordered `Parts` that constitute a single message. Parts may have different
	// MIME types.
	Parts []*Part `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"`
	// Optional. The producer of the content. Must be either 'user' or 'model'.
	//
	// Useful to set for multi-turn conversations, otherwise can be left blank
	// or unset.
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

The base structured datatype containing multi-part content of a message.

A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.

func (*Content) Descriptor

func (*Content) Descriptor() ([]byte, []int)

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetParts

func (x *Content) GetParts() []*Part

func (*Content) GetRole

func (x *Content) GetRole() string

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

func (x *Content) ProtoReflect() protoreflect.Message

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

ContentEmbedding

type ContentEmbedding struct {

	// The embedding values.
	Values []float32 `protobuf:"fixed32,1,rep,packed,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

A list of floats representing an embedding.

func (*ContentEmbedding) Descriptor

func (*ContentEmbedding) Descriptor() ([]byte, []int)

Deprecated: Use ContentEmbedding.ProtoReflect.Descriptor instead.

func (*ContentEmbedding) GetValues

func (x *ContentEmbedding) GetValues() []float32

func (*ContentEmbedding) ProtoMessage

func (*ContentEmbedding) ProtoMessage()

func (*ContentEmbedding) ProtoReflect

func (x *ContentEmbedding) ProtoReflect() protoreflect.Message

func (*ContentEmbedding) Reset

func (x *ContentEmbedding) Reset()

func (*ContentEmbedding) String

func (x *ContentEmbedding) String() string

ContentFilter

type ContentFilter struct {

	// The reason content was blocked during request processing.
	Reason ContentFilter_BlockedReason `protobuf:"varint,1,opt,name=reason,proto3,enum=google.ai.generativelanguage.v1alpha.ContentFilter_BlockedReason" json:"reason,omitempty"`
	// A string that describes the filtering behavior in more detail.
	Message *string `protobuf:"bytes,2,opt,name=message,proto3,oneof" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Content filtering metadata associated with processing a single request.

ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.

func (*ContentFilter) Descriptor

func (*ContentFilter) Descriptor() ([]byte, []int)

Deprecated: Use ContentFilter.ProtoReflect.Descriptor instead.

func (*ContentFilter) GetMessage

func (x *ContentFilter) GetMessage() string

func (*ContentFilter) GetReason

func (*ContentFilter) ProtoMessage

func (*ContentFilter) ProtoMessage()

func (*ContentFilter) ProtoReflect

func (x *ContentFilter) ProtoReflect() protoreflect.Message

func (*ContentFilter) Reset

func (x *ContentFilter) Reset()

func (*ContentFilter) String

func (x *ContentFilter) String() string

ContentFilter_BlockedReason

type ContentFilter_BlockedReason int32

A list of reasons why content may have been blocked.

ContentFilter_BLOCKED_REASON_UNSPECIFIED, ContentFilter_SAFETY, ContentFilter_OTHER

const (
	// A blocked reason was not specified.
	ContentFilter_BLOCKED_REASON_UNSPECIFIED ContentFilter_BlockedReason = 0
	// Content was blocked by safety settings.
	ContentFilter_SAFETY ContentFilter_BlockedReason = 1
	// Content was blocked, but the reason is uncategorized.
	ContentFilter_OTHER ContentFilter_BlockedReason = 2
)

func (ContentFilter_BlockedReason) Descriptor

func (ContentFilter_BlockedReason) Enum

func (ContentFilter_BlockedReason) EnumDescriptor

func (ContentFilter_BlockedReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use ContentFilter_BlockedReason.Descriptor instead.

func (ContentFilter_BlockedReason) Number

func (ContentFilter_BlockedReason) String

func (ContentFilter_BlockedReason) Type

Corpus

type Corpus struct {

	// Immutable. Identifier. The `Corpus` resource name. The ID (name excluding
	// the "corpora/" prefix) can contain up to 40 characters that are lowercase
	// alphanumeric or dashes
	// (-). The ID cannot start or end with a dash. If the name is empty on
	// create, a unique name will be derived from `display_name` along with a 12
	// character random suffix.
	// Example: `corpora/my-awesome-corpora-123a456b789c`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. The human-readable display name for the `Corpus`. The display
	// name must be no more than 512 characters in length, including spaces.
	// Example: "Docs on Semantic Retriever"
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Output only. The Timestamp of when the `Corpus` was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. The Timestamp of when the `Corpus` was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// contains filtered or unexported fields
}

A Corpus is a collection of Documents. A project can create up to 5 corpora.

func (*Corpus) Descriptor

func (*Corpus) Descriptor() ([]byte, []int)

Deprecated: Use Corpus.ProtoReflect.Descriptor instead.

func (*Corpus) GetCreateTime

func (x *Corpus) GetCreateTime() *timestamppb.Timestamp

func (*Corpus) GetDisplayName

func (x *Corpus) GetDisplayName() string

func (*Corpus) GetName

func (x *Corpus) GetName() string

func (*Corpus) GetUpdateTime

func (x *Corpus) GetUpdateTime() *timestamppb.Timestamp

func (*Corpus) ProtoMessage

func (*Corpus) ProtoMessage()

func (*Corpus) ProtoReflect

func (x *Corpus) ProtoReflect() protoreflect.Message

func (*Corpus) Reset

func (x *Corpus) Reset()

func (*Corpus) String

func (x *Corpus) String() string

CountMessageTokensRequest

type CountMessageTokensRequest struct {

	// Required. The model's resource name. This serves as an ID for the Model to
	// use.
	//
	// This name should match a model name returned by the `ListModels` method.
	//
	// Format: `models/{model}`
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The prompt, whose token count is to be returned.
	Prompt *MessagePrompt `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// contains filtered or unexported fields
}

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

func (*CountMessageTokensRequest) Descriptor

func (*CountMessageTokensRequest) Descriptor() ([]byte, []int)

Deprecated: Use CountMessageTokensRequest.ProtoReflect.Descriptor instead.

func (*CountMessageTokensRequest) GetModel

func (x *CountMessageTokensRequest) GetModel() string

func (*CountMessageTokensRequest) GetPrompt

func (x *CountMessageTokensRequest) GetPrompt() *MessagePrompt

func (*CountMessageTokensRequest) ProtoMessage

func (*CountMessageTokensRequest) ProtoMessage()

func (*CountMessageTokensRequest) ProtoReflect

func (*CountMessageTokensRequest) Reset

func (x *CountMessageTokensRequest) Reset()

func (*CountMessageTokensRequest) String

func (x *CountMessageTokensRequest) String() string

CountMessageTokensResponse

type CountMessageTokensResponse struct {

	// The number of tokens that the `model` tokenizes the `prompt` into.
	//
	// Always non-negative.
	TokenCount int32 `protobuf:"varint,1,opt,name=token_count,json=tokenCount,proto3" json:"token_count,omitempty"`
	// contains filtered or unexported fields
}

A response from CountMessageTokens.

It returns the model's token_count for the prompt.

func (*CountMessageTokensResponse) Descriptor

func (*CountMessageTokensResponse) Descriptor() ([]byte, []int)

Deprecated: Use CountMessageTokensResponse.ProtoReflect.Descriptor instead.

func (*CountMessageTokensResponse) GetTokenCount

func (x *CountMessageTokensResponse) GetTokenCount() int32

func (*CountMessageTokensResponse) ProtoMessage

func (*CountMessageTokensResponse) ProtoMessage()

func (*CountMessageTokensResponse) ProtoReflect

func (*CountMessageTokensResponse) Reset

func (x *CountMessageTokensResponse) Reset()

func (*CountMessageTokensResponse) String

func (x *CountMessageTokensResponse) String() string

CountTextTokensRequest

type CountTextTokensRequest struct {

	// Required. The model's resource name. This serves as an ID for the Model to
	// use.
	//
	// This name should match a model name returned by the `ListModels` method.
	//
	// Format: `models/{model}`
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The free-form input text given to the model as a prompt.
	Prompt *TextPrompt `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// contains filtered or unexported fields
}

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

func (*CountTextTokensRequest) Descriptor

func (*CountTextTokensRequest) Descriptor() ([]byte, []int)

Deprecated: Use CountTextTokensRequest.ProtoReflect.Descriptor instead.

func (*CountTextTokensRequest) GetModel

func (x *CountTextTokensRequest) GetModel() string

func (*CountTextTokensRequest) GetPrompt

func (x *CountTextTokensRequest) GetPrompt() *TextPrompt

func (*CountTextTokensRequest) ProtoMessage

func (*CountTextTokensRequest) ProtoMessage()

func (*CountTextTokensRequest) ProtoReflect

func (x *CountTextTokensRequest) ProtoReflect() protoreflect.Message

func (*CountTextTokensRequest) Reset

func (x *CountTextTokensRequest) Reset()

func (*CountTextTokensRequest) String

func (x *CountTextTokensRequest) String() string

CountTextTokensResponse

type CountTextTokensResponse struct {

	// The number of tokens that the `model` tokenizes the `prompt` into.
	//
	// Always non-negative.
	TokenCount int32 `protobuf:"varint,1,opt,name=token_count,json=tokenCount,proto3" json:"token_count,omitempty"`
	// contains filtered or unexported fields
}

A response from CountTextTokens.

It returns the model's token_count for the prompt.

func (*CountTextTokensResponse) Descriptor

func (*CountTextTokensResponse) Descriptor() ([]byte, []int)

Deprecated: Use CountTextTokensResponse.ProtoReflect.Descriptor instead.

func (*CountTextTokensResponse) GetTokenCount

func (x *CountTextTokensResponse) GetTokenCount() int32

func (*CountTextTokensResponse) ProtoMessage

func (*CountTextTokensResponse) ProtoMessage()

func (*CountTextTokensResponse) ProtoReflect

func (x *CountTextTokensResponse) ProtoReflect() protoreflect.Message

func (*CountTextTokensResponse) Reset

func (x *CountTextTokensResponse) Reset()

func (*CountTextTokensResponse) String

func (x *CountTextTokensResponse) String() string

CountTokensRequest

type CountTokensRequest struct {

	// Required. The model's resource name. This serves as an ID for the Model to
	// use.
	//
	// This name should match a model name returned by the `ListModels` method.
	//
	// Format: `models/{model}`
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. The input given to the model as a prompt. This field is ignored
	// when `generate_content_request` is set.
	Contents []*Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
	// Optional. The overall input given to the `Model`. This includes the prompt
	// as well as other model steering information like [system
	// instructions](https://ai.google.dev/gemini-api/docs/system-instructions),
	// and/or function declarations for [function
	// calling](https://ai.google.dev/gemini-api/docs/function-calling).
	// `Model`s/`Content`s and `generate_content_request`s are mutually
	// exclusive. You can either send `Model` + `Content`s or a
	// `generate_content_request`, but never both.
	GenerateContentRequest *GenerateContentRequest `protobuf:"bytes,3,opt,name=generate_content_request,json=generateContentRequest,proto3" json:"generate_content_request,omitempty"`
	// contains filtered or unexported fields
}

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

func (*CountTokensRequest) Descriptor

func (*CountTokensRequest) Descriptor() ([]byte, []int)

Deprecated: Use CountTokensRequest.ProtoReflect.Descriptor instead.

func (*CountTokensRequest) GetContents

func (x *CountTokensRequest) GetContents() []*Content

func (*CountTokensRequest) GetGenerateContentRequest

func (x *CountTokensRequest) GetGenerateContentRequest() *GenerateContentRequest

func (*CountTokensRequest) GetModel

func (x *CountTokensRequest) GetModel() string

func (*CountTokensRequest) ProtoMessage

func (*CountTokensRequest) ProtoMessage()

func (*CountTokensRequest) ProtoReflect

func (x *CountTokensRequest) ProtoReflect() protoreflect.Message

func (*CountTokensRequest) Reset

func (x *CountTokensRequest) Reset()

func (*CountTokensRequest) String

func (x *CountTokensRequest) String() string

CountTokensResponse

type CountTokensResponse struct {

	// The number of tokens that the `Model` tokenizes the `prompt` into. Always
	// non-negative.
	TotalTokens int32 `protobuf:"varint,1,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"`
	// Number of tokens in the cached part of the prompt (the cached content).
	CachedContentTokenCount int32 `protobuf:"varint,5,opt,name=cached_content_token_count,json=cachedContentTokenCount,proto3" json:"cached_content_token_count,omitempty"`
	// contains filtered or unexported fields
}

A response from CountTokens.

It returns the model's token_count for the prompt.

func (*CountTokensResponse) Descriptor

func (*CountTokensResponse) Descriptor() ([]byte, []int)

Deprecated: Use CountTokensResponse.ProtoReflect.Descriptor instead.

func (*CountTokensResponse) GetCachedContentTokenCount

func (x *CountTokensResponse) GetCachedContentTokenCount() int32

func (*CountTokensResponse) GetTotalTokens

func (x *CountTokensResponse) GetTotalTokens() int32

func (*CountTokensResponse) ProtoMessage

func (*CountTokensResponse) ProtoMessage()

func (*CountTokensResponse) ProtoReflect

func (x *CountTokensResponse) ProtoReflect() protoreflect.Message

func (*CountTokensResponse) Reset

func (x *CountTokensResponse) Reset()

func (*CountTokensResponse) String

func (x *CountTokensResponse) String() string

CreateCachedContentRequest

type CreateCachedContentRequest struct {

	// Required. The cached content to create.
	CachedContent *CachedContent `protobuf:"bytes,1,opt,name=cached_content,json=cachedContent,proto3" json:"cached_content,omitempty"`
	// contains filtered or unexported fields
}

Request to create CachedContent.

func (*CreateCachedContentRequest) Descriptor

func (*CreateCachedContentRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateCachedContentRequest.ProtoReflect.Descriptor instead.

func (*CreateCachedContentRequest) GetCachedContent

func (x *CreateCachedContentRequest) GetCachedContent() *CachedContent

func (*CreateCachedContentRequest) ProtoMessage

func (*CreateCachedContentRequest) ProtoMessage()

func (*CreateCachedContentRequest) ProtoReflect

func (*CreateCachedContentRequest) Reset

func (x *CreateCachedContentRequest) Reset()

func (*CreateCachedContentRequest) String

func (x *CreateCachedContentRequest) String() string

CreateChunkRequest

type CreateChunkRequest struct {

	// Required. The name of the `Document` where this `Chunk` will be created.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The `Chunk` to create.
	Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

Request to create a Chunk.

func (*CreateChunkRequest) Descriptor

func (*CreateChunkRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateChunkRequest.ProtoReflect.Descriptor instead.

func (*CreateChunkRequest) GetChunk

func (x *CreateChunkRequest) GetChunk() *Chunk

func (*CreateChunkRequest) GetParent

func (x *CreateChunkRequest) GetParent() string

func (*CreateChunkRequest) ProtoMessage

func (*CreateChunkRequest) ProtoMessage()

func (*CreateChunkRequest) ProtoReflect

func (x *CreateChunkRequest) ProtoReflect() protoreflect.Message

func (*CreateChunkRequest) Reset

func (x *CreateChunkRequest) Reset()

func (*CreateChunkRequest) String

func (x *CreateChunkRequest) String() string

CreateCorpusRequest

type CreateCorpusRequest struct {

	// Required. The `Corpus` to create.
	Corpus *Corpus `protobuf:"bytes,1,opt,name=corpus,proto3" json:"corpus,omitempty"`
	// contains filtered or unexported fields
}

Request to create a Corpus.

func (*CreateCorpusRequest) Descriptor

func (*CreateCorpusRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateCorpusRequest.ProtoReflect.Descriptor instead.

func (*CreateCorpusRequest) GetCorpus

func (x *CreateCorpusRequest) GetCorpus() *Corpus

func (*CreateCorpusRequest) ProtoMessage

func (*CreateCorpusRequest) ProtoMessage()

func (*CreateCorpusRequest) ProtoReflect

func (x *CreateCorpusRequest) ProtoReflect() protoreflect.Message

func (*CreateCorpusRequest) Reset

func (x *CreateCorpusRequest) Reset()

func (*CreateCorpusRequest) String

func (x *CreateCorpusRequest) String() string

CreateDocumentRequest

type CreateDocumentRequest struct {

	// Required. The name of the `Corpus` where this `Document` will be created.
	// Example: `corpora/my-corpus-123`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The `Document` to create.
	Document *Document `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"`
	// contains filtered or unexported fields
}

Request to create a Document.

func (*CreateDocumentRequest) Descriptor

func (*CreateDocumentRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateDocumentRequest.ProtoReflect.Descriptor instead.

func (*CreateDocumentRequest) GetDocument

func (x *CreateDocumentRequest) GetDocument() *Document

func (*CreateDocumentRequest) GetParent

func (x *CreateDocumentRequest) GetParent() string

func (*CreateDocumentRequest) ProtoMessage

func (*CreateDocumentRequest) ProtoMessage()

func (*CreateDocumentRequest) ProtoReflect

func (x *CreateDocumentRequest) ProtoReflect() protoreflect.Message

func (*CreateDocumentRequest) Reset

func (x *CreateDocumentRequest) Reset()

func (*CreateDocumentRequest) String

func (x *CreateDocumentRequest) String() string

CreateFileRequest

type CreateFileRequest struct {

	// Optional. Metadata for the file to create.
	File *File `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

Request for CreateFile.

func (*CreateFileRequest) Descriptor

func (*CreateFileRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateFileRequest.ProtoReflect.Descriptor instead.

func (*CreateFileRequest) GetFile

func (x *CreateFileRequest) GetFile() *File

func (*CreateFileRequest) ProtoMessage

func (*CreateFileRequest) ProtoMessage()

func (*CreateFileRequest) ProtoReflect

func (x *CreateFileRequest) ProtoReflect() protoreflect.Message

func (*CreateFileRequest) Reset

func (x *CreateFileRequest) Reset()

func (*CreateFileRequest) String

func (x *CreateFileRequest) String() string

CreateFileResponse

type CreateFileResponse struct {

	// Metadata for the created file.
	File *File `protobuf:"bytes,1,opt,name=file,proto3" json:"file,omitempty"`
	// contains filtered or unexported fields
}

Response for CreateFile.

func (*CreateFileResponse) Descriptor

func (*CreateFileResponse) Descriptor() ([]byte, []int)

Deprecated: Use CreateFileResponse.ProtoReflect.Descriptor instead.

func (*CreateFileResponse) GetFile

func (x *CreateFileResponse) GetFile() *File

func (*CreateFileResponse) ProtoMessage

func (*CreateFileResponse) ProtoMessage()

func (*CreateFileResponse) ProtoReflect

func (x *CreateFileResponse) ProtoReflect() protoreflect.Message

func (*CreateFileResponse) Reset

func (x *CreateFileResponse) Reset()

func (*CreateFileResponse) String

func (x *CreateFileResponse) String() string

CreatePermissionRequest

type CreatePermissionRequest struct {

	// Required. The parent resource of the `Permission`.
	// Formats:
	//
	//	`tunedModels/{tuned_model}`
	//	`corpora/{corpus}`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Required. The permission to create.
	Permission *Permission `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
	// contains filtered or unexported fields
}

Request to create a Permission.

func (*CreatePermissionRequest) Descriptor

func (*CreatePermissionRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreatePermissionRequest.ProtoReflect.Descriptor instead.

func (*CreatePermissionRequest) GetParent

func (x *CreatePermissionRequest) GetParent() string

func (*CreatePermissionRequest) GetPermission

func (x *CreatePermissionRequest) GetPermission() *Permission

func (*CreatePermissionRequest) ProtoMessage

func (*CreatePermissionRequest) ProtoMessage()

func (*CreatePermissionRequest) ProtoReflect

func (x *CreatePermissionRequest) ProtoReflect() protoreflect.Message

func (*CreatePermissionRequest) Reset

func (x *CreatePermissionRequest) Reset()

func (*CreatePermissionRequest) String

func (x *CreatePermissionRequest) String() string

CreateTunedModelMetadata

type CreateTunedModelMetadata struct {

	// Name of the tuned model associated with the tuning operation.
	TunedModel string `protobuf:"bytes,5,opt,name=tuned_model,json=tunedModel,proto3" json:"tuned_model,omitempty"`
	// The total number of tuning steps.
	TotalSteps int32 `protobuf:"varint,1,opt,name=total_steps,json=totalSteps,proto3" json:"total_steps,omitempty"`
	// The number of steps completed.
	CompletedSteps int32 `protobuf:"varint,2,opt,name=completed_steps,json=completedSteps,proto3" json:"completed_steps,omitempty"`
	// The completed percentage for the tuning operation.
	CompletedPercent float32 `protobuf:"fixed32,3,opt,name=completed_percent,json=completedPercent,proto3" json:"completed_percent,omitempty"`
	// Metrics collected during tuning.
	Snapshots []*TuningSnapshot `protobuf:"bytes,4,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
	// contains filtered or unexported fields
}

Metadata about the state and progress of creating a tuned model returned from the long-running operation

func (*CreateTunedModelMetadata) Descriptor

func (*CreateTunedModelMetadata) Descriptor() ([]byte, []int)

Deprecated: Use CreateTunedModelMetadata.ProtoReflect.Descriptor instead.

func (*CreateTunedModelMetadata) GetCompletedPercent

func (x *CreateTunedModelMetadata) GetCompletedPercent() float32

func (*CreateTunedModelMetadata) GetCompletedSteps

func (x *CreateTunedModelMetadata) GetCompletedSteps() int32

func (*CreateTunedModelMetadata) GetSnapshots

func (x *CreateTunedModelMetadata) GetSnapshots() []*TuningSnapshot

func (*CreateTunedModelMetadata) GetTotalSteps

func (x *CreateTunedModelMetadata) GetTotalSteps() int32

func (*CreateTunedModelMetadata) GetTunedModel

func (x *CreateTunedModelMetadata) GetTunedModel() string

func (*CreateTunedModelMetadata) ProtoMessage

func (*CreateTunedModelMetadata) ProtoMessage()

func (*CreateTunedModelMetadata) ProtoReflect

func (x *CreateTunedModelMetadata) ProtoReflect() protoreflect.Message

func (*CreateTunedModelMetadata) Reset

func (x *CreateTunedModelMetadata) Reset()

func (*CreateTunedModelMetadata) String

func (x *CreateTunedModelMetadata) String() string

CreateTunedModelRequest

type CreateTunedModelRequest struct {

	// Optional. The unique id for the tuned model if specified.
	// This value should be up to 40 characters, the first character must be a
	// letter, the last could be a letter or a number. The id must match the
	// regular expression: `[a-z]([a-z0-9-]{0,38}[a-z0-9])?`.
	TunedModelId *string `protobuf:"bytes,1,opt,name=tuned_model_id,json=tunedModelId,proto3,oneof" json:"tuned_model_id,omitempty"`
	// Required. The tuned model to create.
	TunedModel *TunedModel `protobuf:"bytes,2,opt,name=tuned_model,json=tunedModel,proto3" json:"tuned_model,omitempty"`
	// contains filtered or unexported fields
}

Request to create a TunedModel.

func (*CreateTunedModelRequest) Descriptor

func (*CreateTunedModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use CreateTunedModelRequest.ProtoReflect.Descriptor instead.

func (*CreateTunedModelRequest) GetTunedModel

func (x *CreateTunedModelRequest) GetTunedModel() *TunedModel

func (*CreateTunedModelRequest) GetTunedModelId

func (x *CreateTunedModelRequest) GetTunedModelId() string

func (*CreateTunedModelRequest) ProtoMessage

func (*CreateTunedModelRequest) ProtoMessage()

func (*CreateTunedModelRequest) ProtoReflect

func (x *CreateTunedModelRequest) ProtoReflect() protoreflect.Message

func (*CreateTunedModelRequest) Reset

func (x *CreateTunedModelRequest) Reset()

func (*CreateTunedModelRequest) String

func (x *CreateTunedModelRequest) String() string

CustomMetadata

type CustomMetadata struct {

	// Types that are assignable to Value:
	//
	//	*CustomMetadata_StringValue
	//	*CustomMetadata_StringListValue
	//	*CustomMetadata_NumericValue
	Value isCustomMetadata_Value `protobuf_oneof:"value"`
	// Required. The key of the metadata to store.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

User provided metadata stored as key-value pairs.

func (*CustomMetadata) Descriptor

func (*CustomMetadata) Descriptor() ([]byte, []int)

Deprecated: Use CustomMetadata.ProtoReflect.Descriptor instead.

func (*CustomMetadata) GetKey

func (x *CustomMetadata) GetKey() string

func (*CustomMetadata) GetNumericValue

func (x *CustomMetadata) GetNumericValue() float32

func (*CustomMetadata) GetStringListValue

func (x *CustomMetadata) GetStringListValue() *StringList

func (*CustomMetadata) GetStringValue

func (x *CustomMetadata) GetStringValue() string

func (*CustomMetadata) GetValue

func (m *CustomMetadata) GetValue() isCustomMetadata_Value

func (*CustomMetadata) ProtoMessage

func (*CustomMetadata) ProtoMessage()

func (*CustomMetadata) ProtoReflect

func (x *CustomMetadata) ProtoReflect() protoreflect.Message

func (*CustomMetadata) Reset

func (x *CustomMetadata) Reset()

func (*CustomMetadata) String

func (x *CustomMetadata) String() string

CustomMetadata_NumericValue

type CustomMetadata_NumericValue struct {
	// The numeric value of the metadata to store.
	NumericValue float32 `protobuf:"fixed32,7,opt,name=numeric_value,json=numericValue,proto3,oneof"`
}

CustomMetadata_StringListValue

type CustomMetadata_StringListValue struct {
	// The StringList value of the metadata to store.
	StringListValue *StringList `protobuf:"bytes,6,opt,name=string_list_value,json=stringListValue,proto3,oneof"`
}

CustomMetadata_StringValue

type CustomMetadata_StringValue struct {
	// The string value of the metadata to store.
	StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"`
}

Dataset

type Dataset struct {

	// Inline data or a reference to the data.
	//
	// Types that are assignable to Dataset:
	//
	//	*Dataset_Examples
	Dataset isDataset_Dataset `protobuf_oneof:"dataset"`
	// contains filtered or unexported fields
}

Dataset for training or validation.

func (*Dataset) Descriptor

func (*Dataset) Descriptor() ([]byte, []int)

Deprecated: Use Dataset.ProtoReflect.Descriptor instead.

func (*Dataset) GetDataset

func (m *Dataset) GetDataset() isDataset_Dataset

func (*Dataset) GetExamples

func (x *Dataset) GetExamples() *TuningExamples

func (*Dataset) ProtoMessage

func (*Dataset) ProtoMessage()

func (*Dataset) ProtoReflect

func (x *Dataset) ProtoReflect() protoreflect.Message

func (*Dataset) Reset

func (x *Dataset) Reset()

func (*Dataset) String

func (x *Dataset) String() string

Dataset_Examples

type Dataset_Examples struct {
	// Optional. Inline examples with simple input/output text.
	Examples *TuningExamples `protobuf:"bytes,1,opt,name=examples,proto3,oneof"`
}

DeleteCachedContentRequest

type DeleteCachedContentRequest struct {

	// Required. The resource name referring to the content cache entry
	// Format: `cachedContents/{id}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to delete CachedContent.

func (*DeleteCachedContentRequest) Descriptor

func (*DeleteCachedContentRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteCachedContentRequest.ProtoReflect.Descriptor instead.

func (*DeleteCachedContentRequest) GetName

func (x *DeleteCachedContentRequest) GetName() string

func (*DeleteCachedContentRequest) ProtoMessage

func (*DeleteCachedContentRequest) ProtoMessage()

func (*DeleteCachedContentRequest) ProtoReflect

func (*DeleteCachedContentRequest) Reset

func (x *DeleteCachedContentRequest) Reset()

func (*DeleteCachedContentRequest) String

func (x *DeleteCachedContentRequest) String() string

DeleteChunkRequest

type DeleteChunkRequest struct {

	// Required. The resource name of the `Chunk` to delete.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc/chunks/some-chunk`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to delete a Chunk.

func (*DeleteChunkRequest) Descriptor

func (*DeleteChunkRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteChunkRequest.ProtoReflect.Descriptor instead.

func (*DeleteChunkRequest) GetName

func (x *DeleteChunkRequest) GetName() string

func (*DeleteChunkRequest) ProtoMessage

func (*DeleteChunkRequest) ProtoMessage()

func (*DeleteChunkRequest) ProtoReflect

func (x *DeleteChunkRequest) ProtoReflect() protoreflect.Message

func (*DeleteChunkRequest) Reset

func (x *DeleteChunkRequest) Reset()

func (*DeleteChunkRequest) String

func (x *DeleteChunkRequest) String() string

DeleteCorpusRequest

type DeleteCorpusRequest struct {

	// Required. The resource name of the `Corpus`.
	// Example: `corpora/my-corpus-123`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. If set to true, any `Document`s and objects related to this
	// `Corpus` will also be deleted.
	//
	// If false (the default), a `FAILED_PRECONDITION` error will be returned if
	// `Corpus` contains any `Document`s.
	Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
	// contains filtered or unexported fields
}

Request to delete a Corpus.

func (*DeleteCorpusRequest) Descriptor

func (*DeleteCorpusRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteCorpusRequest.ProtoReflect.Descriptor instead.

func (*DeleteCorpusRequest) GetForce

func (x *DeleteCorpusRequest) GetForce() bool

func (*DeleteCorpusRequest) GetName

func (x *DeleteCorpusRequest) GetName() string

func (*DeleteCorpusRequest) ProtoMessage

func (*DeleteCorpusRequest) ProtoMessage()

func (*DeleteCorpusRequest) ProtoReflect

func (x *DeleteCorpusRequest) ProtoReflect() protoreflect.Message

func (*DeleteCorpusRequest) Reset

func (x *DeleteCorpusRequest) Reset()

func (*DeleteCorpusRequest) String

func (x *DeleteCorpusRequest) String() string

DeleteDocumentRequest

type DeleteDocumentRequest struct {

	// Required. The resource name of the `Document` to delete.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. If set to true, any `Chunk`s and objects related to this
	// `Document` will also be deleted.
	//
	// If false (the default), a `FAILED_PRECONDITION` error will be returned if
	// `Document` contains any `Chunk`s.
	Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
	// contains filtered or unexported fields
}

Request to delete a Document.

func (*DeleteDocumentRequest) Descriptor

func (*DeleteDocumentRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteDocumentRequest.ProtoReflect.Descriptor instead.

func (*DeleteDocumentRequest) GetForce

func (x *DeleteDocumentRequest) GetForce() bool

func (*DeleteDocumentRequest) GetName

func (x *DeleteDocumentRequest) GetName() string

func (*DeleteDocumentRequest) ProtoMessage

func (*DeleteDocumentRequest) ProtoMessage()

func (*DeleteDocumentRequest) ProtoReflect

func (x *DeleteDocumentRequest) ProtoReflect() protoreflect.Message

func (*DeleteDocumentRequest) Reset

func (x *DeleteDocumentRequest) Reset()

func (*DeleteDocumentRequest) String

func (x *DeleteDocumentRequest) String() string

DeleteFileRequest

type DeleteFileRequest struct {

	// Required. The name of the `File` to delete.
	// Example: `files/abc-123`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for DeleteFile.

func (*DeleteFileRequest) Descriptor

func (*DeleteFileRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteFileRequest.ProtoReflect.Descriptor instead.

func (*DeleteFileRequest) GetName

func (x *DeleteFileRequest) GetName() string

func (*DeleteFileRequest) ProtoMessage

func (*DeleteFileRequest) ProtoMessage()

func (*DeleteFileRequest) ProtoReflect

func (x *DeleteFileRequest) ProtoReflect() protoreflect.Message

func (*DeleteFileRequest) Reset

func (x *DeleteFileRequest) Reset()

func (*DeleteFileRequest) String

func (x *DeleteFileRequest) String() string

DeletePermissionRequest

type DeletePermissionRequest struct {

	// Required. The resource name of the permission.
	// Formats:
	//
	//	`tunedModels/{tuned_model}/permissions/{permission}`
	//	`corpora/{corpus}/permissions/{permission}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to delete the Permission.

func (*DeletePermissionRequest) Descriptor

func (*DeletePermissionRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeletePermissionRequest.ProtoReflect.Descriptor instead.

func (*DeletePermissionRequest) GetName

func (x *DeletePermissionRequest) GetName() string

func (*DeletePermissionRequest) ProtoMessage

func (*DeletePermissionRequest) ProtoMessage()

func (*DeletePermissionRequest) ProtoReflect

func (x *DeletePermissionRequest) ProtoReflect() protoreflect.Message

func (*DeletePermissionRequest) Reset

func (x *DeletePermissionRequest) Reset()

func (*DeletePermissionRequest) String

func (x *DeletePermissionRequest) String() string

DeleteTunedModelRequest

type DeleteTunedModelRequest struct {

	// Required. The resource name of the model.
	// Format: `tunedModels/my-model-id`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to delete a TunedModel.

func (*DeleteTunedModelRequest) Descriptor

func (*DeleteTunedModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use DeleteTunedModelRequest.ProtoReflect.Descriptor instead.

func (*DeleteTunedModelRequest) GetName

func (x *DeleteTunedModelRequest) GetName() string

func (*DeleteTunedModelRequest) ProtoMessage

func (*DeleteTunedModelRequest) ProtoMessage()

func (*DeleteTunedModelRequest) ProtoReflect

func (x *DeleteTunedModelRequest) ProtoReflect() protoreflect.Message

func (*DeleteTunedModelRequest) Reset

func (x *DeleteTunedModelRequest) Reset()

func (*DeleteTunedModelRequest) String

func (x *DeleteTunedModelRequest) String() string

DiscussServiceClient

type DiscussServiceClient interface {
	// Generates a response from the model given an input `MessagePrompt`.
	GenerateMessage(ctx context.Context, in *GenerateMessageRequest, opts ...grpc.CallOption) (*GenerateMessageResponse, error)
	// Runs a model's tokenizer on a string and returns the token count.
	CountMessageTokens(ctx context.Context, in *CountMessageTokensRequest, opts ...grpc.CallOption) (*CountMessageTokensResponse, error)
}

DiscussServiceClient is the client API for DiscussService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewDiscussServiceClient

func NewDiscussServiceClient(cc grpc.ClientConnInterface) DiscussServiceClient

DiscussServiceServer

type DiscussServiceServer interface {
	// Generates a response from the model given an input `MessagePrompt`.
	GenerateMessage(context.Context, *GenerateMessageRequest) (*GenerateMessageResponse, error)
	// Runs a model's tokenizer on a string and returns the token count.
	CountMessageTokens(context.Context, *CountMessageTokensRequest) (*CountMessageTokensResponse, error)
}

DiscussServiceServer is the server API for DiscussService service. All implementations should embed UnimplementedDiscussServiceServer for forward compatibility

Document

type Document struct {

	// Immutable. Identifier. The `Document` resource name. The ID (name excluding
	// the "corpora/*/documents/" prefix) can contain up to 40 characters that are
	// lowercase alphanumeric or dashes (-). The ID cannot start or end with a
	// dash. If the name is empty on create, a unique name will be derived from
	// `display_name` along with a 12 character random suffix.
	// Example: `corpora/{corpus_id}/documents/my-awesome-doc-123a456b789c`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. The human-readable display name for the `Document`. The display
	// name must be no more than 512 characters in length, including spaces.
	// Example: "Semantic Retriever Documentation"
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Optional. User provided custom metadata stored as key-value pairs used for
	// querying. A `Document` can have a maximum of 20 `CustomMetadata`.
	CustomMetadata []*CustomMetadata `protobuf:"bytes,3,rep,name=custom_metadata,json=customMetadata,proto3" json:"custom_metadata,omitempty"`
	// Output only. The Timestamp of when the `Document` was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Output only. The Timestamp of when the `Document` was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// contains filtered or unexported fields
}

A Document is a collection of Chunks. A Corpus can have a maximum of 10,000 Documents.

func (*Document) Descriptor

func (*Document) Descriptor() ([]byte, []int)

Deprecated: Use Document.ProtoReflect.Descriptor instead.

func (*Document) GetCreateTime

func (x *Document) GetCreateTime() *timestamppb.Timestamp

func (*Document) GetCustomMetadata

func (x *Document) GetCustomMetadata() []*CustomMetadata

func (*Document) GetDisplayName

func (x *Document) GetDisplayName() string

func (*Document) GetName

func (x *Document) GetName() string

func (*Document) GetUpdateTime

func (x *Document) GetUpdateTime() *timestamppb.Timestamp

func (*Document) ProtoMessage

func (*Document) ProtoMessage()

func (*Document) ProtoReflect

func (x *Document) ProtoReflect() protoreflect.Message

func (*Document) Reset

func (x *Document) Reset()

func (*Document) String

func (x *Document) String() string

DynamicRetrievalConfig

type DynamicRetrievalConfig struct {

	// The mode of the predictor to be used in dynamic retrieval.
	Mode DynamicRetrievalConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.ai.generativelanguage.v1alpha.DynamicRetrievalConfig_Mode" json:"mode,omitempty"`
	// The threshold to be used in dynamic retrieval.
	// If not set, a system default value is used.
	DynamicThreshold *float32 `protobuf:"fixed32,2,opt,name=dynamic_threshold,json=dynamicThreshold,proto3,oneof" json:"dynamic_threshold,omitempty"`
	// contains filtered or unexported fields
}

Describes the options to customize dynamic retrieval.

func (*DynamicRetrievalConfig) Descriptor

func (*DynamicRetrievalConfig) Descriptor() ([]byte, []int)

Deprecated: Use DynamicRetrievalConfig.ProtoReflect.Descriptor instead.

func (*DynamicRetrievalConfig) GetDynamicThreshold

func (x *DynamicRetrievalConfig) GetDynamicThreshold() float32

func (*DynamicRetrievalConfig) GetMode

func (*DynamicRetrievalConfig) ProtoMessage

func (*DynamicRetrievalConfig) ProtoMessage()

func (*DynamicRetrievalConfig) ProtoReflect

func (x *DynamicRetrievalConfig) ProtoReflect() protoreflect.Message

func (*DynamicRetrievalConfig) Reset

func (x *DynamicRetrievalConfig) Reset()

func (*DynamicRetrievalConfig) String

func (x *DynamicRetrievalConfig) String() string

DynamicRetrievalConfig_Mode

type DynamicRetrievalConfig_Mode int32

The mode of the predictor to be used in dynamic retrieval.

DynamicRetrievalConfig_MODE_UNSPECIFIED, DynamicRetrievalConfig_MODE_DYNAMIC

const (
	// Always trigger retrieval.
	DynamicRetrievalConfig_MODE_UNSPECIFIED DynamicRetrievalConfig_Mode = 0
	// Run retrieval only when system decides it is necessary.
	DynamicRetrievalConfig_MODE_DYNAMIC DynamicRetrievalConfig_Mode = 1
)

func (DynamicRetrievalConfig_Mode) Descriptor

func (DynamicRetrievalConfig_Mode) Enum

func (DynamicRetrievalConfig_Mode) EnumDescriptor

func (DynamicRetrievalConfig_Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use DynamicRetrievalConfig_Mode.Descriptor instead.

func (DynamicRetrievalConfig_Mode) Number

func (DynamicRetrievalConfig_Mode) String

func (DynamicRetrievalConfig_Mode) Type

EmbedContentRequest

type EmbedContentRequest struct {

	// Required. The model's resource name. This serves as an ID for the Model to
	// use.
	//
	// This name should match a model name returned by the `ListModels` method.
	//
	// Format: `models/{model}`
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The content to embed. Only the `parts.text` fields will be
	// counted.
	Content *Content `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// Optional. Optional task type for which the embeddings will be used. Can
	// only be set for `models/embedding-001`.
	TaskType *TaskType `protobuf:"varint,3,opt,name=task_type,json=taskType,proto3,enum=google.ai.generativelanguage.v1alpha.TaskType,oneof" json:"task_type,omitempty"`
	// Optional. An optional title for the text. Only applicable when TaskType is
	// `RETRIEVAL_DOCUMENT`.
	//
	// Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality
	// embeddings for retrieval.
	Title *string `protobuf:"bytes,4,opt,name=title,proto3,oneof" json:"title,omitempty"`
	// Optional. Optional reduced dimension for the output embedding. If set,
	// excessive values in the output embedding are truncated from the end.
	// Supported by newer models since 2024 only. You cannot set this value if
	// using the earlier model (`models/embedding-001`).
	OutputDimensionality *int32 `protobuf:"varint,5,opt,name=output_dimensionality,json=outputDimensionality,proto3,oneof" json:"output_dimensionality,omitempty"`
	// contains filtered or unexported fields
}

Request containing the Content for the model to embed.

func (*EmbedContentRequest) Descriptor

func (*EmbedContentRequest) Descriptor() ([]byte, []int)

Deprecated: Use EmbedContentRequest.ProtoReflect.Descriptor instead.

func (*EmbedContentRequest) GetContent

func (x *EmbedContentRequest) GetContent() *Content

func (*EmbedContentRequest) GetModel

func (x *EmbedContentRequest) GetModel() string

func (*EmbedContentRequest) GetOutputDimensionality

func (x *EmbedContentRequest) GetOutputDimensionality() int32

func (*EmbedContentRequest) GetTaskType

func (x *EmbedContentRequest) GetTaskType() TaskType

func (*EmbedContentRequest) GetTitle

func (x *EmbedContentRequest) GetTitle() string

func (*EmbedContentRequest) ProtoMessage

func (*EmbedContentRequest) ProtoMessage()

func (*EmbedContentRequest) ProtoReflect

func (x *EmbedContentRequest) ProtoReflect() protoreflect.Message

func (*EmbedContentRequest) Reset

func (x *EmbedContentRequest) Reset()

func (*EmbedContentRequest) String

func (x *EmbedContentRequest) String() string

EmbedContentResponse

type EmbedContentResponse struct {

	// Output only. The embedding generated from the input content.
	Embedding *ContentEmbedding `protobuf:"bytes,1,opt,name=embedding,proto3" json:"embedding,omitempty"`
	// contains filtered or unexported fields
}

The response to an EmbedContentRequest.

func (*EmbedContentResponse) Descriptor

func (*EmbedContentResponse) Descriptor() ([]byte, []int)

Deprecated: Use EmbedContentResponse.ProtoReflect.Descriptor instead.

func (*EmbedContentResponse) GetEmbedding

func (x *EmbedContentResponse) GetEmbedding() *ContentEmbedding

func (*EmbedContentResponse) ProtoMessage

func (*EmbedContentResponse) ProtoMessage()

func (*EmbedContentResponse) ProtoReflect

func (x *EmbedContentResponse) ProtoReflect() protoreflect.Message

func (*EmbedContentResponse) Reset

func (x *EmbedContentResponse) Reset()

func (*EmbedContentResponse) String

func (x *EmbedContentResponse) String() string

EmbedTextRequest

type EmbedTextRequest struct {

	// Required. The model name to use with the format model=models/{model}.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. The free-form input text that the model will turn into an
	// embedding.
	Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Request to get a text embedding from the model.

func (*EmbedTextRequest) Descriptor

func (*EmbedTextRequest) Descriptor() ([]byte, []int)

Deprecated: Use EmbedTextRequest.ProtoReflect.Descriptor instead.

func (*EmbedTextRequest) GetModel

func (x *EmbedTextRequest) GetModel() string

func (*EmbedTextRequest) GetText

func (x *EmbedTextRequest) GetText() string

func (*EmbedTextRequest) ProtoMessage

func (*EmbedTextRequest) ProtoMessage()

func (*EmbedTextRequest) ProtoReflect

func (x *EmbedTextRequest) ProtoReflect() protoreflect.Message

func (*EmbedTextRequest) Reset

func (x *EmbedTextRequest) Reset()

func (*EmbedTextRequest) String

func (x *EmbedTextRequest) String() string

EmbedTextResponse

type EmbedTextResponse struct {

	// Output only. The embedding generated from the input text.
	Embedding *Embedding `protobuf:"bytes,1,opt,name=embedding,proto3,oneof" json:"embedding,omitempty"`
	// contains filtered or unexported fields
}

The response to a EmbedTextRequest.

func (*EmbedTextResponse) Descriptor

func (*EmbedTextResponse) Descriptor() ([]byte, []int)

Deprecated: Use EmbedTextResponse.ProtoReflect.Descriptor instead.

func (*EmbedTextResponse) GetEmbedding

func (x *EmbedTextResponse) GetEmbedding() *Embedding

func (*EmbedTextResponse) ProtoMessage

func (*EmbedTextResponse) ProtoMessage()

func (*EmbedTextResponse) ProtoReflect

func (x *EmbedTextResponse) ProtoReflect() protoreflect.Message

func (*EmbedTextResponse) Reset

func (x *EmbedTextResponse) Reset()

func (*EmbedTextResponse) String

func (x *EmbedTextResponse) String() string

Embedding

type Embedding struct {

	// The embedding values.
	Value []float32 `protobuf:"fixed32,1,rep,packed,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

A list of floats representing the embedding.

func (*Embedding) Descriptor

func (*Embedding) Descriptor() ([]byte, []int)

Deprecated: Use Embedding.ProtoReflect.Descriptor instead.

func (*Embedding) GetValue

func (x *Embedding) GetValue() []float32

func (*Embedding) ProtoMessage

func (*Embedding) ProtoMessage()

func (*Embedding) ProtoReflect

func (x *Embedding) ProtoReflect() protoreflect.Message

func (*Embedding) Reset

func (x *Embedding) Reset()

func (*Embedding) String

func (x *Embedding) String() string

Example

type Example struct {

	// Required. An example of an input `Message` from the user.
	Input *Message `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
	// Required. An example of what the model should output given the input.
	Output *Message `protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

An input/output example used to instruct the Model.

It demonstrates how the model should respond or format its response.

func (*Example) Descriptor

func (*Example) Descriptor() ([]byte, []int)

Deprecated: Use Example.ProtoReflect.Descriptor instead.

func (*Example) GetInput

func (x *Example) GetInput() *Message

func (*Example) GetOutput

func (x *Example) GetOutput() *Message

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) ProtoReflect

func (x *Example) ProtoReflect() protoreflect.Message

func (*Example) Reset

func (x *Example) Reset()

func (*Example) String

func (x *Example) String() string

ExecutableCode

type ExecutableCode struct {

	// Required. Programming language of the `code`.
	Language ExecutableCode_Language `protobuf:"varint,1,opt,name=language,proto3,enum=google.ai.generativelanguage.v1alpha.ExecutableCode_Language" json:"language,omitempty"`
	// Required. The code to be executed.
	Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

Code generated by the model that is meant to be executed, and the result returned to the model.

Only generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated.

func (*ExecutableCode) Descriptor

func (*ExecutableCode) Descriptor() ([]byte, []int)

Deprecated: Use ExecutableCode.ProtoReflect.Descriptor instead.

func (*ExecutableCode) GetCode

func (x *ExecutableCode) GetCode() string

func (*ExecutableCode) GetLanguage

func (x *ExecutableCode) GetLanguage() ExecutableCode_Language

func (*ExecutableCode) ProtoMessage

func (*ExecutableCode) ProtoMessage()

func (*ExecutableCode) ProtoReflect

func (x *ExecutableCode) ProtoReflect() protoreflect.Message

func (*ExecutableCode) Reset

func (x *ExecutableCode) Reset()

func (*ExecutableCode) String

func (x *ExecutableCode) String() string

ExecutableCode_Language

type ExecutableCode_Language int32

Supported programming languages for the generated code.

ExecutableCode_LANGUAGE_UNSPECIFIED, ExecutableCode_PYTHON

const (
	// Unspecified language. This value should not be used.
	ExecutableCode_LANGUAGE_UNSPECIFIED ExecutableCode_Language = 0
	// Python >= 3.10, with numpy and simpy available.
	ExecutableCode_PYTHON ExecutableCode_Language = 1
)

func (ExecutableCode_Language) Descriptor

func (ExecutableCode_Language) Enum

func (ExecutableCode_Language) EnumDescriptor

func (ExecutableCode_Language) EnumDescriptor() ([]byte, []int)

Deprecated: Use ExecutableCode_Language.Descriptor instead.

func (ExecutableCode_Language) Number

func (ExecutableCode_Language) String

func (x ExecutableCode_Language) String() string

func (ExecutableCode_Language) Type

File

type File struct {

	// Metadata for the File.
	//
	// Types that are assignable to Metadata:
	//
	//	*File_VideoMetadata
	Metadata isFile_Metadata `protobuf_oneof:"metadata"`
	// Immutable. Identifier. The `File` resource name. The ID (name excluding the
	// "files/" prefix) can contain up to 40 characters that are lowercase
	// alphanumeric or dashes (-). The ID cannot start or end with a dash. If the
	// name is empty on create, a unique name will be generated. Example:
	// `files/123-456`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. The human-readable display name for the `File`. The display name
	// must be no more than 512 characters in length, including spaces. Example:
	// "Welcome Image"
	DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Output only. MIME type of the file.
	MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Output only. Size of the file in bytes.
	SizeBytes int64 `protobuf:"varint,4,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
	// Output only. The timestamp of when the `File` was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. The timestamp of when the `File` was last updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Output only. The timestamp of when the `File` will be deleted. Only set if
	// the `File` is scheduled to expire.
	ExpirationTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"`
	// Output only. SHA-256 hash of the uploaded bytes.
	Sha256Hash []byte `protobuf:"bytes,8,opt,name=sha256_hash,json=sha256Hash,proto3" json:"sha256_hash,omitempty"`
	// Output only. The uri of the `File`.
	Uri string `protobuf:"bytes,9,opt,name=uri,proto3" json:"uri,omitempty"`
	// Output only. Processing state of the File.
	State File_State `protobuf:"varint,10,opt,name=state,proto3,enum=google.ai.generativelanguage.v1alpha.File_State" json:"state,omitempty"`
	// Output only. Error status if File processing failed.
	Error *status.Status `protobuf:"bytes,11,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

A file uploaded to the API. Next ID: 15

func (*File) Descriptor

func (*File) Descriptor() ([]byte, []int)

Deprecated: Use File.ProtoReflect.Descriptor instead.

func (*File) GetCreateTime

func (x *File) GetCreateTime() *timestamppb.Timestamp

func (*File) GetDisplayName

func (x *File) GetDisplayName() string

func (*File) GetError

func (x *File) GetError() *status.Status

func (*File) GetExpirationTime

func (x *File) GetExpirationTime() *timestamppb.Timestamp

func (*File) GetMetadata

func (m *File) GetMetadata() isFile_Metadata

func (*File) GetMimeType

func (x *File) GetMimeType() string

func (*File) GetName

func (x *File) GetName() string

func (*File) GetSha256Hash

func (x *File) GetSha256Hash() []byte

func (*File) GetSizeBytes

func (x *File) GetSizeBytes() int64

func (*File) GetState

func (x *File) GetState() File_State

func (*File) GetUpdateTime

func (x *File) GetUpdateTime() *timestamppb.Timestamp

func (*File) GetUri

func (x *File) GetUri() string

func (*File) GetVideoMetadata

func (x *File) GetVideoMetadata() *VideoMetadata

func (*File) ProtoMessage

func (*File) ProtoMessage()

func (*File) ProtoReflect

func (x *File) ProtoReflect() protoreflect.Message

func (*File) Reset

func (x *File) Reset()

func (*File) String

func (x *File) String() string

FileData

type FileData struct {

	// Optional. The IANA standard MIME type of the source data.
	MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Required. URI.
	FileUri string `protobuf:"bytes,2,opt,name=file_uri,json=fileUri,proto3" json:"file_uri,omitempty"`
	// contains filtered or unexported fields
}

URI based data.

func (*FileData) Descriptor

func (*FileData) Descriptor() ([]byte, []int)

Deprecated: Use FileData.ProtoReflect.Descriptor instead.

func (*FileData) GetFileUri

func (x *FileData) GetFileUri() string

func (*FileData) GetMimeType

func (x *FileData) GetMimeType() string

func (*FileData) ProtoMessage

func (*FileData) ProtoMessage()

func (*FileData) ProtoReflect

func (x *FileData) ProtoReflect() protoreflect.Message

func (*FileData) Reset

func (x *FileData) Reset()

func (*FileData) String

func (x *FileData) String() string

FileServiceClient

type FileServiceClient interface {
	// Creates a `File`.
	CreateFile(ctx context.Context, in *CreateFileRequest, opts ...grpc.CallOption) (*CreateFileResponse, error)
	// Lists the metadata for `File`s owned by the requesting project.
	ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error)
	// Gets the metadata for the given `File`.
	GetFile(ctx context.Context, in *GetFileRequest, opts ...grpc.CallOption) (*File, error)
	// Deletes the `File`.
	DeleteFile(ctx context.Context, in *DeleteFileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

FileServiceClient is the client API for FileService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewFileServiceClient

func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient

FileServiceServer

type FileServiceServer interface {
	// Creates a `File`.
	CreateFile(context.Context, *CreateFileRequest) (*CreateFileResponse, error)
	// Lists the metadata for `File`s owned by the requesting project.
	ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error)
	// Gets the metadata for the given `File`.
	GetFile(context.Context, *GetFileRequest) (*File, error)
	// Deletes the `File`.
	DeleteFile(context.Context, *DeleteFileRequest) (*emptypb.Empty, error)
}

FileServiceServer is the server API for FileService service. All implementations should embed UnimplementedFileServiceServer for forward compatibility

File_State

type File_State int32

States for the lifecycle of a File.

File_STATE_UNSPECIFIED, File_PROCESSING, File_ACTIVE, File_FAILED

const (
	// The default value. This value is used if the state is omitted.
	File_STATE_UNSPECIFIED File_State = 0
	// File is being processed and cannot be used for inference yet.
	File_PROCESSING File_State = 1
	// File is processed and available for inference.
	File_ACTIVE File_State = 2
	// File failed processing.
	File_FAILED File_State = 10
)

func (File_State) Descriptor

func (File_State) Descriptor() protoreflect.EnumDescriptor

func (File_State) Enum

func (x File_State) Enum() *File_State

func (File_State) EnumDescriptor

func (File_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use File_State.Descriptor instead.

func (File_State) Number

func (x File_State) Number() protoreflect.EnumNumber

func (File_State) String

func (x File_State) String() string

func (File_State) Type

File_VideoMetadata

type File_VideoMetadata struct {
	// Output only. Metadata for a video.
	VideoMetadata *VideoMetadata `protobuf:"bytes,12,opt,name=video_metadata,json=videoMetadata,proto3,oneof"`
}

FunctionCall

type FunctionCall struct {

	// Optional. The unique id of the function call. If populated, the client to
	// execute the `function_call` and return the response with the matching `id`.
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// Required. The name of the function to call.
	// Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
	// length of 63.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. The function parameters and values in JSON object format.
	Args *structpb.Struct `protobuf:"bytes,2,opt,name=args,proto3,oneof" json:"args,omitempty"`
	// contains filtered or unexported fields
}

A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name with the arguments and their values.

func (*FunctionCall) Descriptor

func (*FunctionCall) Descriptor() ([]byte, []int)

Deprecated: Use FunctionCall.ProtoReflect.Descriptor instead.

func (*FunctionCall) GetArgs

func (x *FunctionCall) GetArgs() *structpb.Struct

func (*FunctionCall) GetId

func (x *FunctionCall) GetId() string

func (*FunctionCall) GetName

func (x *FunctionCall) GetName() string

func (*FunctionCall) ProtoMessage

func (*FunctionCall) ProtoMessage()

func (*FunctionCall) ProtoReflect

func (x *FunctionCall) ProtoReflect() protoreflect.Message

func (*FunctionCall) Reset

func (x *FunctionCall) Reset()

func (*FunctionCall) String

func (x *FunctionCall) String() string

FunctionCallingConfig

type FunctionCallingConfig struct {

	// Optional. Specifies the mode in which function calling should execute. If
	// unspecified, the default value will be set to AUTO.
	Mode FunctionCallingConfig_Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=google.ai.generativelanguage.v1alpha.FunctionCallingConfig_Mode" json:"mode,omitempty"`
	// Optional. A set of function names that, when provided, limits the functions
	// the model will call.
	//
	// This should only be set when the Mode is ANY. Function names
	// should match [FunctionDeclaration.name]. With mode set to ANY, model will
	// predict a function call from the set of function names provided.
	AllowedFunctionNames []string `protobuf:"bytes,2,rep,name=allowed_function_names,json=allowedFunctionNames,proto3" json:"allowed_function_names,omitempty"`
	// contains filtered or unexported fields
}

Configuration for specifying function calling behavior.

func (*FunctionCallingConfig) Descriptor

func (*FunctionCallingConfig) Descriptor() ([]byte, []int)

Deprecated: Use FunctionCallingConfig.ProtoReflect.Descriptor instead.

func (*FunctionCallingConfig) GetAllowedFunctionNames

func (x *FunctionCallingConfig) GetAllowedFunctionNames() []string

func (*FunctionCallingConfig) GetMode

func (*FunctionCallingConfig) ProtoMessage

func (*FunctionCallingConfig) ProtoMessage()

func (*FunctionCallingConfig) ProtoReflect

func (x *FunctionCallingConfig) ProtoReflect() protoreflect.Message

func (*FunctionCallingConfig) Reset

func (x *FunctionCallingConfig) Reset()

func (*FunctionCallingConfig) String

func (x *FunctionCallingConfig) String() string

FunctionCallingConfig_Mode

type FunctionCallingConfig_Mode int32

Defines the execution behavior for function calling by defining the execution mode.

FunctionCallingConfig_MODE_UNSPECIFIED, FunctionCallingConfig_AUTO, FunctionCallingConfig_ANY, FunctionCallingConfig_NONE

const (
	// Unspecified function calling mode. This value should not be used.
	FunctionCallingConfig_MODE_UNSPECIFIED FunctionCallingConfig_Mode = 0
	// Default model behavior, model decides to predict either a function call
	// or a natural language response.
	FunctionCallingConfig_AUTO FunctionCallingConfig_Mode = 1
	// Model is constrained to always predicting a function call only.
	// If "allowed_function_names" are set, the predicted function call will be
	// limited to any one of "allowed_function_names", else the predicted
	// function call will be any one of the provided "function_declarations".
	FunctionCallingConfig_ANY FunctionCallingConfig_Mode = 2
	// Model will not predict any function call. Model behavior is same as when
	// not passing any function declarations.
	FunctionCallingConfig_NONE FunctionCallingConfig_Mode = 3
)

func (FunctionCallingConfig_Mode) Descriptor

func (FunctionCallingConfig_Mode) Enum

func (FunctionCallingConfig_Mode) EnumDescriptor

func (FunctionCallingConfig_Mode) EnumDescriptor() ([]byte, []int)

Deprecated: Use FunctionCallingConfig_Mode.Descriptor instead.

func (FunctionCallingConfig_Mode) Number

func (FunctionCallingConfig_Mode) String

func (FunctionCallingConfig_Mode) Type

FunctionDeclaration

type FunctionDeclaration struct {

	// Required. The name of the function.
	// Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
	// length of 63.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. A brief description of the function.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Optional. Describes the parameters to this function. Reflects the Open
	// API 3.03 Parameter Object string Key: the name of the parameter. Parameter
	// names are case sensitive. Schema Value: the Schema defining the type used
	// for the parameter.
	Parameters *Schema `protobuf:"bytes,3,opt,name=parameters,proto3,oneof" json:"parameters,omitempty"`
	// Optional. Describes the output from this function in JSON Schema format.
	// Reflects the Open API 3.03 Response Object. The Schema defines the type
	// used for the response value of the function.
	Response *Schema `protobuf:"bytes,4,opt,name=response,proto3,oneof" json:"response,omitempty"`
	// contains filtered or unexported fields
}

Structured representation of a function declaration as defined by the OpenAPI 3.03 specification. Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

func (*FunctionDeclaration) Descriptor

func (*FunctionDeclaration) Descriptor() ([]byte, []int)

Deprecated: Use FunctionDeclaration.ProtoReflect.Descriptor instead.

func (*FunctionDeclaration) GetDescription

func (x *FunctionDeclaration) GetDescription() string

func (*FunctionDeclaration) GetName

func (x *FunctionDeclaration) GetName() string

func (*FunctionDeclaration) GetParameters

func (x *FunctionDeclaration) GetParameters() *Schema

func (*FunctionDeclaration) GetResponse

func (x *FunctionDeclaration) GetResponse() *Schema

func (*FunctionDeclaration) ProtoMessage

func (*FunctionDeclaration) ProtoMessage()

func (*FunctionDeclaration) ProtoReflect

func (x *FunctionDeclaration) ProtoReflect() protoreflect.Message

func (*FunctionDeclaration) Reset

func (x *FunctionDeclaration) Reset()

func (*FunctionDeclaration) String

func (x *FunctionDeclaration) String() string

FunctionResponse

type FunctionResponse struct {

	// Optional. The id of the function call this response is for. Populated by
	// the client to match the corresponding function call `id`.
	Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	// Required. The name of the function to call.
	// Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
	// length of 63.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The function response in JSON object format.
	Response *structpb.Struct `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of aFunctionCall made based on model prediction.

func (*FunctionResponse) Descriptor

func (*FunctionResponse) Descriptor() ([]byte, []int)

Deprecated: Use FunctionResponse.ProtoReflect.Descriptor instead.

func (*FunctionResponse) GetId

func (x *FunctionResponse) GetId() string

func (*FunctionResponse) GetName

func (x *FunctionResponse) GetName() string

func (*FunctionResponse) GetResponse

func (x *FunctionResponse) GetResponse() *structpb.Struct

func (*FunctionResponse) ProtoMessage

func (*FunctionResponse) ProtoMessage()

func (*FunctionResponse) ProtoReflect

func (x *FunctionResponse) ProtoReflect() protoreflect.Message

func (*FunctionResponse) Reset

func (x *FunctionResponse) Reset()

func (*FunctionResponse) String

func (x *FunctionResponse) String() string

GenerateAnswerRequest

type GenerateAnswerRequest struct {

	// The sources in which to ground the answer.
	//
	// Types that are assignable to GroundingSource:
	//
	//	*GenerateAnswerRequest_InlinePassages
	//	*GenerateAnswerRequest_SemanticRetriever
	GroundingSource isGenerateAnswerRequest_GroundingSource `protobuf_oneof:"grounding_source"`
	// Required. The name of the `Model` to use for generating the grounded
	// response.
	//
	// Format: `model=models/{model}`.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The content of the current conversation with the `Model`. For
	// single-turn queries, this is a single question to answer. For multi-turn
	// queries, this is a repeated field that contains conversation history and
	// the last `Content` in the list containing the question.
	//
	// Note: `GenerateAnswer` only supports queries in English.
	Contents []*Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
	// Required. Style in which answers should be returned.
	AnswerStyle GenerateAnswerRequest_AnswerStyle `protobuf:"varint,5,opt,name=answer_style,json=answerStyle,proto3,enum=google.ai.generativelanguage.v1alpha.GenerateAnswerRequest_AnswerStyle" json:"answer_style,omitempty"`
	// Optional. A list of unique `SafetySetting` instances for blocking unsafe
	// content.
	//
	// This will be enforced on the `GenerateAnswerRequest.contents` and
	// `GenerateAnswerResponse.candidate`. There should not be more than one
	// setting for each `SafetyCategory` type. The API will block any contents and
	// responses that fail to meet the thresholds set by these settings. This list
	// overrides the default settings for each `SafetyCategory` specified in the
	// safety_settings. If there is no `SafetySetting` for a given
	// `SafetyCategory` provided in the list, the API will use the default safety
	// setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,
	// HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,
	// HARM_CATEGORY_HARASSMENT are supported.
	// Refer to the
	// [guide](https://ai.google.dev/gemini-api/docs/safety-settings)
	// for detailed information on available safety settings. Also refer to the
	// [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to
	// learn how to incorporate safety considerations in your AI applications.
	SafetySettings []*SafetySetting `protobuf:"bytes,3,rep,name=safety_settings,json=safetySettings,proto3" json:"safety_settings,omitempty"`
	// Optional. Controls the randomness of the output.
	//
	// Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will
	// produce responses that are more varied and creative, while a value closer
	// to 0.0 will typically result in more straightforward responses from the
	// model. A low temperature (~0.2) is usually recommended for
	// Attributed-Question-Answering use cases.
	Temperature *float32 `protobuf:"fixed32,4,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
	// contains filtered or unexported fields
}

Request to generate a grounded answer from the Model.

func (*GenerateAnswerRequest) Descriptor

func (*GenerateAnswerRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateAnswerRequest.ProtoReflect.Descriptor instead.

func (*GenerateAnswerRequest) GetAnswerStyle

func (*GenerateAnswerRequest) GetContents

func (x *GenerateAnswerRequest) GetContents() []*Content

func (*GenerateAnswerRequest) GetGroundingSource

func (m *GenerateAnswerRequest) GetGroundingSource() isGenerateAnswerRequest_GroundingSource

func (*GenerateAnswerRequest) GetInlinePassages

func (x *GenerateAnswerRequest) GetInlinePassages() *GroundingPassages

func (*GenerateAnswerRequest) GetModel

func (x *GenerateAnswerRequest) GetModel() string

func (*GenerateAnswerRequest) GetSafetySettings

func (x *GenerateAnswerRequest) GetSafetySettings() []*SafetySetting

func (*GenerateAnswerRequest) GetSemanticRetriever

func (x *GenerateAnswerRequest) GetSemanticRetriever() *SemanticRetrieverConfig

func (*GenerateAnswerRequest) GetTemperature

func (x *GenerateAnswerRequest) GetTemperature() float32

func (*GenerateAnswerRequest) ProtoMessage

func (*GenerateAnswerRequest) ProtoMessage()

func (*GenerateAnswerRequest) ProtoReflect

func (x *GenerateAnswerRequest) ProtoReflect() protoreflect.Message

func (*GenerateAnswerRequest) Reset

func (x *GenerateAnswerRequest) Reset()

func (*GenerateAnswerRequest) String

func (x *GenerateAnswerRequest) String() string

GenerateAnswerRequest_AnswerStyle

type GenerateAnswerRequest_AnswerStyle int32

Style for grounded answers.

GenerateAnswerRequest_ANSWER_STYLE_UNSPECIFIED, GenerateAnswerRequest_ABSTRACTIVE, GenerateAnswerRequest_EXTRACTIVE, GenerateAnswerRequest_VERBOSE

const (
	// Unspecified answer style.
	GenerateAnswerRequest_ANSWER_STYLE_UNSPECIFIED GenerateAnswerRequest_AnswerStyle = 0
	// Succint but abstract style.
	GenerateAnswerRequest_ABSTRACTIVE GenerateAnswerRequest_AnswerStyle = 1
	// Very brief and extractive style.
	GenerateAnswerRequest_EXTRACTIVE GenerateAnswerRequest_AnswerStyle = 2
	// Verbose style including extra details. The response may be formatted as a
	// sentence, paragraph, multiple paragraphs, or bullet points, etc.
	GenerateAnswerRequest_VERBOSE GenerateAnswerRequest_AnswerStyle = 3
)

func (GenerateAnswerRequest_AnswerStyle) Descriptor

func (GenerateAnswerRequest_AnswerStyle) Enum

func (GenerateAnswerRequest_AnswerStyle) EnumDescriptor

func (GenerateAnswerRequest_AnswerStyle) EnumDescriptor() ([]byte, []int)

Deprecated: Use GenerateAnswerRequest_AnswerStyle.Descriptor instead.

func (GenerateAnswerRequest_AnswerStyle) Number

func (GenerateAnswerRequest_AnswerStyle) String

func (GenerateAnswerRequest_AnswerStyle) Type

GenerateAnswerRequest_InlinePassages

type GenerateAnswerRequest_InlinePassages struct {
	// Passages provided inline with the request.
	InlinePassages *GroundingPassages `protobuf:"bytes,6,opt,name=inline_passages,json=inlinePassages,proto3,oneof"`
}

GenerateAnswerRequest_SemanticRetriever

type GenerateAnswerRequest_SemanticRetriever struct {
	// Content retrieved from resources created via the Semantic Retriever
	// API.
	SemanticRetriever *SemanticRetrieverConfig `protobuf:"bytes,7,opt,name=semantic_retriever,json=semanticRetriever,proto3,oneof"`
}

GenerateAnswerResponse

type GenerateAnswerResponse struct {

	// Candidate answer from the model.
	//
	// Note: The model *always* attempts to provide a grounded answer, even when
	// the answer is unlikely to be answerable from the given passages.
	// In that case, a low-quality or ungrounded answer may be provided, along
	// with a low `answerable_probability`.
	Answer *Candidate `protobuf:"bytes,1,opt,name=answer,proto3" json:"answer,omitempty"`
	// Output only. The model's estimate of the probability that its answer is
	// correct and grounded in the input passages.
	//
	// A low `answerable_probability` indicates that the answer might not be
	// grounded in the sources.
	//
	// When `answerable_probability` is low, you may want to:
	//
	// * Display a message to the effect of "We couldn’t answer that question" to
	// the user.
	// * Fall back to a general-purpose LLM that answers the question from world
	// knowledge. The threshold and nature of such fallbacks will depend on
	// individual use cases. `0.5` is a good starting threshold.
	AnswerableProbability *float32 `protobuf:"fixed32,2,opt,name=answerable_probability,json=answerableProbability,proto3,oneof" json:"answerable_probability,omitempty"`
	// Output only. Feedback related to the input data used to answer the
	// question, as opposed to the model-generated response to the question.
	//
	// The input data can be one or more of the following:
	//
	// - Question specified by the last entry in `GenerateAnswerRequest.content`
	// - Conversation history specified by the other entries in
	// `GenerateAnswerRequest.content`
	// - Grounding sources (`GenerateAnswerRequest.semantic_retriever` or
	// `GenerateAnswerRequest.inline_passages`)
	InputFeedback *GenerateAnswerResponse_InputFeedback `protobuf:"bytes,3,opt,name=input_feedback,json=inputFeedback,proto3,oneof" json:"input_feedback,omitempty"`
	// contains filtered or unexported fields
}

Response from the model for a grounded answer.

func (*GenerateAnswerResponse) Descriptor

func (*GenerateAnswerResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateAnswerResponse.ProtoReflect.Descriptor instead.

func (*GenerateAnswerResponse) GetAnswer

func (x *GenerateAnswerResponse) GetAnswer() *Candidate

func (*GenerateAnswerResponse) GetAnswerableProbability

func (x *GenerateAnswerResponse) GetAnswerableProbability() float32

func (*GenerateAnswerResponse) GetInputFeedback

func (*GenerateAnswerResponse) ProtoMessage

func (*GenerateAnswerResponse) ProtoMessage()

func (*GenerateAnswerResponse) ProtoReflect

func (x *GenerateAnswerResponse) ProtoReflect() protoreflect.Message

func (*GenerateAnswerResponse) Reset

func (x *GenerateAnswerResponse) Reset()

func (*GenerateAnswerResponse) String

func (x *GenerateAnswerResponse) String() string

GenerateAnswerResponse_InputFeedback

type GenerateAnswerResponse_InputFeedback struct {

	// Optional. If set, the input was blocked and no candidates are returned.
	// Rephrase the input.
	BlockReason *GenerateAnswerResponse_InputFeedback_BlockReason `protobuf:"varint,1,opt,name=block_reason,json=blockReason,proto3,enum=google.ai.generativelanguage.v1alpha.GenerateAnswerResponse_InputFeedback_BlockReason,oneof" json:"block_reason,omitempty"`
	// Ratings for safety of the input.
	// There is at most one rating per category.
	SafetyRatings []*SafetyRating `protobuf:"bytes,2,rep,name=safety_ratings,json=safetyRatings,proto3" json:"safety_ratings,omitempty"`
	// contains filtered or unexported fields
}

Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question.

func (*GenerateAnswerResponse_InputFeedback) Descriptor

func (*GenerateAnswerResponse_InputFeedback) Descriptor() ([]byte, []int)

Deprecated: Use GenerateAnswerResponse_InputFeedback.ProtoReflect.Descriptor instead.

func (*GenerateAnswerResponse_InputFeedback) GetBlockReason

func (*GenerateAnswerResponse_InputFeedback) GetSafetyRatings

func (x *GenerateAnswerResponse_InputFeedback) GetSafetyRatings() []*SafetyRating

func (*GenerateAnswerResponse_InputFeedback) ProtoMessage

func (*GenerateAnswerResponse_InputFeedback) ProtoMessage()

func (*GenerateAnswerResponse_InputFeedback) ProtoReflect

func (*GenerateAnswerResponse_InputFeedback) Reset

func (*GenerateAnswerResponse_InputFeedback) String

GenerateAnswerResponse_InputFeedback_BlockReason

type GenerateAnswerResponse_InputFeedback_BlockReason int32

Specifies what was the reason why input was blocked.

GenerateAnswerResponse_InputFeedback_BLOCK_REASON_UNSPECIFIED, GenerateAnswerResponse_InputFeedback_SAFETY, GenerateAnswerResponse_InputFeedback_OTHER

const (
	// Default value. This value is unused.
	GenerateAnswerResponse_InputFeedback_BLOCK_REASON_UNSPECIFIED GenerateAnswerResponse_InputFeedback_BlockReason = 0
	// Input was blocked due to safety reasons. Inspect
	// `safety_ratings` to understand which safety category blocked it.
	GenerateAnswerResponse_InputFeedback_SAFETY GenerateAnswerResponse_InputFeedback_BlockReason = 1
	// Input was blocked due to other reasons.
	GenerateAnswerResponse_InputFeedback_OTHER GenerateAnswerResponse_InputFeedback_BlockReason = 2
)

func (GenerateAnswerResponse_InputFeedback_BlockReason) Descriptor

func (GenerateAnswerResponse_InputFeedback_BlockReason) Enum

func (GenerateAnswerResponse_InputFeedback_BlockReason) EnumDescriptor

Deprecated: Use GenerateAnswerResponse_InputFeedback_BlockReason.Descriptor instead.

func (GenerateAnswerResponse_InputFeedback_BlockReason) Number

func (GenerateAnswerResponse_InputFeedback_BlockReason) String

func (GenerateAnswerResponse_InputFeedback_BlockReason) Type

GenerateContentRequest

type GenerateContentRequest struct {

	// Required. The name of the `Model` to use for generating the completion.
	//
	// Format: `models/{model}`.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Optional. Developer set [system
	// instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions).
	// Currently, text only.
	SystemInstruction *Content `protobuf:"bytes,8,opt,name=system_instruction,json=systemInstruction,proto3,oneof" json:"system_instruction,omitempty"`
	// Required. The content of the current conversation with the model.
	//
	// For single-turn queries, this is a single instance. For multi-turn queries
	// like [chat](https://ai.google.dev/gemini-api/docs/text-generation#chat),
	// this is a repeated field that contains the conversation history and the
	// latest request.
	Contents []*Content `protobuf:"bytes,2,rep,name=contents,proto3" json:"contents,omitempty"`
	// Optional. A list of `Tools` the `Model` may use to generate the next
	// response.
	//
	// A `Tool` is a piece of code that enables the system to interact with
	// external systems to perform an action, or set of actions, outside of
	// knowledge and scope of the `Model`. Supported `Tool`s are `Function` and
	// `code_execution`. Refer to the [Function
	// calling](https://ai.google.dev/gemini-api/docs/function-calling) and the
	// [Code execution](https://ai.google.dev/gemini-api/docs/code-execution)
	// guides to learn more.
	Tools []*Tool `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"`
	// Optional. Tool configuration for any `Tool` specified in the request. Refer
	// to the [Function calling
	// guide](https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode)
	// for a usage example.
	ToolConfig *ToolConfig `protobuf:"bytes,7,opt,name=tool_config,json=toolConfig,proto3" json:"tool_config,omitempty"`
	// Optional. A list of unique `SafetySetting` instances for blocking unsafe
	// content.
	//
	// This will be enforced on the `GenerateContentRequest.contents` and
	// `GenerateContentResponse.candidates`. There should not be more than one
	// setting for each `SafetyCategory` type. The API will block any contents and
	// responses that fail to meet the thresholds set by these settings. This list
	// overrides the default settings for each `SafetyCategory` specified in the
	// safety_settings. If there is no `SafetySetting` for a given
	// `SafetyCategory` provided in the list, the API will use the default safety
	// setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,
	// HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,
	// HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY are supported.
	// Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings)
	// for detailed information on available safety settings. Also refer to the
	// [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to
	// learn how to incorporate safety considerations in your AI applications.
	SafetySettings []*SafetySetting `protobuf:"bytes,3,rep,name=safety_settings,json=safetySettings,proto3" json:"safety_settings,omitempty"`
	// Optional. Configuration options for model generation and outputs.
	GenerationConfig *GenerationConfig `protobuf:"bytes,4,opt,name=generation_config,json=generationConfig,proto3,oneof" json:"generation_config,omitempty"`
	// Optional. The name of the content
	// [cached](https://ai.google.dev/gemini-api/docs/caching) to use as context
	// to serve the prediction. Format: `cachedContents/{cachedContent}`
	CachedContent *string `protobuf:"bytes,9,opt,name=cached_content,json=cachedContent,proto3,oneof" json:"cached_content,omitempty"`
	// contains filtered or unexported fields
}

Request to generate a completion from the model.

func (*GenerateContentRequest) Descriptor

func (*GenerateContentRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateContentRequest.ProtoReflect.Descriptor instead.

func (*GenerateContentRequest) GetCachedContent

func (x *GenerateContentRequest) GetCachedContent() string

func (*GenerateContentRequest) GetContents

func (x *GenerateContentRequest) GetContents() []*Content

func (*GenerateContentRequest) GetGenerationConfig

func (x *GenerateContentRequest) GetGenerationConfig() *GenerationConfig

func (*GenerateContentRequest) GetModel

func (x *GenerateContentRequest) GetModel() string

func (*GenerateContentRequest) GetSafetySettings

func (x *GenerateContentRequest) GetSafetySettings() []*SafetySetting

func (*GenerateContentRequest) GetSystemInstruction

func (x *GenerateContentRequest) GetSystemInstruction() *Content

func (*GenerateContentRequest) GetToolConfig

func (x *GenerateContentRequest) GetToolConfig() *ToolConfig

func (*GenerateContentRequest) GetTools

func (x *GenerateContentRequest) GetTools() []*Tool

func (*GenerateContentRequest) ProtoMessage

func (*GenerateContentRequest) ProtoMessage()

func (*GenerateContentRequest) ProtoReflect

func (x *GenerateContentRequest) ProtoReflect() protoreflect.Message

func (*GenerateContentRequest) Reset

func (x *GenerateContentRequest) Reset()

func (*GenerateContentRequest) String

func (x *GenerateContentRequest) String() string

GenerateContentResponse

type GenerateContentResponse struct {

	// Candidate responses from the model.
	Candidates []*Candidate `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty"`
	// Returns the prompt's feedback related to the content filters.
	PromptFeedback *GenerateContentResponse_PromptFeedback `protobuf:"bytes,2,opt,name=prompt_feedback,json=promptFeedback,proto3" json:"prompt_feedback,omitempty"`
	// Output only. Metadata on the generation requests' token usage.
	UsageMetadata *GenerateContentResponse_UsageMetadata `protobuf:"bytes,3,opt,name=usage_metadata,json=usageMetadata,proto3" json:"usage_metadata,omitempty"`
	// Output only. The model version used to generate the response.
	ModelVersion string `protobuf:"bytes,4,opt,name=model_version,json=modelVersion,proto3" json:"model_version,omitempty"`
	// contains filtered or unexported fields
}

Response from the model supporting multiple candidate responses.

Safety ratings and content filtering are reported for both prompt in GenerateContentResponse.prompt_feedback and for each candidate in finish_reason and in safety_ratings. The API:

  • Returns either all requested candidates or none of them
  • Returns no candidates at all only if there was something wrong with the prompt (check prompt_feedback)
  • Reports feedback on each candidate in finish_reason and safety_ratings.

func (*GenerateContentResponse) Descriptor

func (*GenerateContentResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateContentResponse.ProtoReflect.Descriptor instead.

func (*GenerateContentResponse) GetCandidates

func (x *GenerateContentResponse) GetCandidates() []*Candidate

func (*GenerateContentResponse) GetModelVersion

func (x *GenerateContentResponse) GetModelVersion() string

func (*GenerateContentResponse) GetPromptFeedback

func (*GenerateContentResponse) GetUsageMetadata

func (*GenerateContentResponse) ProtoMessage

func (*GenerateContentResponse) ProtoMessage()

func (*GenerateContentResponse) ProtoReflect

func (x *GenerateContentResponse) ProtoReflect() protoreflect.Message

func (*GenerateContentResponse) Reset

func (x *GenerateContentResponse) Reset()

func (*GenerateContentResponse) String

func (x *GenerateContentResponse) String() string

GenerateContentResponse_PromptFeedback

type GenerateContentResponse_PromptFeedback struct {

	// Optional. If set, the prompt was blocked and no candidates are returned.
	// Rephrase the prompt.
	BlockReason GenerateContentResponse_PromptFeedback_BlockReason `protobuf:"varint,1,opt,name=block_reason,json=blockReason,proto3,enum=google.ai.generativelanguage.v1alpha.GenerateContentResponse_PromptFeedback_BlockReason" json:"block_reason,omitempty"`
	// Ratings for safety of the prompt.
	// There is at most one rating per category.
	SafetyRatings []*SafetyRating `protobuf:"bytes,2,rep,name=safety_ratings,json=safetyRatings,proto3" json:"safety_ratings,omitempty"`
	// contains filtered or unexported fields
}

A set of the feedback metadata the prompt specified in GenerateContentRequest.content.

func (*GenerateContentResponse_PromptFeedback) Descriptor

func (*GenerateContentResponse_PromptFeedback) Descriptor() ([]byte, []int)

Deprecated: Use GenerateContentResponse_PromptFeedback.ProtoReflect.Descriptor instead.

func (*GenerateContentResponse_PromptFeedback) GetBlockReason

func (*GenerateContentResponse_PromptFeedback) GetSafetyRatings

func (x *GenerateContentResponse_PromptFeedback) GetSafetyRatings() []*SafetyRating

func (*GenerateContentResponse_PromptFeedback) ProtoMessage

func (*GenerateContentResponse_PromptFeedback) ProtoReflect

func (*GenerateContentResponse_PromptFeedback) Reset

func (*GenerateContentResponse_PromptFeedback) String

GenerateContentResponse_PromptFeedback_BlockReason

type GenerateContentResponse_PromptFeedback_BlockReason int32

Specifies the reason why the prompt was blocked.

GenerateContentResponse_PromptFeedback_BLOCK_REASON_UNSPECIFIED, GenerateContentResponse_PromptFeedback_SAFETY, GenerateContentResponse_PromptFeedback_OTHER, GenerateContentResponse_PromptFeedback_BLOCKLIST, GenerateContentResponse_PromptFeedback_PROHIBITED_CONTENT, GenerateContentResponse_PromptFeedback_IMAGE_SAFETY

const (
	// Default value. This value is unused.
	GenerateContentResponse_PromptFeedback_BLOCK_REASON_UNSPECIFIED GenerateContentResponse_PromptFeedback_BlockReason = 0
	// Prompt was blocked due to safety reasons. Inspect `safety_ratings`
	// to understand which safety category blocked it.
	GenerateContentResponse_PromptFeedback_SAFETY GenerateContentResponse_PromptFeedback_BlockReason = 1
	// Prompt was blocked due to unknown reasons.
	GenerateContentResponse_PromptFeedback_OTHER GenerateContentResponse_PromptFeedback_BlockReason = 2
	// Prompt was blocked due to the terms which are included from the
	// terminology blocklist.
	GenerateContentResponse_PromptFeedback_BLOCKLIST GenerateContentResponse_PromptFeedback_BlockReason = 3
	// Prompt was blocked due to prohibited content.
	GenerateContentResponse_PromptFeedback_PROHIBITED_CONTENT GenerateContentResponse_PromptFeedback_BlockReason = 4
	// Candidates blocked due to unsafe image generation content.
	GenerateContentResponse_PromptFeedback_IMAGE_SAFETY GenerateContentResponse_PromptFeedback_BlockReason = 5
)

func (GenerateContentResponse_PromptFeedback_BlockReason) Descriptor

func (GenerateContentResponse_PromptFeedback_BlockReason) Enum

func (GenerateContentResponse_PromptFeedback_BlockReason) EnumDescriptor

Deprecated: Use GenerateContentResponse_PromptFeedback_BlockReason.Descriptor instead.

func (GenerateContentResponse_PromptFeedback_BlockReason) Number

func (GenerateContentResponse_PromptFeedback_BlockReason) String

func (GenerateContentResponse_PromptFeedback_BlockReason) Type

GenerateContentResponse_UsageMetadata

type GenerateContentResponse_UsageMetadata struct {

	// Number of tokens in the prompt. When `cached_content` is set, this is
	// still the total effective prompt size meaning this includes the number of
	// tokens in the cached content.
	PromptTokenCount int32 `protobuf:"varint,1,opt,name=prompt_token_count,json=promptTokenCount,proto3" json:"prompt_token_count,omitempty"`
	// Number of tokens in the cached part of the prompt (the cached content)
	CachedContentTokenCount int32 `protobuf:"varint,4,opt,name=cached_content_token_count,json=cachedContentTokenCount,proto3" json:"cached_content_token_count,omitempty"`
	// Total number of tokens across all the generated response candidates.
	CandidatesTokenCount int32 `protobuf:"varint,2,opt,name=candidates_token_count,json=candidatesTokenCount,proto3" json:"candidates_token_count,omitempty"`
	// Total token count for the generation request (prompt + response
	// candidates).
	TotalTokenCount int32 `protobuf:"varint,3,opt,name=total_token_count,json=totalTokenCount,proto3" json:"total_token_count,omitempty"`
	// contains filtered or unexported fields
}

Metadata on the generation request's token usage.

func (*GenerateContentResponse_UsageMetadata) Descriptor

func (*GenerateContentResponse_UsageMetadata) Descriptor() ([]byte, []int)

Deprecated: Use GenerateContentResponse_UsageMetadata.ProtoReflect.Descriptor instead.

func (*GenerateContentResponse_UsageMetadata) GetCachedContentTokenCount

func (x *GenerateContentResponse_UsageMetadata) GetCachedContentTokenCount() int32

func (*GenerateContentResponse_UsageMetadata) GetCandidatesTokenCount

func (x *GenerateContentResponse_UsageMetadata) GetCandidatesTokenCount() int32

func (*GenerateContentResponse_UsageMetadata) GetPromptTokenCount

func (x *GenerateContentResponse_UsageMetadata) GetPromptTokenCount() int32

func (*GenerateContentResponse_UsageMetadata) GetTotalTokenCount

func (x *GenerateContentResponse_UsageMetadata) GetTotalTokenCount() int32

func (*GenerateContentResponse_UsageMetadata) ProtoMessage

func (*GenerateContentResponse_UsageMetadata) ProtoMessage()

func (*GenerateContentResponse_UsageMetadata) ProtoReflect

func (*GenerateContentResponse_UsageMetadata) Reset

func (*GenerateContentResponse_UsageMetadata) String

GenerateMessageRequest

type GenerateMessageRequest struct {

	// Required. The name of the model to use.
	//
	// Format: `name=models/{model}`.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The structured textual input given to the model as a prompt.
	//
	// Given a
	// prompt, the model will return what it predicts is the next message in the
	// discussion.
	Prompt *MessagePrompt `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// Optional. Controls the randomness of the output.
	//
	// Values can range over `[0.0,1.0]`,
	// inclusive. A value closer to `1.0` will produce responses that are more
	// varied, while a value closer to `0.0` will typically result in
	// less surprising responses from the model.
	Temperature *float32 `protobuf:"fixed32,3,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
	// Optional. The number of generated response messages to return.
	//
	// This value must be between
	// `[1, 8]`, inclusive. If unset, this will default to `1`.
	CandidateCount *int32 `protobuf:"varint,4,opt,name=candidate_count,json=candidateCount,proto3,oneof" json:"candidate_count,omitempty"`
	// Optional. The maximum cumulative probability of tokens to consider when
	// sampling.
	//
	// The model uses combined Top-k and nucleus sampling.
	//
	// Nucleus sampling considers the smallest set of tokens whose probability
	// sum is at least `top_p`.
	TopP *float32 `protobuf:"fixed32,5,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"`
	// Optional. The maximum number of tokens to consider when sampling.
	//
	// The model uses combined Top-k and nucleus sampling.
	//
	// Top-k sampling considers the set of `top_k` most probable tokens.
	TopK *int32 `protobuf:"varint,6,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"`
	// contains filtered or unexported fields
}

Request to generate a message response from the model.

func (*GenerateMessageRequest) Descriptor

func (*GenerateMessageRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateMessageRequest.ProtoReflect.Descriptor instead.

func (*GenerateMessageRequest) GetCandidateCount

func (x *GenerateMessageRequest) GetCandidateCount() int32

func (*GenerateMessageRequest) GetModel

func (x *GenerateMessageRequest) GetModel() string

func (*GenerateMessageRequest) GetPrompt

func (x *GenerateMessageRequest) GetPrompt() *MessagePrompt

func (*GenerateMessageRequest) GetTemperature

func (x *GenerateMessageRequest) GetTemperature() float32

func (*GenerateMessageRequest) GetTopK

func (x *GenerateMessageRequest) GetTopK() int32

func (*GenerateMessageRequest) GetTopP

func (x *GenerateMessageRequest) GetTopP() float32

func (*GenerateMessageRequest) ProtoMessage

func (*GenerateMessageRequest) ProtoMessage()

func (*GenerateMessageRequest) ProtoReflect

func (x *GenerateMessageRequest) ProtoReflect() protoreflect.Message

func (*GenerateMessageRequest) Reset

func (x *GenerateMessageRequest) Reset()

func (*GenerateMessageRequest) String

func (x *GenerateMessageRequest) String() string

GenerateMessageResponse

type GenerateMessageResponse struct {

	// Candidate response messages from the model.
	Candidates []*Message `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty"`
	// The conversation history used by the model.
	Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	// A set of content filtering metadata for the prompt and response
	// text.
	//
	// This indicates which `SafetyCategory`(s) blocked a
	// candidate from this response, the lowest `HarmProbability`
	// that triggered a block, and the HarmThreshold setting for that category.
	Filters []*ContentFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"`
	// contains filtered or unexported fields
}

The response from the model.

This includes candidate messages and conversation history in the form of chronologically-ordered messages.

func (*GenerateMessageResponse) Descriptor

func (*GenerateMessageResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateMessageResponse.ProtoReflect.Descriptor instead.

func (*GenerateMessageResponse) GetCandidates

func (x *GenerateMessageResponse) GetCandidates() []*Message

func (*GenerateMessageResponse) GetFilters

func (x *GenerateMessageResponse) GetFilters() []*ContentFilter

func (*GenerateMessageResponse) GetMessages

func (x *GenerateMessageResponse) GetMessages() []*Message

func (*GenerateMessageResponse) ProtoMessage

func (*GenerateMessageResponse) ProtoMessage()

func (*GenerateMessageResponse) ProtoReflect

func (x *GenerateMessageResponse) ProtoReflect() protoreflect.Message

func (*GenerateMessageResponse) Reset

func (x *GenerateMessageResponse) Reset()

func (*GenerateMessageResponse) String

func (x *GenerateMessageResponse) String() string

GenerateTextRequest

type GenerateTextRequest struct {

	// Required. The name of the `Model` or `TunedModel` to use for generating the
	// completion.
	// Examples:
	//
	//	models/text-bison-001
	//	tunedModels/sentence-translator-u3b7m
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The free-form input text given to the model as a prompt.
	//
	// Given a prompt, the model will generate a TextCompletion response it
	// predicts as the completion of the input text.
	Prompt *TextPrompt `protobuf:"bytes,2,opt,name=prompt,proto3" json:"prompt,omitempty"`
	// Optional. Controls the randomness of the output.
	// Note: The default value varies by model, see the `Model.temperature`
	// attribute of the `Model` returned the `getModel` function.
	//
	// Values can range from [0.0,1.0],
	// inclusive. A value closer to 1.0 will produce responses that are more
	// varied and creative, while a value closer to 0.0 will typically result in
	// more straightforward responses from the model.
	Temperature *float32 `protobuf:"fixed32,3,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
	// Optional. Number of generated responses to return.
	//
	// This value must be between [1, 8], inclusive. If unset, this will default
	// to 1.
	CandidateCount *int32 `protobuf:"varint,4,opt,name=candidate_count,json=candidateCount,proto3,oneof" json:"candidate_count,omitempty"`
	// Optional. The maximum number of tokens to include in a candidate.
	//
	// If unset, this will default to output_token_limit specified in the `Model`
	// specification.
	MaxOutputTokens *int32 `protobuf:"varint,5,opt,name=max_output_tokens,json=maxOutputTokens,proto3,oneof" json:"max_output_tokens,omitempty"`
	// Optional. The maximum cumulative probability of tokens to consider when
	// sampling.
	//
	// The model uses combined Top-k and nucleus sampling.
	//
	// Tokens are sorted based on their assigned probabilities so that only the
	// most likely tokens are considered. Top-k sampling directly limits the
	// maximum number of tokens to consider, while Nucleus sampling limits number
	// of tokens based on the cumulative probability.
	//
	// Note: The default value varies by model, see the `Model.top_p`
	// attribute of the `Model` returned the `getModel` function.
	TopP *float32 `protobuf:"fixed32,6,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"`
	// Optional. The maximum number of tokens to consider when sampling.
	//
	// The model uses combined Top-k and nucleus sampling.
	//
	// Top-k sampling considers the set of `top_k` most probable tokens.
	// Defaults to 40.
	//
	// Note: The default value varies by model, see the `Model.top_k`
	// attribute of the `Model` returned the `getModel` function.
	TopK *int32 `protobuf:"varint,7,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"`
	// Optional. A list of unique `SafetySetting` instances for blocking unsafe
	// content.
	//
	// that will be enforced on the `GenerateTextRequest.prompt` and
	// `GenerateTextResponse.candidates`. There should not be more than one
	// setting for each `SafetyCategory` type. The API will block any prompts and
	// responses that fail to meet the thresholds set by these settings. This list
	// overrides the default settings for each `SafetyCategory` specified in the
	// safety_settings. If there is no `SafetySetting` for a given
	// `SafetyCategory` provided in the list, the API will use the default safety
	// setting for that category. Harm categories HARM_CATEGORY_DEROGATORY,
	// HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL,
	// HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text
	// service.
	SafetySettings []*SafetySetting `protobuf:"bytes,8,rep,name=safety_settings,json=safetySettings,proto3" json:"safety_settings,omitempty"`
	// The set of character sequences (up to 5) that will stop output generation.
	// If specified, the API will stop at the first appearance of a stop
	// sequence. The stop sequence will not be included as part of the response.
	StopSequences []string `protobuf:"bytes,9,rep,name=stop_sequences,json=stopSequences,proto3" json:"stop_sequences,omitempty"`
	// contains filtered or unexported fields
}

Request to generate a text completion response from the model.

func (*GenerateTextRequest) Descriptor

func (*GenerateTextRequest) Descriptor() ([]byte, []int)

Deprecated: Use GenerateTextRequest.ProtoReflect.Descriptor instead.

func (*GenerateTextRequest) GetCandidateCount

func (x *GenerateTextRequest) GetCandidateCount() int32

func (*GenerateTextRequest) GetMaxOutputTokens

func (x *GenerateTextRequest) GetMaxOutputTokens() int32

func (*GenerateTextRequest) GetModel

func (x *GenerateTextRequest) GetModel() string

func (*GenerateTextRequest) GetPrompt

func (x *GenerateTextRequest) GetPrompt() *TextPrompt

func (*GenerateTextRequest) GetSafetySettings

func (x *GenerateTextRequest) GetSafetySettings() []*SafetySetting

func (*GenerateTextRequest) GetStopSequences

func (x *GenerateTextRequest) GetStopSequences() []string

func (*GenerateTextRequest) GetTemperature

func (x *GenerateTextRequest) GetTemperature() float32

func (*GenerateTextRequest) GetTopK

func (x *GenerateTextRequest) GetTopK() int32

func (*GenerateTextRequest) GetTopP

func (x *GenerateTextRequest) GetTopP() float32

func (*GenerateTextRequest) ProtoMessage

func (*GenerateTextRequest) ProtoMessage()

func (*GenerateTextRequest) ProtoReflect

func (x *GenerateTextRequest) ProtoReflect() protoreflect.Message

func (*GenerateTextRequest) Reset

func (x *GenerateTextRequest) Reset()

func (*GenerateTextRequest) String

func (x *GenerateTextRequest) String() string

GenerateTextResponse

type GenerateTextResponse struct {

	// Candidate responses from the model.
	Candidates []*TextCompletion `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty"`
	// A set of content filtering metadata for the prompt and response
	// text.
	//
	// This indicates which `SafetyCategory`(s) blocked a
	// candidate from this response, the lowest `HarmProbability`
	// that triggered a block, and the HarmThreshold setting for that category.
	// This indicates the smallest change to the `SafetySettings` that would be
	// necessary to unblock at least 1 response.
	//
	// The blocking is configured by the `SafetySettings` in the request (or the
	// default `SafetySettings` of the API).
	Filters []*ContentFilter `protobuf:"bytes,3,rep,name=filters,proto3" json:"filters,omitempty"`
	// Returns any safety feedback related to content filtering.
	SafetyFeedback []*SafetyFeedback `protobuf:"bytes,4,rep,name=safety_feedback,json=safetyFeedback,proto3" json:"safety_feedback,omitempty"`
	// contains filtered or unexported fields
}

The response from the model, including candidate completions.

func (*GenerateTextResponse) Descriptor

func (*GenerateTextResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenerateTextResponse.ProtoReflect.Descriptor instead.

func (*GenerateTextResponse) GetCandidates

func (x *GenerateTextResponse) GetCandidates() []*TextCompletion

func (*GenerateTextResponse) GetFilters

func (x *GenerateTextResponse) GetFilters() []*ContentFilter

func (*GenerateTextResponse) GetSafetyFeedback

func (x *GenerateTextResponse) GetSafetyFeedback() []*SafetyFeedback

func (*GenerateTextResponse) ProtoMessage

func (*GenerateTextResponse) ProtoMessage()

func (*GenerateTextResponse) ProtoReflect

func (x *GenerateTextResponse) ProtoReflect() protoreflect.Message

func (*GenerateTextResponse) Reset

func (x *GenerateTextResponse) Reset()

func (*GenerateTextResponse) String

func (x *GenerateTextResponse) String() string

GenerationConfig

type GenerationConfig struct {

	// Optional. Number of generated responses to return.
	//
	// Currently, this value can only be set to 1. If unset, this will default
	// to 1.
	CandidateCount *int32 `protobuf:"varint,1,opt,name=candidate_count,json=candidateCount,proto3,oneof" json:"candidate_count,omitempty"`
	// Optional. The set of character sequences (up to 5) that will stop output
	// generation. If specified, the API will stop at the first appearance of a
	// `stop_sequence`. The stop sequence will not be included as part of the
	// response.
	StopSequences []string `protobuf:"bytes,2,rep,name=stop_sequences,json=stopSequences,proto3" json:"stop_sequences,omitempty"`
	// Optional. The maximum number of tokens to include in a response candidate.
	//
	// Note: The default value varies by model, see the `Model.output_token_limit`
	// attribute of the `Model` returned from the `getModel` function.
	MaxOutputTokens *int32 `protobuf:"varint,4,opt,name=max_output_tokens,json=maxOutputTokens,proto3,oneof" json:"max_output_tokens,omitempty"`
	// Optional. Controls the randomness of the output.
	//
	// Note: The default value varies by model, see the `Model.temperature`
	// attribute of the `Model` returned from the `getModel` function.
	//
	// Values can range from [0.0, 2.0].
	Temperature *float32 `protobuf:"fixed32,5,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
	// Optional. The maximum cumulative probability of tokens to consider when
	// sampling.
	//
	// The model uses combined Top-k and Top-p (nucleus) sampling.
	//
	// Tokens are sorted based on their assigned probabilities so that only the
	// most likely tokens are considered. Top-k sampling directly limits the
	// maximum number of tokens to consider, while Nucleus sampling limits the
	// number of tokens based on the cumulative probability.
	//
	// Note: The default value varies by `Model` and is specified by
	// the`Model.top_p` attribute returned from the `getModel` function. An empty
	// `top_k` attribute indicates that the model doesn't apply top-k sampling
	// and doesn't allow setting `top_k` on requests.
	TopP *float32 `protobuf:"fixed32,6,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"`
	// Optional. The maximum number of tokens to consider when sampling.
	//
	// Gemini models use Top-p (nucleus) sampling or a combination of Top-k and
	// nucleus sampling. Top-k sampling considers the set of `top_k` most probable
	// tokens. Models running with nucleus sampling don't allow top_k setting.
	//
	// Note: The default value varies by `Model` and is specified by
	// the`Model.top_p` attribute returned from the `getModel` function. An empty
	// `top_k` attribute indicates that the model doesn't apply top-k sampling
	// and doesn't allow setting `top_k` on requests.
	TopK *int32 `protobuf:"varint,7,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"`
	// Optional. MIME type of the generated candidate text.
	// Supported MIME types are:
	// `text/plain`: (default) Text output.
	// `application/json`: JSON response in the response candidates.
	// `text/x.enum`: ENUM as a string response in the response candidates.
	// Refer to the
	// [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats)
	// for a list of all supported text MIME types.
	ResponseMimeType string `protobuf:"bytes,13,opt,name=response_mime_type,json=responseMimeType,proto3" json:"response_mime_type,omitempty"`
	// Optional. Output schema of the generated candidate text. Schemas must be a
	// subset of the [OpenAPI schema](https://spec.openapis.org/oas/v3.0.3#schema)
	// and can be objects, primitives or arrays.
	//
	// If set, a compatible `response_mime_type` must also be set.
	// Compatible MIME types:
	// `application/json`: Schema for JSON response.
	// Refer to the [JSON text generation
	// guide](https://ai.google.dev/gemini-api/docs/json-mode) for more details.
	ResponseSchema *Schema `protobuf:"bytes,14,opt,name=response_schema,json=responseSchema,proto3" json:"response_schema,omitempty"`
	// Optional. Presence penalty applied to the next token's logprobs if the
	// token has already been seen in the response.
	//
	// This penalty is binary on/off and not dependant on the number of times the
	// token is used (after the first). Use
	// [frequency_penalty][google.ai.generativelanguage.v1alpha.GenerationConfig.frequency_penalty]
	// for a penalty that increases with each use.
	//
	// A positive penalty will discourage the use of tokens that have already
	// been used in the response, increasing the vocabulary.
	//
	// A negative penalty will encourage the use of tokens that have already been
	// used in the response, decreasing the vocabulary.
	PresencePenalty *float32 `protobuf:"fixed32,15,opt,name=presence_penalty,json=presencePenalty,proto3,oneof" json:"presence_penalty,omitempty"`
	// Optional. Frequency penalty applied to the next token's logprobs,
	// multiplied by the number of times each token has been seen in the respponse
	// so far.
	//
	// A positive penalty will discourage the use of tokens that have already
	// been used, proportional to the number of times the token has been used:
	// The more a token is used, the more dificult it is for the model to use
	// that token again increasing the vocabulary of responses.
	//
	// Caution: A _negative_ penalty will encourage the model to reuse tokens
	// proportional to the number of times the token has been used. Small
	// negative values will reduce the vocabulary of a response. Larger negative
	// values will cause the model to start repeating a common token  until it
	// hits the
	// [max_output_tokens][google.ai.generativelanguage.v1alpha.GenerationConfig.max_output_tokens]
	// limit.
	FrequencyPenalty *float32 `protobuf:"fixed32,16,opt,name=frequency_penalty,json=frequencyPenalty,proto3,oneof" json:"frequency_penalty,omitempty"`
	// Optional. If true, export the logprobs results in response.
	ResponseLogprobs *bool `protobuf:"varint,17,opt,name=response_logprobs,json=responseLogprobs,proto3,oneof" json:"response_logprobs,omitempty"`
	// Optional. Only valid if
	// [response_logprobs=True][google.ai.generativelanguage.v1alpha.GenerationConfig.response_logprobs].
	// This sets the number of top logprobs to return at each decoding step in the
	// [Candidate.logprobs_result][google.ai.generativelanguage.v1alpha.Candidate.logprobs_result].
	Logprobs *int32 `protobuf:"varint,18,opt,name=logprobs,proto3,oneof" json:"logprobs,omitempty"`
	// Optional. Enables enhanced civic answers. It may not be available for all
	// models.
	EnableEnhancedCivicAnswers *bool `protobuf:"varint,19,opt,name=enable_enhanced_civic_answers,json=enableEnhancedCivicAnswers,proto3,oneof" json:"enable_enhanced_civic_answers,omitempty"`
	// Optional. The requested modalities of the response. Represents the set of
	// modalities that the model can return, and should be expected in the
	// response. This is an exact match to the modalities of the response.
	//
	// A model may have multiple combinations of supported modalities. If the
	// requested modalities do not match any of the supported combinations, an
	// error will be returned.
	//
	// An empty list is equivalent to requesting only text.
	ResponseModalities []GenerationConfig_Modality `protobuf:"varint,20,rep,packed,name=response_modalities,json=responseModalities,proto3,enum=google.ai.generativelanguage.v1alpha.GenerationConfig_Modality" json:"response_modalities,omitempty"`
	// Optional. The speech generation config.
	SpeechConfig *SpeechConfig `protobuf:"bytes,21,opt,name=speech_config,json=speechConfig,proto3,oneof" json:"speech_config,omitempty"`
	// contains filtered or unexported fields
}

Configuration options for model generation and outputs. Not all parameters are configurable for every model.

func (*GenerationConfig) Descriptor

func (*GenerationConfig) Descriptor() ([]byte, []int)

Deprecated: Use GenerationConfig.ProtoReflect.Descriptor instead.

func (*GenerationConfig) GetCandidateCount

func (x *GenerationConfig) GetCandidateCount() int32

func (*GenerationConfig) GetEnableEnhancedCivicAnswers

func (x *GenerationConfig) GetEnableEnhancedCivicAnswers() bool

func (*GenerationConfig) GetFrequencyPenalty

func (x *GenerationConfig) GetFrequencyPenalty() float32

func (*GenerationConfig) GetLogprobs

func (x *GenerationConfig) GetLogprobs() int32

func (*GenerationConfig) GetMaxOutputTokens

func (x *GenerationConfig) GetMaxOutputTokens() int32

func (*GenerationConfig) GetPresencePenalty

func (x *GenerationConfig) GetPresencePenalty() float32

func (*GenerationConfig) GetResponseLogprobs

func (x *GenerationConfig) GetResponseLogprobs() bool

func (*GenerationConfig) GetResponseMimeType

func (x *GenerationConfig) GetResponseMimeType() string

func (*GenerationConfig) GetResponseModalities

func (x *GenerationConfig) GetResponseModalities() []GenerationConfig_Modality

func (*GenerationConfig) GetResponseSchema

func (x *GenerationConfig) GetResponseSchema() *Schema

func (*GenerationConfig) GetSpeechConfig

func (x *GenerationConfig) GetSpeechConfig() *SpeechConfig

func (*GenerationConfig) GetStopSequences

func (x *GenerationConfig) GetStopSequences() []string

func (*GenerationConfig) GetTemperature

func (x *GenerationConfig) GetTemperature() float32

func (*GenerationConfig) GetTopK

func (x *GenerationConfig) GetTopK() int32

func (*GenerationConfig) GetTopP

func (x *GenerationConfig) GetTopP() float32

func (*GenerationConfig) ProtoMessage

func (*GenerationConfig) ProtoMessage()

func (*GenerationConfig) ProtoReflect

func (x *GenerationConfig) ProtoReflect() protoreflect.Message

func (*GenerationConfig) Reset

func (x *GenerationConfig) Reset()

func (*GenerationConfig) String

func (x *GenerationConfig) String() string

GenerationConfig_Modality

type GenerationConfig_Modality int32

Supported modalities of the response.

GenerationConfig_MODALITY_UNSPECIFIED, GenerationConfig_TEXT, GenerationConfig_IMAGE, GenerationConfig_AUDIO

const (
	// Default value.
	GenerationConfig_MODALITY_UNSPECIFIED GenerationConfig_Modality = 0
	// Indicates the model should return text.
	GenerationConfig_TEXT GenerationConfig_Modality = 1
	// Indicates the model should return images.
	GenerationConfig_IMAGE GenerationConfig_Modality = 2
	// Indicates the model should return audio.
	GenerationConfig_AUDIO GenerationConfig_Modality = 3
)

func (GenerationConfig_Modality) Descriptor

func (GenerationConfig_Modality) Enum

func (GenerationConfig_Modality) EnumDescriptor

func (GenerationConfig_Modality) EnumDescriptor() ([]byte, []int)

Deprecated: Use GenerationConfig_Modality.Descriptor instead.

func (GenerationConfig_Modality) Number

func (GenerationConfig_Modality) String

func (x GenerationConfig_Modality) String() string

func (GenerationConfig_Modality) Type

GenerativeServiceClient

type GenerativeServiceClient interface {
	// Generates a model response given an input `GenerateContentRequest`.
	// Refer to the [text generation
	// guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed
	// usage information. Input capabilities differ between models, including
	// tuned models. Refer to the [model
	// guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning
	// guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.
	GenerateContent(ctx context.Context, in *GenerateContentRequest, opts ...grpc.CallOption) (*GenerateContentResponse, error)
	// Generates a grounded answer from the model given an input
	// `GenerateAnswerRequest`.
	GenerateAnswer(ctx context.Context, in *GenerateAnswerRequest, opts ...grpc.CallOption) (*GenerateAnswerResponse, error)
	// Generates a [streamed
	// response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream)
	// from the model given an input `GenerateContentRequest`.
	StreamGenerateContent(ctx context.Context, in *GenerateContentRequest, opts ...grpc.CallOption) (GenerativeService_StreamGenerateContentClient, error)
	// Generates a text embedding vector from the input `Content` using the
	// specified [Gemini Embedding
	// model](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding).
	EmbedContent(ctx context.Context, in *EmbedContentRequest, opts ...grpc.CallOption) (*EmbedContentResponse, error)
	// Generates multiple embedding vectors from the input `Content` which
	// consists of a batch of strings represented as `EmbedContentRequest`
	// objects.
	BatchEmbedContents(ctx context.Context, in *BatchEmbedContentsRequest, opts ...grpc.CallOption) (*BatchEmbedContentsResponse, error)
	// Runs a model's tokenizer on input `Content` and returns the token count.
	// Refer to the [tokens guide](https://ai.google.dev/gemini-api/docs/tokens)
	// to learn more about tokens.
	CountTokens(ctx context.Context, in *CountTokensRequest, opts ...grpc.CallOption) (*CountTokensResponse, error)
	// Low-Latency bidirectional streaming API that supports audio and video
	// streaming inputs can produce multimodal output streams (audio and text).
	BidiGenerateContent(ctx context.Context, opts ...grpc.CallOption) (GenerativeService_BidiGenerateContentClient, error)
}

GenerativeServiceClient is the client API for GenerativeService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewGenerativeServiceClient

func NewGenerativeServiceClient(cc grpc.ClientConnInterface) GenerativeServiceClient

GenerativeServiceServer

type GenerativeServiceServer interface {
	// Generates a model response given an input `GenerateContentRequest`.
	// Refer to the [text generation
	// guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed
	// usage information. Input capabilities differ between models, including
	// tuned models. Refer to the [model
	// guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning
	// guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details.
	GenerateContent(context.Context, *GenerateContentRequest) (*GenerateContentResponse, error)
	// Generates a grounded answer from the model given an input
	// `GenerateAnswerRequest`.
	GenerateAnswer(context.Context, *GenerateAnswerRequest) (*GenerateAnswerResponse, error)
	// Generates a [streamed
	// response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream)
	// from the model given an input `GenerateContentRequest`.
	StreamGenerateContent(*GenerateContentRequest, GenerativeService_StreamGenerateContentServer) error
	// Generates a text embedding vector from the input `Content` using the
	// specified [Gemini Embedding
	// model](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding).
	EmbedContent(context.Context, *EmbedContentRequest) (*EmbedContentResponse, error)
	// Generates multiple embedding vectors from the input `Content` which
	// consists of a batch of strings represented as `EmbedContentRequest`
	// objects.
	BatchEmbedContents(context.Context, *BatchEmbedContentsRequest) (*BatchEmbedContentsResponse, error)
	// Runs a model's tokenizer on input `Content` and returns the token count.
	// Refer to the [tokens guide](https://ai.google.dev/gemini-api/docs/tokens)
	// to learn more about tokens.
	CountTokens(context.Context, *CountTokensRequest) (*CountTokensResponse, error)
	// Low-Latency bidirectional streaming API that supports audio and video
	// streaming inputs can produce multimodal output streams (audio and text).
	BidiGenerateContent(GenerativeService_BidiGenerateContentServer) error
}

GenerativeServiceServer is the server API for GenerativeService service. All implementations should embed UnimplementedGenerativeServiceServer for forward compatibility

GenerativeService_BidiGenerateContentClient

type GenerativeService_BidiGenerateContentClient interface {
	Send(*BidiGenerateContentClientMessage) error
	Recv() (*BidiGenerateContentServerMessage, error)
	grpc.ClientStream
}

GenerativeService_BidiGenerateContentServer

type GenerativeService_BidiGenerateContentServer interface {
	Send(*BidiGenerateContentServerMessage) error
	Recv() (*BidiGenerateContentClientMessage, error)
	grpc.ServerStream
}

GenerativeService_StreamGenerateContentClient

type GenerativeService_StreamGenerateContentClient interface {
	Recv() (*GenerateContentResponse, error)
	grpc.ClientStream
}

GenerativeService_StreamGenerateContentServer

type GenerativeService_StreamGenerateContentServer interface {
	Send(*GenerateContentResponse) error
	grpc.ServerStream
}

GetCachedContentRequest

type GetCachedContentRequest struct {

	// Required. The resource name referring to the content cache entry.
	// Format: `cachedContents/{id}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request to read CachedContent.

func (*GetCachedContentRequest) Descriptor

func (*GetCachedContentRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetCachedContentRequest.ProtoReflect.Descriptor instead.

func (*GetCachedContentRequest) GetName

func (x *GetCachedContentRequest) GetName() string

func (*GetCachedContentRequest) ProtoMessage

func (*GetCachedContentRequest) ProtoMessage()

func (*GetCachedContentRequest) ProtoReflect

func (x *GetCachedContentRequest) ProtoReflect() protoreflect.Message

func (*GetCachedContentRequest) Reset

func (x *GetCachedContentRequest) Reset()

func (*GetCachedContentRequest) String

func (x *GetCachedContentRequest) String() string

GetChunkRequest

type GetChunkRequest struct {

	// Required. The name of the `Chunk` to retrieve.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc/chunks/some-chunk`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for getting information about a specific Chunk.

func (*GetChunkRequest) Descriptor

func (*GetChunkRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetChunkRequest.ProtoReflect.Descriptor instead.

func (*GetChunkRequest) GetName

func (x *GetChunkRequest) GetName() string

func (*GetChunkRequest) ProtoMessage

func (*GetChunkRequest) ProtoMessage()

func (*GetChunkRequest) ProtoReflect

func (x *GetChunkRequest) ProtoReflect() protoreflect.Message

func (*GetChunkRequest) Reset

func (x *GetChunkRequest) Reset()

func (*GetChunkRequest) String

func (x *GetChunkRequest) String() string

GetCorpusRequest

type GetCorpusRequest struct {

	// Required. The name of the `Corpus`.
	// Example: `corpora/my-corpus-123`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for getting information about a specific Corpus.

func (*GetCorpusRequest) Descriptor

func (*GetCorpusRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetCorpusRequest.ProtoReflect.Descriptor instead.

func (*GetCorpusRequest) GetName

func (x *GetCorpusRequest) GetName() string

func (*GetCorpusRequest) ProtoMessage

func (*GetCorpusRequest) ProtoMessage()

func (*GetCorpusRequest) ProtoReflect

func (x *GetCorpusRequest) ProtoReflect() protoreflect.Message

func (*GetCorpusRequest) Reset

func (x *GetCorpusRequest) Reset()

func (*GetCorpusRequest) String

func (x *GetCorpusRequest) String() string

GetDocumentRequest

type GetDocumentRequest struct {

	// Required. The name of the `Document` to retrieve.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for getting information about a specific Document.

func (*GetDocumentRequest) Descriptor

func (*GetDocumentRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetDocumentRequest.ProtoReflect.Descriptor instead.

func (*GetDocumentRequest) GetName

func (x *GetDocumentRequest) GetName() string

func (*GetDocumentRequest) ProtoMessage

func (*GetDocumentRequest) ProtoMessage()

func (*GetDocumentRequest) ProtoReflect

func (x *GetDocumentRequest) ProtoReflect() protoreflect.Message

func (*GetDocumentRequest) Reset

func (x *GetDocumentRequest) Reset()

func (*GetDocumentRequest) String

func (x *GetDocumentRequest) String() string

GetFileRequest

type GetFileRequest struct {

	// Required. The name of the `File` to get.
	// Example: `files/abc-123`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for GetFile.

func (*GetFileRequest) Descriptor

func (*GetFileRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetFileRequest.ProtoReflect.Descriptor instead.

func (*GetFileRequest) GetName

func (x *GetFileRequest) GetName() string

func (*GetFileRequest) ProtoMessage

func (*GetFileRequest) ProtoMessage()

func (*GetFileRequest) ProtoReflect

func (x *GetFileRequest) ProtoReflect() protoreflect.Message

func (*GetFileRequest) Reset

func (x *GetFileRequest) Reset()

func (*GetFileRequest) String

func (x *GetFileRequest) String() string

GetModelRequest

type GetModelRequest struct {

	// Required. The resource name of the model.
	//
	// This name should match a model name returned by the `ListModels` method.
	//
	// Format: `models/{model}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for getting information about a specific Model.

func (*GetModelRequest) Descriptor

func (*GetModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetModelRequest.ProtoReflect.Descriptor instead.

func (*GetModelRequest) GetName

func (x *GetModelRequest) GetName() string

func (*GetModelRequest) ProtoMessage

func (*GetModelRequest) ProtoMessage()

func (*GetModelRequest) ProtoReflect

func (x *GetModelRequest) ProtoReflect() protoreflect.Message

func (*GetModelRequest) Reset

func (x *GetModelRequest) Reset()

func (*GetModelRequest) String

func (x *GetModelRequest) String() string

GetPermissionRequest

type GetPermissionRequest struct {

	// Required. The resource name of the permission.
	//
	// Formats:
	//
	//	`tunedModels/{tuned_model}/permissions/{permission}`
	//	`corpora/{corpus}/permissions/{permission}`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for getting information about a specific Permission.

func (*GetPermissionRequest) Descriptor

func (*GetPermissionRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPermissionRequest.ProtoReflect.Descriptor instead.

func (*GetPermissionRequest) GetName

func (x *GetPermissionRequest) GetName() string

func (*GetPermissionRequest) ProtoMessage

func (*GetPermissionRequest) ProtoMessage()

func (*GetPermissionRequest) ProtoReflect

func (x *GetPermissionRequest) ProtoReflect() protoreflect.Message

func (*GetPermissionRequest) Reset

func (x *GetPermissionRequest) Reset()

func (*GetPermissionRequest) String

func (x *GetPermissionRequest) String() string

GetTunedModelRequest

type GetTunedModelRequest struct {

	// Required. The resource name of the model.
	//
	// Format: `tunedModels/my-model-id`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Request for getting information about a specific Model.

func (*GetTunedModelRequest) Descriptor

func (*GetTunedModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetTunedModelRequest.ProtoReflect.Descriptor instead.

func (*GetTunedModelRequest) GetName

func (x *GetTunedModelRequest) GetName() string

func (*GetTunedModelRequest) ProtoMessage

func (*GetTunedModelRequest) ProtoMessage()

func (*GetTunedModelRequest) ProtoReflect

func (x *GetTunedModelRequest) ProtoReflect() protoreflect.Message

func (*GetTunedModelRequest) Reset

func (x *GetTunedModelRequest) Reset()

func (*GetTunedModelRequest) String

func (x *GetTunedModelRequest) String() string

GoogleSearchRetrieval

type GoogleSearchRetrieval struct {

	// Specifies the dynamic retrieval configuration for the given source.
	DynamicRetrievalConfig *DynamicRetrievalConfig `protobuf:"bytes,1,opt,name=dynamic_retrieval_config,json=dynamicRetrievalConfig,proto3" json:"dynamic_retrieval_config,omitempty"`
	// contains filtered or unexported fields
}

Tool to retrieve public web data for grounding, powered by Google.

func (*GoogleSearchRetrieval) Descriptor

func (*GoogleSearchRetrieval) Descriptor() ([]byte, []int)

Deprecated: Use GoogleSearchRetrieval.ProtoReflect.Descriptor instead.

func (*GoogleSearchRetrieval) GetDynamicRetrievalConfig

func (x *GoogleSearchRetrieval) GetDynamicRetrievalConfig() *DynamicRetrievalConfig

func (*GoogleSearchRetrieval) ProtoMessage

func (*GoogleSearchRetrieval) ProtoMessage()

func (*GoogleSearchRetrieval) ProtoReflect

func (x *GoogleSearchRetrieval) ProtoReflect() protoreflect.Message

func (*GoogleSearchRetrieval) Reset

func (x *GoogleSearchRetrieval) Reset()

func (*GoogleSearchRetrieval) String

func (x *GoogleSearchRetrieval) String() string

GroundingAttribution

type GroundingAttribution struct {

	// Output only. Identifier for the source contributing to this attribution.
	SourceId *AttributionSourceId `protobuf:"bytes,3,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
	// Grounding source content that makes up this attribution.
	Content *Content `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Attribution for a source that contributed to an answer.

func (*GroundingAttribution) Descriptor

func (*GroundingAttribution) Descriptor() ([]byte, []int)

Deprecated: Use GroundingAttribution.ProtoReflect.Descriptor instead.

func (*GroundingAttribution) GetContent

func (x *GroundingAttribution) GetContent() *Content

func (*GroundingAttribution) GetSourceId

func (x *GroundingAttribution) GetSourceId() *AttributionSourceId

func (*GroundingAttribution) ProtoMessage

func (*GroundingAttribution) ProtoMessage()

func (*GroundingAttribution) ProtoReflect

func (x *GroundingAttribution) ProtoReflect() protoreflect.Message

func (*GroundingAttribution) Reset

func (x *GroundingAttribution) Reset()

func (*GroundingAttribution) String

func (x *GroundingAttribution) String() string

GroundingChunk

type GroundingChunk struct {

	// Chunk type.
	//
	// Types that are assignable to ChunkType:
	//
	//	*GroundingChunk_Web_
	ChunkType isGroundingChunk_ChunkType `protobuf_oneof:"chunk_type"`
	// contains filtered or unexported fields
}

Grounding chunk.

func (*GroundingChunk) Descriptor

func (*GroundingChunk) Descriptor() ([]byte, []int)

Deprecated: Use GroundingChunk.ProtoReflect.Descriptor instead.

func (*GroundingChunk) GetChunkType

func (m *GroundingChunk) GetChunkType() isGroundingChunk_ChunkType

func (*GroundingChunk) GetWeb

func (x *GroundingChunk) GetWeb() *GroundingChunk_Web

func (*GroundingChunk) ProtoMessage

func (*GroundingChunk) ProtoMessage()

func (*GroundingChunk) ProtoReflect

func (x *GroundingChunk) ProtoReflect() protoreflect.Message

func (*GroundingChunk) Reset

func (x *GroundingChunk) Reset()

func (*GroundingChunk) String

func (x *GroundingChunk) String() string

GroundingChunk_Web

type GroundingChunk_Web struct {

	// URI reference of the chunk.
	Uri *string `protobuf:"bytes,1,opt,name=uri,proto3,oneof" json:"uri,omitempty"`
	// Title of the chunk.
	Title *string `protobuf:"bytes,2,opt,name=title,proto3,oneof" json:"title,omitempty"`
	// contains filtered or unexported fields
}

Chunk from the web.

func (*GroundingChunk_Web) Descriptor

func (*GroundingChunk_Web) Descriptor() ([]byte, []int)

Deprecated: Use GroundingChunk_Web.ProtoReflect.Descriptor instead.

func (*GroundingChunk_Web) GetTitle

func (x *GroundingChunk_Web) GetTitle() string

func (*GroundingChunk_Web) GetUri

func (x *GroundingChunk_Web) GetUri() string

func (*GroundingChunk_Web) ProtoMessage

func (*GroundingChunk_Web) ProtoMessage()

func (*GroundingChunk_Web) ProtoReflect

func (x *GroundingChunk_Web) ProtoReflect() protoreflect.Message

func (*GroundingChunk_Web) Reset

func (x *GroundingChunk_Web) Reset()

func (*GroundingChunk_Web) String

func (x *GroundingChunk_Web) String() string

GroundingChunk_Web_

type GroundingChunk_Web_ struct {
	// Grounding chunk from the web.
	Web *GroundingChunk_Web `protobuf:"bytes,1,opt,name=web,proto3,oneof"`
}

GroundingMetadata

type GroundingMetadata struct {

	// Optional. Google search entry for the following-up web searches.
	SearchEntryPoint *SearchEntryPoint `protobuf:"bytes,1,opt,name=search_entry_point,json=searchEntryPoint,proto3,oneof" json:"search_entry_point,omitempty"`
	// List of supporting references retrieved from specified grounding source.
	GroundingChunks []*GroundingChunk `protobuf:"bytes,2,rep,name=grounding_chunks,json=groundingChunks,proto3" json:"grounding_chunks,omitempty"`
	// List of grounding support.
	GroundingSupports []*GroundingSupport `protobuf:"bytes,3,rep,name=grounding_supports,json=groundingSupports,proto3" json:"grounding_supports,omitempty"`
	// Metadata related to retrieval in the grounding flow.
	RetrievalMetadata *RetrievalMetadata `protobuf:"bytes,4,opt,name=retrieval_metadata,json=retrievalMetadata,proto3,oneof" json:"retrieval_metadata,omitempty"`
	// Web search queries for the following-up web search.
	WebSearchQueries []string `protobuf:"bytes,5,rep,name=web_search_queries,json=webSearchQueries,proto3" json:"web_search_queries,omitempty"`
	// contains filtered or unexported fields
}

Metadata returned to client when grounding is enabled.

func (*GroundingMetadata) Descriptor

func (*GroundingMetadata) Descriptor() ([]byte, []int)

Deprecated: Use GroundingMetadata.ProtoReflect.Descriptor instead.

func (*GroundingMetadata) GetGroundingChunks

func (x *GroundingMetadata) GetGroundingChunks() []*GroundingChunk

func (*GroundingMetadata) GetGroundingSupports

func (x *GroundingMetadata) GetGroundingSupports() []*GroundingSupport

func (*GroundingMetadata) GetRetrievalMetadata

func (x *GroundingMetadata) GetRetrievalMetadata() *RetrievalMetadata

func (*GroundingMetadata) GetSearchEntryPoint

func (x *GroundingMetadata) GetSearchEntryPoint() *SearchEntryPoint

func (*GroundingMetadata) GetWebSearchQueries

func (x *GroundingMetadata) GetWebSearchQueries() []string

func (*GroundingMetadata) ProtoMessage

func (*GroundingMetadata) ProtoMessage()

func (*GroundingMetadata) ProtoReflect

func (x *GroundingMetadata) ProtoReflect() protoreflect.Message

func (*GroundingMetadata) Reset

func (x *GroundingMetadata) Reset()

func (*GroundingMetadata) String

func (x *GroundingMetadata) String() string

GroundingPassage

type GroundingPassage struct {

	// Identifier for the passage for attributing this passage in grounded
	// answers.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Content of the passage.
	Content *Content `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

Passage included inline with a grounding configuration.

func (*GroundingPassage) Descriptor

func (*GroundingPassage) Descriptor() ([]byte, []int)

Deprecated: Use GroundingPassage.ProtoReflect.Descriptor instead.

func (*GroundingPassage) GetContent

func (x *GroundingPassage) GetContent() *Content

func (*GroundingPassage) GetId

func (x *GroundingPassage) GetId() string

func (*GroundingPassage) ProtoMessage

func (*GroundingPassage) ProtoMessage()

func (*GroundingPassage) ProtoReflect

func (x *GroundingPassage) ProtoReflect() protoreflect.Message

func (*GroundingPassage) Reset

func (x *GroundingPassage) Reset()

func (*GroundingPassage) String

func (x *GroundingPassage) String() string

GroundingPassages

type GroundingPassages struct {

	// List of passages.
	Passages []*GroundingPassage `protobuf:"bytes,1,rep,name=passages,proto3" json:"passages,omitempty"`
	// contains filtered or unexported fields
}

A repeated list of passages.

func (*GroundingPassages) Descriptor

func (*GroundingPassages) Descriptor() ([]byte, []int)

Deprecated: Use GroundingPassages.ProtoReflect.Descriptor instead.

func (*GroundingPassages) GetPassages

func (x *GroundingPassages) GetPassages() []*GroundingPassage

func (*GroundingPassages) ProtoMessage

func (*GroundingPassages) ProtoMessage()

func (*GroundingPassages) ProtoReflect

func (x *GroundingPassages) ProtoReflect() protoreflect.Message

func (*GroundingPassages) Reset

func (x *GroundingPassages) Reset()

func (*GroundingPassages) String

func (x *GroundingPassages) String() string

GroundingSupport

type GroundingSupport struct {

	// Segment of the content this support belongs to.
	Segment *Segment `protobuf:"bytes,1,opt,name=segment,proto3,oneof" json:"segment,omitempty"`
	// A list of indices (into 'grounding_chunk') specifying the
	// citations associated with the claim. For instance [1,3,4] means
	// that grounding_chunk[1], grounding_chunk[3],
	// grounding_chunk[4] are the retrieved content attributed to the claim.
	GroundingChunkIndices []int32 `protobuf:"varint,2,rep,packed,name=grounding_chunk_indices,json=groundingChunkIndices,proto3" json:"grounding_chunk_indices,omitempty"`
	// Confidence score of the support references. Ranges from 0 to 1. 1 is the
	// most confident. This list must have the same size as the
	// grounding_chunk_indices.
	ConfidenceScores []float32 `protobuf:"fixed32,3,rep,packed,name=confidence_scores,json=confidenceScores,proto3" json:"confidence_scores,omitempty"`
	// contains filtered or unexported fields
}

Grounding support.

func (*GroundingSupport) Descriptor

func (*GroundingSupport) Descriptor() ([]byte, []int)

Deprecated: Use GroundingSupport.ProtoReflect.Descriptor instead.

func (*GroundingSupport) GetConfidenceScores

func (x *GroundingSupport) GetConfidenceScores() []float32

func (*GroundingSupport) GetGroundingChunkIndices

func (x *GroundingSupport) GetGroundingChunkIndices() []int32

func (*GroundingSupport) GetSegment

func (x *GroundingSupport) GetSegment() *Segment

func (*GroundingSupport) ProtoMessage

func (*GroundingSupport) ProtoMessage()

func (*GroundingSupport) ProtoReflect

func (x *GroundingSupport) ProtoReflect() protoreflect.Message

func (*GroundingSupport) Reset

func (x *GroundingSupport) Reset()

func (*GroundingSupport) String

func (x *GroundingSupport) String() string

HarmCategory

type HarmCategory int32

The category of a rating.

These categories cover various kinds of harms that developers may wish to adjust.

HarmCategory_HARM_CATEGORY_UNSPECIFIED, HarmCategory_HARM_CATEGORY_DEROGATORY, HarmCategory_HARM_CATEGORY_TOXICITY, HarmCategory_HARM_CATEGORY_VIOLENCE, HarmCategory_HARM_CATEGORY_SEXUAL, HarmCategory_HARM_CATEGORY_MEDICAL, HarmCategory_HARM_CATEGORY_DANGEROUS, HarmCategory_HARM_CATEGORY_HARASSMENT, HarmCategory_HARM_CATEGORY_HATE_SPEECH, HarmCategory_HARM_CATEGORY_SEXUALLY_EXPLICIT, HarmCategory_HARM_CATEGORY_DANGEROUS_CONTENT, HarmCategory_HARM_CATEGORY_CIVIC_INTEGRITY

const (
	// Category is unspecified.
	HarmCategory_HARM_CATEGORY_UNSPECIFIED HarmCategory = 0
	// **PaLM** - Negative or harmful comments targeting identity and/or protected
	// attribute.
	HarmCategory_HARM_CATEGORY_DEROGATORY HarmCategory = 1
	// **PaLM** - Content that is rude, disrespectful, or profane.
	HarmCategory_HARM_CATEGORY_TOXICITY HarmCategory = 2
	// **PaLM** - Describes scenarios depicting violence against an individual or
	// group, or general descriptions of gore.
	HarmCategory_HARM_CATEGORY_VIOLENCE HarmCategory = 3
	// **PaLM** - Contains references to sexual acts or other lewd content.
	HarmCategory_HARM_CATEGORY_SEXUAL HarmCategory = 4
	// **PaLM** - Promotes unchecked medical advice.
	HarmCategory_HARM_CATEGORY_MEDICAL HarmCategory = 5
	// **PaLM** - Dangerous content that promotes, facilitates, or encourages
	// harmful acts.
	HarmCategory_HARM_CATEGORY_DANGEROUS HarmCategory = 6
	// **Gemini** - Harassment content.
	HarmCategory_HARM_CATEGORY_HARASSMENT HarmCategory = 7
	// **Gemini** - Hate speech and content.
	HarmCategory_HARM_CATEGORY_HATE_SPEECH HarmCategory = 8
	// **Gemini** - Sexually explicit content.
	HarmCategory_HARM_CATEGORY_SEXUALLY_EXPLICIT HarmCategory = 9
	// **Gemini** - Dangerous content.
	HarmCategory_HARM_CATEGORY_DANGEROUS_CONTENT HarmCategory = 10
	// **Gemini** - Content that may be used to harm civic integrity.
	HarmCategory_HARM_CATEGORY_CIVIC_INTEGRITY HarmCategory = 11
)

func (HarmCategory) Descriptor

func (HarmCategory) Enum

func (x HarmCategory) Enum() *HarmCategory

func (HarmCategory) EnumDescriptor

func (HarmCategory) EnumDescriptor() ([]byte, []int)

Deprecated: Use HarmCategory.Descriptor instead.

func (HarmCategory) Number

func (HarmCategory) String

func (x HarmCategory) String() string

func (HarmCategory) Type

Hyperparameters

type Hyperparameters struct {

	// Options for specifying learning rate during tuning.
	//
	// Types that are assignable to LearningRateOption:
	//
	//	*Hyperparameters_LearningRate
	//	*Hyperparameters_LearningRateMultiplier
	LearningRateOption isHyperparameters_LearningRateOption `protobuf_oneof:"learning_rate_option"`
	// Immutable. The number of training epochs. An epoch is one pass through the
	// training data. If not set, a default of 5 will be used.
	EpochCount *int32 `protobuf:"varint,14,opt,name=epoch_count,json=epochCount,proto3,oneof" json:"epoch_count,omitempty"`
	// Immutable. The batch size hyperparameter for tuning.
	// If not set, a default of 4 or 16 will be used based on the number of
	// training examples.
	BatchSize *int32 `protobuf:"varint,15,opt,name=batch_size,json=batchSize,proto3,oneof" json:"batch_size,omitempty"`
	// contains filtered or unexported fields
}

Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance

func (*Hyperparameters) Descriptor

func (*Hyperparameters) Descriptor() ([]byte, []int)

Deprecated: Use Hyperparameters.ProtoReflect.Descriptor instead.

func (*Hyperparameters) GetBatchSize

func (x *Hyperparameters) GetBatchSize() int32

func (*Hyperparameters) GetEpochCount

func (x *Hyperparameters) GetEpochCount() int32

func (*Hyperparameters) GetLearningRate

func (x *Hyperparameters) GetLearningRate() float32

func (*Hyperparameters) GetLearningRateMultiplier

func (x *Hyperparameters) GetLearningRateMultiplier() float32

func (*Hyperparameters) GetLearningRateOption

func (m *Hyperparameters) GetLearningRateOption() isHyperparameters_LearningRateOption

func (*Hyperparameters) ProtoMessage

func (*Hyperparameters) ProtoMessage()

func (*Hyperparameters) ProtoReflect

func (x *Hyperparameters) ProtoReflect() protoreflect.Message

func (*Hyperparameters) Reset

func (x *Hyperparameters) Reset()

func (*Hyperparameters) String

func (x *Hyperparameters) String() string

Hyperparameters_LearningRate

type Hyperparameters_LearningRate struct {
	// Optional. Immutable. The learning rate hyperparameter for tuning.
	// If not set, a default of 0.001 or 0.0002 will be calculated based on the
	// number of training examples.
	LearningRate float32 `protobuf:"fixed32,16,opt,name=learning_rate,json=learningRate,proto3,oneof"`
}

Hyperparameters_LearningRateMultiplier

type Hyperparameters_LearningRateMultiplier struct {
	// Optional. Immutable. The learning rate multiplier is used to calculate a
	// final learning_rate based on the default (recommended) value. Actual
	// learning rate := learning_rate_multiplier * default learning rate Default
	// learning rate is dependent on base model and dataset size. If not set, a
	// default of 1.0 will be used.
	LearningRateMultiplier float32 `protobuf:"fixed32,17,opt,name=learning_rate_multiplier,json=learningRateMultiplier,proto3,oneof"`
}

ListCachedContentsRequest

type ListCachedContentsRequest struct {

	// Optional. The maximum number of cached contents to return. The service may
	// return fewer than this value. If unspecified, some default (under maximum)
	// number of items will be returned. The maximum value is 1000; values above
	// 1000 will be coerced to 1000.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token, received from a previous `ListCachedContents` call.
	// Provide this to retrieve the subsequent page.
	//
	// When paginating, all other parameters provided to `ListCachedContents` must
	// match the call that provided the page token.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request to list CachedContents.

func (*ListCachedContentsRequest) Descriptor

func (*ListCachedContentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListCachedContentsRequest.ProtoReflect.Descriptor instead.

func (*ListCachedContentsRequest) GetPageSize

func (x *ListCachedContentsRequest) GetPageSize() int32

func (*ListCachedContentsRequest) GetPageToken

func (x *ListCachedContentsRequest) GetPageToken() string

func (*ListCachedContentsRequest) ProtoMessage

func (*ListCachedContentsRequest) ProtoMessage()

func (*ListCachedContentsRequest) ProtoReflect

func (*ListCachedContentsRequest) Reset

func (x *ListCachedContentsRequest) Reset()

func (*ListCachedContentsRequest) String

func (x *ListCachedContentsRequest) String() string

ListCachedContentsResponse

type ListCachedContentsResponse struct {

	// List of cached contents.
	CachedContents []*CachedContent `protobuf:"bytes,1,rep,name=cached_contents,json=cachedContents,proto3" json:"cached_contents,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no subsequent pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response with CachedContents list.

func (*ListCachedContentsResponse) Descriptor

func (*ListCachedContentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListCachedContentsResponse.ProtoReflect.Descriptor instead.

func (*ListCachedContentsResponse) GetCachedContents

func (x *ListCachedContentsResponse) GetCachedContents() []*CachedContent

func (*ListCachedContentsResponse) GetNextPageToken

func (x *ListCachedContentsResponse) GetNextPageToken() string

func (*ListCachedContentsResponse) ProtoMessage

func (*ListCachedContentsResponse) ProtoMessage()

func (*ListCachedContentsResponse) ProtoReflect

func (*ListCachedContentsResponse) Reset

func (x *ListCachedContentsResponse) Reset()

func (*ListCachedContentsResponse) String

func (x *ListCachedContentsResponse) String() string

ListChunksRequest

type ListChunksRequest struct {

	// Required. The name of the `Document` containing `Chunk`s.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Optional. The maximum number of `Chunk`s to return (per page).
	// The service may return fewer `Chunk`s.
	//
	// If unspecified, at most 10 `Chunk`s will be returned.
	// The maximum size limit is 100 `Chunk`s per page.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token, received from a previous `ListChunks` call.
	//
	// Provide the `next_page_token` returned in the response as an argument to
	// the next request to retrieve the next page.
	//
	// When paginating, all other parameters provided to `ListChunks`
	// must match the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request for listing Chunks.

func (*ListChunksRequest) Descriptor

func (*ListChunksRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListChunksRequest.ProtoReflect.Descriptor instead.

func (*ListChunksRequest) GetPageSize

func (x *ListChunksRequest) GetPageSize() int32

func (*ListChunksRequest) GetPageToken

func (x *ListChunksRequest) GetPageToken() string

func (*ListChunksRequest) GetParent

func (x *ListChunksRequest) GetParent() string

func (*ListChunksRequest) ProtoMessage

func (*ListChunksRequest) ProtoMessage()

func (*ListChunksRequest) ProtoReflect

func (x *ListChunksRequest) ProtoReflect() protoreflect.Message

func (*ListChunksRequest) Reset

func (x *ListChunksRequest) Reset()

func (*ListChunksRequest) String

func (x *ListChunksRequest) String() string

ListChunksResponse

type ListChunksResponse struct {

	// The returned `Chunk`s.
	Chunks []*Chunk `protobuf:"bytes,1,rep,name=chunks,proto3" json:"chunks,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response from ListChunks containing a paginated list of Chunks. The Chunks are sorted by ascending chunk.create_time.

func (*ListChunksResponse) Descriptor

func (*ListChunksResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListChunksResponse.ProtoReflect.Descriptor instead.

func (*ListChunksResponse) GetChunks

func (x *ListChunksResponse) GetChunks() []*Chunk

func (*ListChunksResponse) GetNextPageToken

func (x *ListChunksResponse) GetNextPageToken() string

func (*ListChunksResponse) ProtoMessage

func (*ListChunksResponse) ProtoMessage()

func (*ListChunksResponse) ProtoReflect

func (x *ListChunksResponse) ProtoReflect() protoreflect.Message

func (*ListChunksResponse) Reset

func (x *ListChunksResponse) Reset()

func (*ListChunksResponse) String

func (x *ListChunksResponse) String() string

ListCorporaRequest

type ListCorporaRequest struct {

	// Optional. The maximum number of `Corpora` to return (per page).
	// The service may return fewer `Corpora`.
	//
	// If unspecified, at most 10 `Corpora` will be returned.
	// The maximum size limit is 20 `Corpora` per page.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token, received from a previous `ListCorpora` call.
	//
	// Provide the `next_page_token` returned in the response as an argument to
	// the next request to retrieve the next page.
	//
	// When paginating, all other parameters provided to `ListCorpora`
	// must match the call that provided the page token.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request for listing Corpora.

func (*ListCorporaRequest) Descriptor

func (*ListCorporaRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListCorporaRequest.ProtoReflect.Descriptor instead.

func (*ListCorporaRequest) GetPageSize

func (x *ListCorporaRequest) GetPageSize() int32

func (*ListCorporaRequest) GetPageToken

func (x *ListCorporaRequest) GetPageToken() string

func (*ListCorporaRequest) ProtoMessage

func (*ListCorporaRequest) ProtoMessage()

func (*ListCorporaRequest) ProtoReflect

func (x *ListCorporaRequest) ProtoReflect() protoreflect.Message

func (*ListCorporaRequest) Reset

func (x *ListCorporaRequest) Reset()

func (*ListCorporaRequest) String

func (x *ListCorporaRequest) String() string

ListCorporaResponse

type ListCorporaResponse struct {

	// The returned corpora.
	Corpora []*Corpus `protobuf:"bytes,1,rep,name=corpora,proto3" json:"corpora,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response from ListCorpora containing a paginated list of Corpora. The results are sorted by ascending corpus.create_time.

func (*ListCorporaResponse) Descriptor

func (*ListCorporaResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListCorporaResponse.ProtoReflect.Descriptor instead.

func (*ListCorporaResponse) GetCorpora

func (x *ListCorporaResponse) GetCorpora() []*Corpus

func (*ListCorporaResponse) GetNextPageToken

func (x *ListCorporaResponse) GetNextPageToken() string

func (*ListCorporaResponse) ProtoMessage

func (*ListCorporaResponse) ProtoMessage()

func (*ListCorporaResponse) ProtoReflect

func (x *ListCorporaResponse) ProtoReflect() protoreflect.Message

func (*ListCorporaResponse) Reset

func (x *ListCorporaResponse) Reset()

func (*ListCorporaResponse) String

func (x *ListCorporaResponse) String() string

ListDocumentsRequest

type ListDocumentsRequest struct {

	// Required. The name of the `Corpus` containing `Document`s.
	// Example: `corpora/my-corpus-123`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Optional. The maximum number of `Document`s to return (per page).
	// The service may return fewer `Document`s.
	//
	// If unspecified, at most 10 `Document`s will be returned.
	// The maximum size limit is 20 `Document`s per page.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token, received from a previous `ListDocuments` call.
	//
	// Provide the `next_page_token` returned in the response as an argument to
	// the next request to retrieve the next page.
	//
	// When paginating, all other parameters provided to `ListDocuments`
	// must match the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request for listing Documents.

func (*ListDocumentsRequest) Descriptor

func (*ListDocumentsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListDocumentsRequest.ProtoReflect.Descriptor instead.

func (*ListDocumentsRequest) GetPageSize

func (x *ListDocumentsRequest) GetPageSize() int32

func (*ListDocumentsRequest) GetPageToken

func (x *ListDocumentsRequest) GetPageToken() string

func (*ListDocumentsRequest) GetParent

func (x *ListDocumentsRequest) GetParent() string

func (*ListDocumentsRequest) ProtoMessage

func (*ListDocumentsRequest) ProtoMessage()

func (*ListDocumentsRequest) ProtoReflect

func (x *ListDocumentsRequest) ProtoReflect() protoreflect.Message

func (*ListDocumentsRequest) Reset

func (x *ListDocumentsRequest) Reset()

func (*ListDocumentsRequest) String

func (x *ListDocumentsRequest) String() string

ListDocumentsResponse

type ListDocumentsResponse struct {

	// The returned `Document`s.
	Documents []*Document `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	// If this field is omitted, there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response from ListDocuments containing a paginated list of Documents. The Documents are sorted by ascending document.create_time.

func (*ListDocumentsResponse) Descriptor

func (*ListDocumentsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListDocumentsResponse.ProtoReflect.Descriptor instead.

func (*ListDocumentsResponse) GetDocuments

func (x *ListDocumentsResponse) GetDocuments() []*Document

func (*ListDocumentsResponse) GetNextPageToken

func (x *ListDocumentsResponse) GetNextPageToken() string

func (*ListDocumentsResponse) ProtoMessage

func (*ListDocumentsResponse) ProtoMessage()

func (*ListDocumentsResponse) ProtoReflect

func (x *ListDocumentsResponse) ProtoReflect() protoreflect.Message

func (*ListDocumentsResponse) Reset

func (x *ListDocumentsResponse) Reset()

func (*ListDocumentsResponse) String

func (x *ListDocumentsResponse) String() string

ListFilesRequest

type ListFilesRequest struct {

	// Optional. Maximum number of `File`s to return per page.
	// If unspecified, defaults to 10. Maximum `page_size` is 100.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token from a previous `ListFiles` call.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request for ListFiles.

func (*ListFilesRequest) Descriptor

func (*ListFilesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.

func (*ListFilesRequest) GetPageSize

func (x *ListFilesRequest) GetPageSize() int32

func (*ListFilesRequest) GetPageToken

func (x *ListFilesRequest) GetPageToken() string

func (*ListFilesRequest) ProtoMessage

func (*ListFilesRequest) ProtoMessage()

func (*ListFilesRequest) ProtoReflect

func (x *ListFilesRequest) ProtoReflect() protoreflect.Message

func (*ListFilesRequest) Reset

func (x *ListFilesRequest) Reset()

func (*ListFilesRequest) String

func (x *ListFilesRequest) String() string

ListFilesResponse

type ListFilesResponse struct {

	// The list of `File`s.
	Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
	// A token that can be sent as a `page_token` into a subsequent `ListFiles`
	// call.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response for ListFiles.

func (*ListFilesResponse) Descriptor

func (*ListFilesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead.

func (*ListFilesResponse) GetFiles

func (x *ListFilesResponse) GetFiles() []*File

func (*ListFilesResponse) GetNextPageToken

func (x *ListFilesResponse) GetNextPageToken() string

func (*ListFilesResponse) ProtoMessage

func (*ListFilesResponse) ProtoMessage()

func (*ListFilesResponse) ProtoReflect

func (x *ListFilesResponse) ProtoReflect() protoreflect.Message

func (*ListFilesResponse) Reset

func (x *ListFilesResponse) Reset()

func (*ListFilesResponse) String

func (x *ListFilesResponse) String() string

ListModelsRequest

type ListModelsRequest struct {

	// The maximum number of `Models` to return (per page).
	//
	// If unspecified, 50 models will be returned per page.
	// This method returns at most 1000 models per page, even if you pass a larger
	// page_size.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// A page token, received from a previous `ListModels` call.
	//
	// Provide the `page_token` returned by one request as an argument to the next
	// request to retrieve the next page.
	//
	// When paginating, all other parameters provided to `ListModels` must match
	// the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request for listing all Models.

func (*ListModelsRequest) Descriptor

func (*ListModelsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListModelsRequest.ProtoReflect.Descriptor instead.

func (*ListModelsRequest) GetPageSize

func (x *ListModelsRequest) GetPageSize() int32

func (*ListModelsRequest) GetPageToken

func (x *ListModelsRequest) GetPageToken() string

func (*ListModelsRequest) ProtoMessage

func (*ListModelsRequest) ProtoMessage()

func (*ListModelsRequest) ProtoReflect

func (x *ListModelsRequest) ProtoReflect() protoreflect.Message

func (*ListModelsRequest) Reset

func (x *ListModelsRequest) Reset()

func (*ListModelsRequest) String

func (x *ListModelsRequest) String() string

ListModelsResponse

type ListModelsResponse struct {

	// The returned Models.
	Models []*Model `protobuf:"bytes,1,rep,name=models,proto3" json:"models,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	//
	// If this field is omitted, there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response from ListModel containing a paginated list of Models.

func (*ListModelsResponse) Descriptor

func (*ListModelsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListModelsResponse.ProtoReflect.Descriptor instead.

func (*ListModelsResponse) GetModels

func (x *ListModelsResponse) GetModels() []*Model

func (*ListModelsResponse) GetNextPageToken

func (x *ListModelsResponse) GetNextPageToken() string

func (*ListModelsResponse) ProtoMessage

func (*ListModelsResponse) ProtoMessage()

func (*ListModelsResponse) ProtoReflect

func (x *ListModelsResponse) ProtoReflect() protoreflect.Message

func (*ListModelsResponse) Reset

func (x *ListModelsResponse) Reset()

func (*ListModelsResponse) String

func (x *ListModelsResponse) String() string

ListPermissionsRequest

type ListPermissionsRequest struct {

	// Required. The parent resource of the permissions.
	// Formats:
	//
	//	`tunedModels/{tuned_model}`
	//	`corpora/{corpus}`
	Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
	// Optional. The maximum number of `Permission`s to return (per page).
	// The service may return fewer permissions.
	//
	// If unspecified, at most 10 permissions will be returned.
	// This method returns at most 1000 permissions per page, even if you pass
	// larger page_size.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token, received from a previous `ListPermissions` call.
	//
	// Provide the `page_token` returned by one request as an argument to the
	// next request to retrieve the next page.
	//
	// When paginating, all other parameters provided to `ListPermissions`
	// must match the call that provided the page token.
	PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// contains filtered or unexported fields
}

Request for listing permissions.

func (*ListPermissionsRequest) Descriptor

func (*ListPermissionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPermissionsRequest.ProtoReflect.Descriptor instead.

func (*ListPermissionsRequest) GetPageSize

func (x *ListPermissionsRequest) GetPageSize() int32

func (*ListPermissionsRequest) GetPageToken

func (x *ListPermissionsRequest) GetPageToken() string

func (*ListPermissionsRequest) GetParent

func (x *ListPermissionsRequest) GetParent() string

func (*ListPermissionsRequest) ProtoMessage

func (*ListPermissionsRequest) ProtoMessage()

func (*ListPermissionsRequest) ProtoReflect

func (x *ListPermissionsRequest) ProtoReflect() protoreflect.Message

func (*ListPermissionsRequest) Reset

func (x *ListPermissionsRequest) Reset()

func (*ListPermissionsRequest) String

func (x *ListPermissionsRequest) String() string

ListPermissionsResponse

type ListPermissionsResponse struct {

	// Returned permissions.
	Permissions []*Permission `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	//
	// If this field is omitted, there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response from ListPermissions containing a paginated list of permissions.

func (*ListPermissionsResponse) Descriptor

func (*ListPermissionsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListPermissionsResponse.ProtoReflect.Descriptor instead.

func (*ListPermissionsResponse) GetNextPageToken

func (x *ListPermissionsResponse) GetNextPageToken() string

func (*ListPermissionsResponse) GetPermissions

func (x *ListPermissionsResponse) GetPermissions() []*Permission

func (*ListPermissionsResponse) ProtoMessage

func (*ListPermissionsResponse) ProtoMessage()

func (*ListPermissionsResponse) ProtoReflect

func (x *ListPermissionsResponse) ProtoReflect() protoreflect.Message

func (*ListPermissionsResponse) Reset

func (x *ListPermissionsResponse) Reset()

func (*ListPermissionsResponse) String

func (x *ListPermissionsResponse) String() string

ListTunedModelsRequest

type ListTunedModelsRequest struct {

	// Optional. The maximum number of `TunedModels` to return (per page).
	// The service may return fewer tuned models.
	//
	// If unspecified, at most 10 tuned models will be returned.
	// This method returns at most 1000 models per page, even if you pass a larger
	// page_size.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token, received from a previous `ListTunedModels` call.
	//
	// Provide the `page_token` returned by one request as an argument to the next
	// request to retrieve the next page.
	//
	// When paginating, all other parameters provided to `ListTunedModels`
	// must match the call that provided the page token.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// Optional. A filter is a full text search over the tuned model's description
	// and display name. By default, results will not include tuned models shared
	// with everyone.
	//
	// Additional operators:
	//   - owner:me
	//   - writers:me
	//   - readers:me
	//   - readers:everyone
	//
	// Examples:
	//
	//	"owner:me" returns all tuned models to which caller has owner role
	//	"readers:me" returns all tuned models to which caller has reader role
	//	"readers:everyone" returns all tuned models that are shared with everyone
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

Request for listing TunedModels.

func (*ListTunedModelsRequest) Descriptor

func (*ListTunedModelsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListTunedModelsRequest.ProtoReflect.Descriptor instead.

func (*ListTunedModelsRequest) GetFilter

func (x *ListTunedModelsRequest) GetFilter() string

func (*ListTunedModelsRequest) GetPageSize

func (x *ListTunedModelsRequest) GetPageSize() int32

func (*ListTunedModelsRequest) GetPageToken

func (x *ListTunedModelsRequest) GetPageToken() string

func (*ListTunedModelsRequest) ProtoMessage

func (*ListTunedModelsRequest) ProtoMessage()

func (*ListTunedModelsRequest) ProtoReflect

func (x *ListTunedModelsRequest) ProtoReflect() protoreflect.Message

func (*ListTunedModelsRequest) Reset

func (x *ListTunedModelsRequest) Reset()

func (*ListTunedModelsRequest) String

func (x *ListTunedModelsRequest) String() string

ListTunedModelsResponse

type ListTunedModelsResponse struct {

	// The returned Models.
	TunedModels []*TunedModel `protobuf:"bytes,1,rep,name=tuned_models,json=tunedModels,proto3" json:"tuned_models,omitempty"`
	// A token, which can be sent as `page_token` to retrieve the next page.
	//
	// If this field is omitted, there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

Response from ListTunedModels containing a paginated list of Models.

func (*ListTunedModelsResponse) Descriptor

func (*ListTunedModelsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListTunedModelsResponse.ProtoReflect.Descriptor instead.

func (*ListTunedModelsResponse) GetNextPageToken

func (x *ListTunedModelsResponse) GetNextPageToken() string

func (*ListTunedModelsResponse) GetTunedModels

func (x *ListTunedModelsResponse) GetTunedModels() []*TunedModel

func (*ListTunedModelsResponse) ProtoMessage

func (*ListTunedModelsResponse) ProtoMessage()

func (*ListTunedModelsResponse) ProtoReflect

func (x *ListTunedModelsResponse) ProtoReflect() protoreflect.Message

func (*ListTunedModelsResponse) Reset

func (x *ListTunedModelsResponse) Reset()

func (*ListTunedModelsResponse) String

func (x *ListTunedModelsResponse) String() string

LogprobsResult

type LogprobsResult struct {

	// Length = total number of decoding steps.
	TopCandidates []*LogprobsResult_TopCandidates `protobuf:"bytes,1,rep,name=top_candidates,json=topCandidates,proto3" json:"top_candidates,omitempty"`
	// Length = total number of decoding steps.
	// The chosen candidates may or may not be in top_candidates.
	ChosenCandidates []*LogprobsResult_Candidate `protobuf:"bytes,2,rep,name=chosen_candidates,json=chosenCandidates,proto3" json:"chosen_candidates,omitempty"`
	// contains filtered or unexported fields
}

Logprobs Result

func (*LogprobsResult) Descriptor

func (*LogprobsResult) Descriptor() ([]byte, []int)

Deprecated: Use LogprobsResult.ProtoReflect.Descriptor instead.

func (*LogprobsResult) GetChosenCandidates

func (x *LogprobsResult) GetChosenCandidates() []*LogprobsResult_Candidate

func (*LogprobsResult) GetTopCandidates

func (x *LogprobsResult) GetTopCandidates() []*LogprobsResult_TopCandidates

func (*LogprobsResult) ProtoMessage

func (*LogprobsResult) ProtoMessage()

func (*LogprobsResult) ProtoReflect

func (x *LogprobsResult) ProtoReflect() protoreflect.Message

func (*LogprobsResult) Reset

func (x *LogprobsResult) Reset()

func (*LogprobsResult) String

func (x *LogprobsResult) String() string

LogprobsResult_Candidate

type LogprobsResult_Candidate struct {

	// The candidate’s token string value.
	Token *string `protobuf:"bytes,1,opt,name=token,proto3,oneof" json:"token,omitempty"`
	// The candidate’s token id value.
	TokenId *int32 `protobuf:"varint,3,opt,name=token_id,json=tokenId,proto3,oneof" json:"token_id,omitempty"`
	// The candidate's log probability.
	LogProbability *float32 `protobuf:"fixed32,2,opt,name=log_probability,json=logProbability,proto3,oneof" json:"log_probability,omitempty"`
	// contains filtered or unexported fields
}

Candidate for the logprobs token and score.

func (*LogprobsResult_Candidate) Descriptor

func (*LogprobsResult_Candidate) Descriptor() ([]byte, []int)

Deprecated: Use LogprobsResult_Candidate.ProtoReflect.Descriptor instead.

func (*LogprobsResult_Candidate) GetLogProbability

func (x *LogprobsResult_Candidate) GetLogProbability() float32

func (*LogprobsResult_Candidate) GetToken

func (x *LogprobsResult_Candidate) GetToken() string

func (*LogprobsResult_Candidate) GetTokenId

func (x *LogprobsResult_Candidate) GetTokenId() int32

func (*LogprobsResult_Candidate) ProtoMessage

func (*LogprobsResult_Candidate) ProtoMessage()

func (*LogprobsResult_Candidate) ProtoReflect

func (x *LogprobsResult_Candidate) ProtoReflect() protoreflect.Message

func (*LogprobsResult_Candidate) Reset

func (x *LogprobsResult_Candidate) Reset()

func (*LogprobsResult_Candidate) String

func (x *LogprobsResult_Candidate) String() string

LogprobsResult_TopCandidates

type LogprobsResult_TopCandidates struct {

	// Sorted by log probability in descending order.
	Candidates []*LogprobsResult_Candidate `protobuf:"bytes,1,rep,name=candidates,proto3" json:"candidates,omitempty"`
	// contains filtered or unexported fields
}

Candidates with top log probabilities at each decoding step.

func (*LogprobsResult_TopCandidates) Descriptor

func (*LogprobsResult_TopCandidates) Descriptor() ([]byte, []int)

Deprecated: Use LogprobsResult_TopCandidates.ProtoReflect.Descriptor instead.

func (*LogprobsResult_TopCandidates) GetCandidates

func (*LogprobsResult_TopCandidates) ProtoMessage

func (*LogprobsResult_TopCandidates) ProtoMessage()

func (*LogprobsResult_TopCandidates) ProtoReflect

func (*LogprobsResult_TopCandidates) Reset

func (x *LogprobsResult_TopCandidates) Reset()

func (*LogprobsResult_TopCandidates) String

Message

type Message struct {

	// Optional. The author of this Message.
	//
	// This serves as a key for tagging
	// the content of this Message when it is fed to the model as text.
	//
	// The author can be any alphanumeric string.
	Author string `protobuf:"bytes,1,opt,name=author,proto3" json:"author,omitempty"`
	// Required. The text content of the structured `Message`.
	Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	// Output only. Citation information for model-generated `content` in this
	// `Message`.
	//
	// If this `Message` was generated as output from the model, this field may be
	// populated with attribution information for any text included in the
	// `content`. This field is used only on output.
	CitationMetadata *CitationMetadata `protobuf:"bytes,3,opt,name=citation_metadata,json=citationMetadata,proto3,oneof" json:"citation_metadata,omitempty"`
	// contains filtered or unexported fields
}

The base unit of structured text.

A Message includes an author and the content of the Message.

The author is used to tag messages when they are fed to the model as text.

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAuthor

func (x *Message) GetAuthor() string

func (*Message) GetCitationMetadata

func (x *Message) GetCitationMetadata() *CitationMetadata

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

MessagePrompt

type MessagePrompt struct {

	// Optional. Text that should be provided to the model first to ground the
	// response.
	//
	// If not empty, this `context` will be given to the model first before the
	// `examples` and `messages`. When using a `context` be sure to provide it
	// with every request to maintain continuity.
	//
	// This field can be a description of your prompt to the model to help provide
	// context and guide the responses. Examples: "Translate the phrase from
	// English to French." or "Given a statement, classify the sentiment as happy,
	// sad or neutral."
	//
	// Anything included in this field will take precedence over message history
	// if the total input size exceeds the model's `input_token_limit` and the
	// input request is truncated.
	Context string `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
	// Optional. Examples of what the model should generate.
	//
	// This includes both user input and the response that the model should
	// emulate.
	//
	// These `examples` are treated identically to conversation messages except
	// that they take precedence over the history in `messages`:
	// If the total input size exceeds the model's `input_token_limit` the input
	// will be truncated. Items will be dropped from `messages` before `examples`.
	Examples []*Example `protobuf:"bytes,2,rep,name=examples,proto3" json:"examples,omitempty"`
	// Required. A snapshot of the recent conversation history sorted
	// chronologically.
	//
	// Turns alternate between two authors.
	//
	// If the total input size exceeds the model's `input_token_limit` the input
	// will be truncated: The oldest items will be dropped from `messages`.
	Messages []*Message `protobuf:"bytes,3,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

All of the structured input text passed to the model as a prompt.

A MessagePrompt contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model.

func (*MessagePrompt) Descriptor

func (*MessagePrompt) Descriptor() ([]byte, []int)

Deprecated: Use MessagePrompt.ProtoReflect.Descriptor instead.

func (*MessagePrompt) GetContext

func (x *MessagePrompt) GetContext() string

func (*MessagePrompt) GetExamples

func (x *MessagePrompt) GetExamples() []*Example

func (*MessagePrompt) GetMessages

func (x *MessagePrompt) GetMessages() []*Message

func (*MessagePrompt) ProtoMessage

func (*MessagePrompt) ProtoMessage()

func (*MessagePrompt) ProtoReflect

func (x *MessagePrompt) ProtoReflect() protoreflect.Message

func (*MessagePrompt) Reset

func (x *MessagePrompt) Reset()

func (*MessagePrompt) String

func (x *MessagePrompt) String() string

MetadataFilter

type MetadataFilter struct {

	// Required. The key of the metadata to filter on.
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Required. The `Condition`s for the given key that will trigger this filter.
	// Multiple `Condition`s are joined by logical ORs.
	Conditions []*Condition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"`
	// contains filtered or unexported fields
}

User provided filter to limit retrieval based on Chunk or Document level metadata values. Example (genre = drama OR genre = action):

key = "document.custom_metadata.genre"
conditions = [{string_value = "drama", operation = EQUAL},
              {string_value = "action", operation = EQUAL}]

func (*MetadataFilter) Descriptor

func (*MetadataFilter) Descriptor() ([]byte, []int)

Deprecated: Use MetadataFilter.ProtoReflect.Descriptor instead.

func (*MetadataFilter) GetConditions

func (x *MetadataFilter) GetConditions() []*Condition

func (*MetadataFilter) GetKey

func (x *MetadataFilter) GetKey() string

func (*MetadataFilter) ProtoMessage

func (*MetadataFilter) ProtoMessage()

func (*MetadataFilter) ProtoReflect

func (x *MetadataFilter) ProtoReflect() protoreflect.Message

func (*MetadataFilter) Reset

func (x *MetadataFilter) Reset()

func (*MetadataFilter) String

func (x *MetadataFilter) String() string

Model

type Model struct {

	// Required. The resource name of the `Model`. Refer to [Model
	// variants](https://ai.google.dev/gemini-api/docs/models/gemini#model-variations)
	// for all allowed values.
	//
	// Format: `models/{model}` with a `{model}` naming convention of:
	//
	// * "{base_model_id}-{version}"
	//
	// Examples:
	//
	// * `models/gemini-1.5-flash-001`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The name of the base model, pass this to the generation request.
	//
	// Examples:
	//
	// * `gemini-1.5-flash`
	BaseModelId string `protobuf:"bytes,2,opt,name=base_model_id,json=baseModelId,proto3" json:"base_model_id,omitempty"`
	// Required. The version number of the model.
	//
	// This represents the major version (`1.0` or `1.5`)
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// The human-readable name of the model. E.g. "Gemini 1.5 Flash".
	//
	// The name can be up to 128 characters long and can consist of any UTF-8
	// characters.
	DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// A short description of the model.
	Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	// Maximum number of input tokens allowed for this model.
	InputTokenLimit int32 `protobuf:"varint,6,opt,name=input_token_limit,json=inputTokenLimit,proto3" json:"input_token_limit,omitempty"`
	// Maximum number of output tokens available for this model.
	OutputTokenLimit int32 `protobuf:"varint,7,opt,name=output_token_limit,json=outputTokenLimit,proto3" json:"output_token_limit,omitempty"`
	// The model's supported generation methods.
	//
	// The corresponding API method names are defined as Pascal case
	// strings, such as `generateMessage` and `generateContent`.
	SupportedGenerationMethods []string `protobuf:"bytes,8,rep,name=supported_generation_methods,json=supportedGenerationMethods,proto3" json:"supported_generation_methods,omitempty"`
	// Controls the randomness of the output.
	//
	// Values can range over `[0.0,max_temperature]`, inclusive. A higher value
	// will produce responses that are more varied, while a value closer to `0.0`
	// will typically result in less surprising responses from the model.
	// This value specifies default to be used by the backend while making the
	// call to the model.
	Temperature *float32 `protobuf:"fixed32,9,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
	// The maximum temperature this model can use.
	MaxTemperature *float32 `protobuf:"fixed32,13,opt,name=max_temperature,json=maxTemperature,proto3,oneof" json:"max_temperature,omitempty"`
	// For [Nucleus
	// sampling](https://ai.google.dev/gemini-api/docs/prompting-strategies#top-p).
	//
	// Nucleus sampling considers the smallest set of tokens whose probability
	// sum is at least `top_p`.
	// This value specifies default to be used by the backend while making the
	// call to the model.
	TopP *float32 `protobuf:"fixed32,10,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"`
	// For Top-k sampling.
	//
	// Top-k sampling considers the set of `top_k` most probable tokens.
	// This value specifies default to be used by the backend while making the
	// call to the model.
	// If empty, indicates the model doesn't use top-k sampling, and `top_k` isn't
	// allowed as a generation parameter.
	TopK *int32 `protobuf:"varint,11,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"`
	// contains filtered or unexported fields
}

Information about a Generative Language Model.

func (*Model) Descriptor

func (*Model) Descriptor() ([]byte, []int)

Deprecated: Use Model.ProtoReflect.Descriptor instead.

func (*Model) GetBaseModelId

func (x *Model) GetBaseModelId() string

func (*Model) GetDescription

func (x *Model) GetDescription() string

func (*Model) GetDisplayName

func (x *Model) GetDisplayName() string

func (*Model) GetInputTokenLimit

func (x *Model) GetInputTokenLimit() int32

func (*Model) GetMaxTemperature

func (x *Model) GetMaxTemperature() float32

func (*Model) GetName

func (x *Model) GetName() string

func (*Model) GetOutputTokenLimit

func (x *Model) GetOutputTokenLimit() int32

func (*Model) GetSupportedGenerationMethods

func (x *Model) GetSupportedGenerationMethods() []string

func (*Model) GetTemperature

func (x *Model) GetTemperature() float32

func (*Model) GetTopK

func (x *Model) GetTopK() int32

func (*Model) GetTopP

func (x *Model) GetTopP() float32

func (*Model) GetVersion

func (x *Model) GetVersion() string

func (*Model) ProtoMessage

func (*Model) ProtoMessage()

func (*Model) ProtoReflect

func (x *Model) ProtoReflect() protoreflect.Message

func (*Model) Reset

func (x *Model) Reset()

func (*Model) String

func (x *Model) String() string

ModelServiceClient

type ModelServiceClient interface {
	// Gets information about a specific `Model` such as its version number, token
	// limits,
	// [parameters](https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters)
	// and other metadata. Refer to the [Gemini models
	// guide](https://ai.google.dev/gemini-api/docs/models/gemini) for detailed
	// model information.
	GetModel(ctx context.Context, in *GetModelRequest, opts ...grpc.CallOption) (*Model, error)
	// Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini)
	// available through the Gemini API.
	ListModels(ctx context.Context, in *ListModelsRequest, opts ...grpc.CallOption) (*ListModelsResponse, error)
	// Gets information about a specific TunedModel.
	GetTunedModel(ctx context.Context, in *GetTunedModelRequest, opts ...grpc.CallOption) (*TunedModel, error)
	// Lists created tuned models.
	ListTunedModels(ctx context.Context, in *ListTunedModelsRequest, opts ...grpc.CallOption) (*ListTunedModelsResponse, error)
	// Creates a tuned model.
	// Check intermediate tuning progress (if any) through the
	// [google.longrunning.Operations] service.
	//
	// Access status and results through the Operations service.
	// Example:
	//
	//	GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222
	CreateTunedModel(ctx context.Context, in *CreateTunedModelRequest, opts ...grpc.CallOption) (*longrunningpb.Operation, error)
	// Updates a tuned model.
	UpdateTunedModel(ctx context.Context, in *UpdateTunedModelRequest, opts ...grpc.CallOption) (*TunedModel, error)
	// Deletes a tuned model.
	DeleteTunedModel(ctx context.Context, in *DeleteTunedModelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

ModelServiceClient is the client API for ModelService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewModelServiceClient

func NewModelServiceClient(cc grpc.ClientConnInterface) ModelServiceClient

ModelServiceServer

type ModelServiceServer interface {
	// Gets information about a specific `Model` such as its version number, token
	// limits,
	// [parameters](https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters)
	// and other metadata. Refer to the [Gemini models
	// guide](https://ai.google.dev/gemini-api/docs/models/gemini) for detailed
	// model information.
	GetModel(context.Context, *GetModelRequest) (*Model, error)
	// Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini)
	// available through the Gemini API.
	ListModels(context.Context, *ListModelsRequest) (*ListModelsResponse, error)
	// Gets information about a specific TunedModel.
	GetTunedModel(context.Context, *GetTunedModelRequest) (*TunedModel, error)
	// Lists created tuned models.
	ListTunedModels(context.Context, *ListTunedModelsRequest) (*ListTunedModelsResponse, error)
	// Creates a tuned model.
	// Check intermediate tuning progress (if any) through the
	// [google.longrunning.Operations] service.
	//
	// Access status and results through the Operations service.
	// Example:
	//
	//	GET /v1/tunedModels/az2mb0bpw6i/operations/000-111-222
	CreateTunedModel(context.Context, *CreateTunedModelRequest) (*longrunningpb.Operation, error)
	// Updates a tuned model.
	UpdateTunedModel(context.Context, *UpdateTunedModelRequest) (*TunedModel, error)
	// Deletes a tuned model.
	DeleteTunedModel(context.Context, *DeleteTunedModelRequest) (*emptypb.Empty, error)
}

ModelServiceServer is the server API for ModelService service. All implementations should embed UnimplementedModelServiceServer for forward compatibility

Part

type Part struct {

	// Types that are assignable to Data:
	//
	//	*Part_Text
	//	*Part_InlineData
	//	*Part_FunctionCall
	//	*Part_FunctionResponse
	//	*Part_FileData
	//	*Part_ExecutableCode
	//	*Part_CodeExecutionResult
	Data isPart_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

A datatype containing media that is part of a multi-part Content message.

A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data.

A Part must have a fixed IANA MIME type identifying the type and subtype of the media if the inline_data field is filled with raw bytes.

func (*Part) Descriptor

func (*Part) Descriptor() ([]byte, []int)

Deprecated: Use Part.ProtoReflect.Descriptor instead.

func (*Part) GetCodeExecutionResult

func (x *Part) GetCodeExecutionResult() *CodeExecutionResult

func (*Part) GetData

func (m *Part) GetData() isPart_Data

func (*Part) GetExecutableCode

func (x *Part) GetExecutableCode() *ExecutableCode

func (*Part) GetFileData

func (x *Part) GetFileData() *FileData

func (*Part) GetFunctionCall

func (x *Part) GetFunctionCall() *FunctionCall

func (*Part) GetFunctionResponse

func (x *Part) GetFunctionResponse() *FunctionResponse

func (*Part) GetInlineData

func (x *Part) GetInlineData() *Blob

func (*Part) GetText

func (x *Part) GetText() string

func (*Part) ProtoMessage

func (*Part) ProtoMessage()

func (*Part) ProtoReflect

func (x *Part) ProtoReflect() protoreflect.Message

func (*Part) Reset

func (x *Part) Reset()

func (*Part) String

func (x *Part) String() string

Part_CodeExecutionResult

type Part_CodeExecutionResult struct {
	// Result of executing the `ExecutableCode`.
	CodeExecutionResult *CodeExecutionResult `protobuf:"bytes,10,opt,name=code_execution_result,json=codeExecutionResult,proto3,oneof"`
}

Part_ExecutableCode

type Part_ExecutableCode struct {
	// Code generated by the model that is meant to be executed.
	ExecutableCode *ExecutableCode `protobuf:"bytes,9,opt,name=executable_code,json=executableCode,proto3,oneof"`
}

Part_FileData

type Part_FileData struct {
	// URI based data.
	FileData *FileData `protobuf:"bytes,6,opt,name=file_data,json=fileData,proto3,oneof"`
}

Part_FunctionCall

type Part_FunctionCall struct {
	// A predicted `FunctionCall` returned from the model that contains
	// a string representing the `FunctionDeclaration.name` with the
	// arguments and their values.
	FunctionCall *FunctionCall `protobuf:"bytes,4,opt,name=function_call,json=functionCall,proto3,oneof"`
}

Part_FunctionResponse

type Part_FunctionResponse struct {
	// The result output of a `FunctionCall` that contains a string
	// representing the `FunctionDeclaration.name` and a structured JSON
	// object containing any output from the function is used as context to
	// the model.
	FunctionResponse *FunctionResponse `protobuf:"bytes,5,opt,name=function_response,json=functionResponse,proto3,oneof"`
}

Part_InlineData

type Part_InlineData struct {
	// Inline media bytes.
	InlineData *Blob `protobuf:"bytes,3,opt,name=inline_data,json=inlineData,proto3,oneof"`
}

Part_Text

type Part_Text struct {
	// Inline text.
	Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}

Permission

type Permission struct {

	// Output only. Identifier. The permission name. A unique name will be
	// generated on create. Examples:
	//
	//	tunedModels/{tuned_model}/permissions/{permission}
	//	corpora/{corpus}/permissions/{permission}
	//
	// Output only.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. Immutable. The type of the grantee.
	GranteeType *Permission_GranteeType `protobuf:"varint,2,opt,name=grantee_type,json=granteeType,proto3,enum=google.ai.generativelanguage.v1alpha.Permission_GranteeType,oneof" json:"grantee_type,omitempty"`
	// Optional. Immutable. The email address of the user of group which this
	// permission refers. Field is not set when permission's grantee type is
	// EVERYONE.
	EmailAddress *string `protobuf:"bytes,3,opt,name=email_address,json=emailAddress,proto3,oneof" json:"email_address,omitempty"`
	// Required. The role granted by this permission.
	Role *Permission_Role `protobuf:"varint,4,opt,name=role,proto3,enum=google.ai.generativelanguage.v1alpha.Permission_Role,oneof" json:"role,omitempty"`
	// contains filtered or unexported fields
}

Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, corpus).

A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains.

There are three concentric roles. Each role is a superset of the previous role's permitted operations:

  • reader can use the resource (e.g. tuned model, corpus) for inference
  • writer has reader's permissions and additionally can edit and share
  • owner has writer's permissions and additionally can delete

func (*Permission) Descriptor

func (*Permission) Descriptor() ([]byte, []int)

Deprecated: Use Permission.ProtoReflect.Descriptor instead.

func (*Permission) GetEmailAddress

func (x *Permission) GetEmailAddress() string

func (*Permission) GetGranteeType

func (x *Permission) GetGranteeType() Permission_GranteeType

func (*Permission) GetName

func (x *Permission) GetName() string

func (*Permission) GetRole

func (x *Permission) GetRole() Permission_Role

func (*Permission) ProtoMessage

func (*Permission) ProtoMessage()

func (*Permission) ProtoReflect

func (x *Permission) ProtoReflect() protoreflect.Message

func (*Permission) Reset

func (x *Permission) Reset()

func (*Permission) String

func (x *Permission) String() string

PermissionServiceClient

type PermissionServiceClient interface {
	// Create a permission to a specific resource.
	CreatePermission(ctx context.Context, in *CreatePermissionRequest, opts ...grpc.CallOption) (*Permission, error)
	// Gets information about a specific Permission.
	GetPermission(ctx context.Context, in *GetPermissionRequest, opts ...grpc.CallOption) (*Permission, error)
	// Lists permissions for the specific resource.
	ListPermissions(ctx context.Context, in *ListPermissionsRequest, opts ...grpc.CallOption) (*ListPermissionsResponse, error)
	// Updates the permission.
	UpdatePermission(ctx context.Context, in *UpdatePermissionRequest, opts ...grpc.CallOption) (*Permission, error)
	// Deletes the permission.
	DeletePermission(ctx context.Context, in *DeletePermissionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Transfers ownership of the tuned model.
	// This is the only way to change ownership of the tuned model.
	// The current owner will be downgraded to writer role.
	TransferOwnership(ctx context.Context, in *TransferOwnershipRequest, opts ...grpc.CallOption) (*TransferOwnershipResponse, error)
}

PermissionServiceClient is the client API for PermissionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPermissionServiceClient

func NewPermissionServiceClient(cc grpc.ClientConnInterface) PermissionServiceClient

PermissionServiceServer

type PermissionServiceServer interface {
	// Create a permission to a specific resource.
	CreatePermission(context.Context, *CreatePermissionRequest) (*Permission, error)
	// Gets information about a specific Permission.
	GetPermission(context.Context, *GetPermissionRequest) (*Permission, error)
	// Lists permissions for the specific resource.
	ListPermissions(context.Context, *ListPermissionsRequest) (*ListPermissionsResponse, error)
	// Updates the permission.
	UpdatePermission(context.Context, *UpdatePermissionRequest) (*Permission, error)
	// Deletes the permission.
	DeletePermission(context.Context, *DeletePermissionRequest) (*emptypb.Empty, error)
	// Transfers ownership of the tuned model.
	// This is the only way to change ownership of the tuned model.
	// The current owner will be downgraded to writer role.
	TransferOwnership(context.Context, *TransferOwnershipRequest) (*TransferOwnershipResponse, error)
}

PermissionServiceServer is the server API for PermissionService service. All implementations should embed UnimplementedPermissionServiceServer for forward compatibility

Permission_GranteeType

type Permission_GranteeType int32

Defines types of the grantee of this permission.

Permission_GRANTEE_TYPE_UNSPECIFIED, Permission_USER, Permission_GROUP, Permission_EVERYONE

const (
	// The default value. This value is unused.
	Permission_GRANTEE_TYPE_UNSPECIFIED Permission_GranteeType = 0
	// Represents a user. When set, you must provide email_address for the user.
	Permission_USER Permission_GranteeType = 1
	// Represents a group. When set, you must provide email_address for the
	// group.
	Permission_GROUP Permission_GranteeType = 2
	// Represents access to everyone. No extra information is required.
	Permission_EVERYONE Permission_GranteeType = 3
)

func (Permission_GranteeType) Descriptor

func (Permission_GranteeType) Enum

func (Permission_GranteeType) EnumDescriptor

func (Permission_GranteeType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Permission_GranteeType.Descriptor instead.

func (Permission_GranteeType) Number

func (Permission_GranteeType) String

func (x Permission_GranteeType) String() string

func (Permission_GranteeType) Type

Permission_Role

type Permission_Role int32

Defines the role granted by this permission.

Permission_ROLE_UNSPECIFIED, Permission_OWNER, Permission_WRITER, Permission_READER

const (
	// The default value. This value is unused.
	Permission_ROLE_UNSPECIFIED Permission_Role = 0
	// Owner can use, update, share and delete the resource.
	Permission_OWNER Permission_Role = 1
	// Writer can use, update and share the resource.
	Permission_WRITER Permission_Role = 2
	// Reader can use the resource.
	Permission_READER Permission_Role = 3
)

func (Permission_Role) Descriptor

func (Permission_Role) Enum

func (x Permission_Role) Enum() *Permission_Role

func (Permission_Role) EnumDescriptor

func (Permission_Role) EnumDescriptor() ([]byte, []int)

Deprecated: Use Permission_Role.Descriptor instead.

func (Permission_Role) Number

func (Permission_Role) String

func (x Permission_Role) String() string

func (Permission_Role) Type

PrebuiltVoiceConfig

type PrebuiltVoiceConfig struct {

	// The name of the preset voice to use.
	VoiceName *string `protobuf:"bytes,1,opt,name=voice_name,json=voiceName,proto3,oneof" json:"voice_name,omitempty"`
	// contains filtered or unexported fields
}

The configuration for the prebuilt speaker to use.

func (*PrebuiltVoiceConfig) Descriptor

func (*PrebuiltVoiceConfig) Descriptor() ([]byte, []int)

Deprecated: Use PrebuiltVoiceConfig.ProtoReflect.Descriptor instead.

func (*PrebuiltVoiceConfig) GetVoiceName

func (x *PrebuiltVoiceConfig) GetVoiceName() string

func (*PrebuiltVoiceConfig) ProtoMessage

func (*PrebuiltVoiceConfig) ProtoMessage()

func (*PrebuiltVoiceConfig) ProtoReflect

func (x *PrebuiltVoiceConfig) ProtoReflect() protoreflect.Message

func (*PrebuiltVoiceConfig) Reset

func (x *PrebuiltVoiceConfig) Reset()

func (*PrebuiltVoiceConfig) String

func (x *PrebuiltVoiceConfig) String() string

PredictRequest

type PredictRequest struct {

	// Required. The name of the model for prediction.
	// Format: `name=models/{model}`.
	Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	// Required. The instances that are the input to the prediction call.
	Instances []*structpb.Value `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`
	// Optional. The parameters that govern the prediction call.
	Parameters *structpb.Value `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
	// contains filtered or unexported fields
}

Request message for [PredictionService.Predict][google.ai.generativelanguage.v1alpha.PredictionService.Predict].

func (*PredictRequest) Descriptor

func (*PredictRequest) Descriptor() ([]byte, []int)

Deprecated: Use PredictRequest.ProtoReflect.Descriptor instead.

func (*PredictRequest) GetInstances

func (x *PredictRequest) GetInstances() []*structpb.Value

func (*PredictRequest) GetModel

func (x *PredictRequest) GetModel() string

func (*PredictRequest) GetParameters

func (x *PredictRequest) GetParameters() *structpb.Value

func (*PredictRequest) ProtoMessage

func (*PredictRequest) ProtoMessage()

func (*PredictRequest) ProtoReflect

func (x *PredictRequest) ProtoReflect() protoreflect.Message

func (*PredictRequest) Reset

func (x *PredictRequest) Reset()

func (*PredictRequest) String

func (x *PredictRequest) String() string

PredictResponse

type PredictResponse struct {

	// The outputs of the prediction call.
	Predictions []*structpb.Value `protobuf:"bytes,1,rep,name=predictions,proto3" json:"predictions,omitempty"`
	// contains filtered or unexported fields
}

Response message for [PredictionService.Predict].

func (*PredictResponse) Descriptor

func (*PredictResponse) Descriptor() ([]byte, []int)

Deprecated: Use PredictResponse.ProtoReflect.Descriptor instead.

func (*PredictResponse) GetPredictions

func (x *PredictResponse) GetPredictions() []*structpb.Value

func (*PredictResponse) ProtoMessage

func (*PredictResponse) ProtoMessage()

func (*PredictResponse) ProtoReflect

func (x *PredictResponse) ProtoReflect() protoreflect.Message

func (*PredictResponse) Reset

func (x *PredictResponse) Reset()

func (*PredictResponse) String

func (x *PredictResponse) String() string

PredictionServiceClient

type PredictionServiceClient interface {
	// Performs a prediction request.
	Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error)
}

PredictionServiceClient is the client API for PredictionService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewPredictionServiceClient

func NewPredictionServiceClient(cc grpc.ClientConnInterface) PredictionServiceClient

PredictionServiceServer

type PredictionServiceServer interface {
	// Performs a prediction request.
	Predict(context.Context, *PredictRequest) (*PredictResponse, error)
}

PredictionServiceServer is the server API for PredictionService service. All implementations should embed UnimplementedPredictionServiceServer for forward compatibility

QueryCorpusRequest

type QueryCorpusRequest struct {

	// Required. The name of the `Corpus` to query.
	// Example: `corpora/my-corpus-123`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. Query string to perform semantic search.
	Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// Optional. Filter for `Chunk` and `Document` metadata. Each `MetadataFilter`
	// object should correspond to a unique key. Multiple `MetadataFilter` objects
	// are joined by logical "AND"s.
	//
	// Example query at document level:
	// (year >= 2020 OR year < 2010)="" and="" (genre="drama" or="" genre="action)" `metadatafilter`="" object="" list:="" metadata_filters="[" {key="document.custom_metadata.year" conditions="[{int_value" =="" 2020,="" operation="GREATER_EQUAL}," {int_value="2010," operation="LESS}]}," {key="document.custom_metadata.year" conditions="[{int_value" =="" 2020,="" operation="GREATER_EQUAL}," {int_value="2010," operation="LESS}]}," {key="document.custom_metadata.genre" conditions="[{string_value" =="" "drama",="" operation="EQUAL}," {string_value="action" ,="" operation="EQUAL}]}]" example="" query="" at="" chunk="" level="" for="" a="" numeric="" range="" of="" values:="" (year=""> 2015 AND year <= 2020)="" `metadatafilter`="" object="" list:="" metadata_filters="[" {key="chunk.custom_metadata.year" conditions="[{int_value" =="" 2015,="" operation="GREATER}]}," {key="chunk.custom_metadata.year" conditions="[{int_value" =="" 2020,="" operation="LESS_EQUAL}]}]" note:="" "and"s="" for="" the="" same="" key="" are="" only="" supported="" for="" numeric="" values.="" string="" values="" only="" support="" "or"s="" for="" the="" same="" key.="" metadatafilters="">MetadataFilter `protobuf:"bytes,3,rep,name=metadata_filters,json=metadataFilters,proto3" json:"metadata_filters,omitempty"`
	// Optional. The maximum number of `Chunk`s to return.
	// The service may return fewer `Chunk`s.
	//
	// If unspecified, at most 10 `Chunk`s will be returned.
	// The maximum specified result count is 100.
	ResultsCount int32 `protobuf:"varint,4,opt,name=results_count,json=resultsCount,proto3" json:"results_count,omitempty"`
	// contains filtered or unexported fields
}

Request for querying a Corpus.

func (*QueryCorpusRequest) Descriptor

func (*QueryCorpusRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryCorpusRequest.ProtoReflect.Descriptor instead.

func (*QueryCorpusRequest) GetMetadataFilters

func (x *QueryCorpusRequest) GetMetadataFilters() []*MetadataFilter

func (*QueryCorpusRequest) GetName

func (x *QueryCorpusRequest) GetName() string

func (*QueryCorpusRequest) GetQuery

func (x *QueryCorpusRequest) GetQuery() string

func (*QueryCorpusRequest) GetResultsCount

func (x *QueryCorpusRequest) GetResultsCount() int32

func (*QueryCorpusRequest) ProtoMessage

func (*QueryCorpusRequest) ProtoMessage()

func (*QueryCorpusRequest) ProtoReflect

func (x *QueryCorpusRequest) ProtoReflect() protoreflect.Message

func (*QueryCorpusRequest) Reset

func (x *QueryCorpusRequest) Reset()

func (*QueryCorpusRequest) String

func (x *QueryCorpusRequest) String() string

QueryCorpusResponse

type QueryCorpusResponse struct {

	// The relevant chunks.
	RelevantChunks []*RelevantChunk `protobuf:"bytes,1,rep,name=relevant_chunks,json=relevantChunks,proto3" json:"relevant_chunks,omitempty"`
	// contains filtered or unexported fields
}

Response from QueryCorpus containing a list of relevant chunks.

func (*QueryCorpusResponse) Descriptor

func (*QueryCorpusResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryCorpusResponse.ProtoReflect.Descriptor instead.

func (*QueryCorpusResponse) GetRelevantChunks

func (x *QueryCorpusResponse) GetRelevantChunks() []*RelevantChunk

func (*QueryCorpusResponse) ProtoMessage

func (*QueryCorpusResponse) ProtoMessage()

func (*QueryCorpusResponse) ProtoReflect

func (x *QueryCorpusResponse) ProtoReflect() protoreflect.Message

func (*QueryCorpusResponse) Reset

func (x *QueryCorpusResponse) Reset()

func (*QueryCorpusResponse) String

func (x *QueryCorpusResponse) String() string

QueryDocumentRequest

type QueryDocumentRequest struct {

	// Required. The name of the `Document` to query.
	// Example: `corpora/my-corpus-123/documents/the-doc-abc`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. Query string to perform semantic search.
	Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// Optional. The maximum number of `Chunk`s to return.
	// The service may return fewer `Chunk`s.
	//
	// If unspecified, at most 10 `Chunk`s will be returned.
	// The maximum specified result count is 100.
	ResultsCount int32 `protobuf:"varint,3,opt,name=results_count,json=resultsCount,proto3" json:"results_count,omitempty"`
	// Optional. Filter for `Chunk` metadata. Each `MetadataFilter` object should
	// correspond to a unique key. Multiple `MetadataFilter` objects are joined by
	// logical "AND"s.
	//
	// Note: `Document`-level filtering is not supported for this request because
	// a `Document` name is already specified.
	//
	// Example query:
	// (year >= 2020 OR year < 2010)="" and="" (genre="drama" or="" genre="action)" `metadatafilter`="" object="" list:="" metadata_filters="[" {key="chunk.custom_metadata.year" conditions="[{int_value" =="" 2020,="" operation="GREATER_EQUAL}," {int_value="2010," operation="LESS}}," {key="chunk.custom_metadata.genre" conditions="[{string_value" =="" "drama",="" operation="EQUAL}," {string_value="action" ,="" operation="EQUAL}}]" example="" query="" for="" a="" numeric="" range="" of="" values:="" (year=""> 2015 AND year <= 2020)="" `metadatafilter`="" object="" list:="" metadata_filters="[" {key="chunk.custom_metadata.year" conditions="[{int_value" =="" 2015,="" operation="GREATER}]}," {key="chunk.custom_metadata.year" conditions="[{int_value" =="" 2020,="" operation="LESS_EQUAL}]}]" note:="" "and"s="" for="" the="" same="" key="" are="" only="" supported="" for="" numeric="" values.="" string="" values="" only="" support="" "or"s="" for="" the="" same="" key.="" metadatafilters="">MetadataFilter `protobuf:"bytes,4,rep,name=metadata_filters,json=metadataFilters,proto3" json:"metadata_filters,omitempty"`
	// contains filtered or unexported fields
}

Request for querying a Document.

func (*QueryDocumentRequest) Descriptor

func (*QueryDocumentRequest) Descriptor() ([]byte, []int)

Deprecated: Use QueryDocumentRequest.ProtoReflect.Descriptor instead.

func (*QueryDocumentRequest) GetMetadataFilters

func (x *QueryDocumentRequest) GetMetadataFilters() []*MetadataFilter

func (*QueryDocumentRequest) GetName

func (x *QueryDocumentRequest) GetName() string

func (*QueryDocumentRequest) GetQuery

func (x *QueryDocumentRequest) GetQuery() string

func (*QueryDocumentRequest) GetResultsCount

func (x *QueryDocumentRequest) GetResultsCount() int32

func (*QueryDocumentRequest) ProtoMessage

func (*QueryDocumentRequest) ProtoMessage()

func (*QueryDocumentRequest) ProtoReflect

func (x *QueryDocumentRequest) ProtoReflect() protoreflect.Message

func (*QueryDocumentRequest) Reset

func (x *QueryDocumentRequest) Reset()

func (*QueryDocumentRequest) String

func (x *QueryDocumentRequest) String() string

QueryDocumentResponse

type QueryDocumentResponse struct {

	// The returned relevant chunks.
	RelevantChunks []*RelevantChunk `protobuf:"bytes,1,rep,name=relevant_chunks,json=relevantChunks,proto3" json:"relevant_chunks,omitempty"`
	// contains filtered or unexported fields
}

Response from QueryDocument containing a list of relevant chunks.

func (*QueryDocumentResponse) Descriptor

func (*QueryDocumentResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryDocumentResponse.ProtoReflect.Descriptor instead.

func (*QueryDocumentResponse) GetRelevantChunks

func (x *QueryDocumentResponse) GetRelevantChunks() []*RelevantChunk

func (*QueryDocumentResponse) ProtoMessage

func (*QueryDocumentResponse) ProtoMessage()

func (*QueryDocumentResponse) ProtoReflect

func (x *QueryDocumentResponse) ProtoReflect() protoreflect.Message

func (*QueryDocumentResponse) Reset

func (x *QueryDocumentResponse) Reset()

func (*QueryDocumentResponse) String

func (x *QueryDocumentResponse) String() string

RelevantChunk

type RelevantChunk struct {

	// `Chunk` relevance to the query.
	ChunkRelevanceScore float32 `protobuf:"fixed32,1,opt,name=chunk_relevance_score,json=chunkRelevanceScore,proto3" json:"chunk_relevance_score,omitempty"`
	// `Chunk` associated with the query.
	Chunk *Chunk `protobuf:"bytes,2,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// contains filtered or unexported fields
}

The information for a chunk relevant to a query.

func (*RelevantChunk) Descriptor

func (*RelevantChunk) Descriptor() ([]byte, []int)

Deprecated: Use RelevantChunk.ProtoReflect.Descriptor instead.

func (*RelevantChunk) GetChunk

func (x *RelevantChunk) GetChunk() *Chunk

func (*RelevantChunk) GetChunkRelevanceScore

func (x *RelevantChunk) GetChunkRelevanceScore() float32

func (*RelevantChunk) ProtoMessage

func (*RelevantChunk) ProtoMessage()

func (*RelevantChunk) ProtoReflect

func (x *RelevantChunk) ProtoReflect() protoreflect.Message

func (*RelevantChunk) Reset

func (x *RelevantChunk) Reset()

func (*RelevantChunk) String

func (x *RelevantChunk) String() string

RetrievalMetadata

type RetrievalMetadata struct {

	// Optional. Score indicating how likely information from google search could
	// help answer the prompt. The score is in the range [0, 1], where 0 is the
	// least likely and 1 is the most likely. This score is only populated when
	// google search grounding and dynamic retrieval is enabled. It will be
	// compared to the threshold to determine whether to trigger google search.
	GoogleSearchDynamicRetrievalScore float32 `protobuf:"fixed32,2,opt,name=google_search_dynamic_retrieval_score,json=googleSearchDynamicRetrievalScore,proto3" json:"google_search_dynamic_retrieval_score,omitempty"`
	// contains filtered or unexported fields
}

Metadata related to retrieval in the grounding flow.

func (*RetrievalMetadata) Descriptor

func (*RetrievalMetadata) Descriptor() ([]byte, []int)

Deprecated: Use RetrievalMetadata.ProtoReflect.Descriptor instead.

func (*RetrievalMetadata) GetGoogleSearchDynamicRetrievalScore

func (x *RetrievalMetadata) GetGoogleSearchDynamicRetrievalScore() float32

func (*RetrievalMetadata) ProtoMessage

func (*RetrievalMetadata) ProtoMessage()

func (*RetrievalMetadata) ProtoReflect

func (x *RetrievalMetadata) ProtoReflect() protoreflect.Message

func (*RetrievalMetadata) Reset

func (x *RetrievalMetadata) Reset()

func (*RetrievalMetadata) String

func (x *RetrievalMetadata) String() string

RetrieverServiceClient

type RetrieverServiceClient interface {
	// Creates an empty `Corpus`.
	CreateCorpus(ctx context.Context, in *CreateCorpusRequest, opts ...grpc.CallOption) (*Corpus, error)
	// Gets information about a specific `Corpus`.
	GetCorpus(ctx context.Context, in *GetCorpusRequest, opts ...grpc.CallOption) (*Corpus, error)
	// Updates a `Corpus`.
	UpdateCorpus(ctx context.Context, in *UpdateCorpusRequest, opts ...grpc.CallOption) (*Corpus, error)
	// Deletes a `Corpus`.
	DeleteCorpus(ctx context.Context, in *DeleteCorpusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Lists all `Corpora` owned by the user.
	ListCorpora(ctx context.Context, in *ListCorporaRequest, opts ...grpc.CallOption) (*ListCorporaResponse, error)
	// Performs semantic search over a `Corpus`.
	QueryCorpus(ctx context.Context, in *QueryCorpusRequest, opts ...grpc.CallOption) (*QueryCorpusResponse, error)
	// Creates an empty `Document`.
	CreateDocument(ctx context.Context, in *CreateDocumentRequest, opts ...grpc.CallOption) (*Document, error)
	// Gets information about a specific `Document`.
	GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*Document, error)
	// Updates a `Document`.
	UpdateDocument(ctx context.Context, in *UpdateDocumentRequest, opts ...grpc.CallOption) (*Document, error)
	// Deletes a `Document`.
	DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Lists all `Document`s in a `Corpus`.
	ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error)
	// Performs semantic search over a `Document`.
	QueryDocument(ctx context.Context, in *QueryDocumentRequest, opts ...grpc.CallOption) (*QueryDocumentResponse, error)
	// Creates a `Chunk`.
	CreateChunk(ctx context.Context, in *CreateChunkRequest, opts ...grpc.CallOption) (*Chunk, error)
	// Batch create `Chunk`s.
	BatchCreateChunks(ctx context.Context, in *BatchCreateChunksRequest, opts ...grpc.CallOption) (*BatchCreateChunksResponse, error)
	// Gets information about a specific `Chunk`.
	GetChunk(ctx context.Context, in *GetChunkRequest, opts ...grpc.CallOption) (*Chunk, error)
	// Updates a `Chunk`.
	UpdateChunk(ctx context.Context, in *UpdateChunkRequest, opts ...grpc.CallOption) (*Chunk, error)
	// Batch update `Chunk`s.
	BatchUpdateChunks(ctx context.Context, in *BatchUpdateChunksRequest, opts ...grpc.CallOption) (*BatchUpdateChunksResponse, error)
	// Deletes a `Chunk`.
	DeleteChunk(ctx context.Context, in *DeleteChunkRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Batch delete `Chunk`s.
	BatchDeleteChunks(ctx context.Context, in *BatchDeleteChunksRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Lists all `Chunk`s in a `Document`.
	ListChunks(ctx context.Context, in *ListChunksRequest, opts ...grpc.CallOption) (*ListChunksResponse, error)
}

RetrieverServiceClient is the client API for RetrieverService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewRetrieverServiceClient

func NewRetrieverServiceClient(cc grpc.ClientConnInterface) RetrieverServiceClient

RetrieverServiceServer

type RetrieverServiceServer interface {
	// Creates an empty `Corpus`.
	CreateCorpus(context.Context, *CreateCorpusRequest) (*Corpus, error)
	// Gets information about a specific `Corpus`.
	GetCorpus(context.Context, *GetCorpusRequest) (*Corpus, error)
	// Updates a `Corpus`.
	UpdateCorpus(context.Context, *UpdateCorpusRequest) (*Corpus, error)
	// Deletes a `Corpus`.
	DeleteCorpus(context.Context, *DeleteCorpusRequest) (*emptypb.Empty, error)
	// Lists all `Corpora` owned by the user.
	ListCorpora(context.Context, *ListCorporaRequest) (*ListCorporaResponse, error)
	// Performs semantic search over a `Corpus`.
	QueryCorpus(context.Context, *QueryCorpusRequest) (*QueryCorpusResponse, error)
	// Creates an empty `Document`.
	CreateDocument(context.Context, *CreateDocumentRequest) (*Document, error)
	// Gets information about a specific `Document`.
	GetDocument(context.Context, *GetDocumentRequest) (*Document, error)
	// Updates a `Document`.
	UpdateDocument(context.Context, *UpdateDocumentRequest) (*Document, error)
	// Deletes a `Document`.
	DeleteDocument(context.Context, *DeleteDocumentRequest) (*emptypb.Empty, error)
	// Lists all `Document`s in a `Corpus`.
	ListDocuments(context.Context, *ListDocumentsRequest) (*ListDocumentsResponse, error)
	// Performs semantic search over a `Document`.
	QueryDocument(context.Context, *QueryDocumentRequest) (*QueryDocumentResponse, error)
	// Creates a `Chunk`.
	CreateChunk(context.Context, *CreateChunkRequest) (*Chunk, error)
	// Batch create `Chunk`s.
	BatchCreateChunks(context.Context, *BatchCreateChunksRequest) (*BatchCreateChunksResponse, error)
	// Gets information about a specific `Chunk`.
	GetChunk(context.Context, *GetChunkRequest) (*Chunk, error)
	// Updates a `Chunk`.
	UpdateChunk(context.Context, *UpdateChunkRequest) (*Chunk, error)
	// Batch update `Chunk`s.
	BatchUpdateChunks(context.Context, *BatchUpdateChunksRequest) (*BatchUpdateChunksResponse, error)
	// Deletes a `Chunk`.
	DeleteChunk(context.Context, *DeleteChunkRequest) (*emptypb.Empty, error)
	// Batch delete `Chunk`s.
	BatchDeleteChunks(context.Context, *BatchDeleteChunksRequest) (*emptypb.Empty, error)
	// Lists all `Chunk`s in a `Document`.
	ListChunks(context.Context, *ListChunksRequest) (*ListChunksResponse, error)
}

RetrieverServiceServer is the server API for RetrieverService service. All implementations should embed UnimplementedRetrieverServiceServer for forward compatibility

SafetyFeedback

type SafetyFeedback struct {

	// Safety rating evaluated from content.
	Rating *SafetyRating `protobuf:"bytes,1,opt,name=rating,proto3" json:"rating,omitempty"`
	// Safety settings applied to the request.
	Setting *SafetySetting `protobuf:"bytes,2,opt,name=setting,proto3" json:"setting,omitempty"`
	// contains filtered or unexported fields
}

Safety feedback for an entire request.

This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.

func (*SafetyFeedback) Descriptor

func (*SafetyFeedback) Descriptor() ([]byte, []int)

Deprecated: Use SafetyFeedback.ProtoReflect.Descriptor instead.

func (*SafetyFeedback) GetRating

func (x *SafetyFeedback) GetRating() *SafetyRating

func (*SafetyFeedback) GetSetting

func (x *SafetyFeedback) GetSetting() *SafetySetting

func (*SafetyFeedback) ProtoMessage

func (*SafetyFeedback) ProtoMessage()

func (*SafetyFeedback) ProtoReflect

func (x *SafetyFeedback) ProtoReflect() protoreflect.Message

func (*SafetyFeedback) Reset

func (x *SafetyFeedback) Reset()

func (*SafetyFeedback) String

func (x *SafetyFeedback) String() string

SafetyRating

type SafetyRating struct {

	// Required. The category for this rating.
	Category HarmCategory `protobuf:"varint,3,opt,name=category,proto3,enum=google.ai.generativelanguage.v1alpha.HarmCategory" json:"category,omitempty"`
	// Required. The probability of harm for this content.
	Probability SafetyRating_HarmProbability `protobuf:"varint,4,opt,name=probability,proto3,enum=google.ai.generativelanguage.v1alpha.SafetyRating_HarmProbability" json:"probability,omitempty"`
	// Was this content blocked because of this rating?
	Blocked bool `protobuf:"varint,5,opt,name=blocked,proto3" json:"blocked,omitempty"`
	// contains filtered or unexported fields
}

Safety rating for a piece of content.

The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

func (*SafetyRating) Descriptor

func (*SafetyRating) Descriptor() ([]byte, []int)

Deprecated: Use SafetyRating.ProtoReflect.Descriptor instead.

func (*SafetyRating) GetBlocked

func (x *SafetyRating) GetBlocked() bool

func (*SafetyRating) GetCategory

func (x *SafetyRating) GetCategory() HarmCategory

func (*SafetyRating) GetProbability

func (x *SafetyRating) GetProbability() SafetyRating_HarmProbability

func (*SafetyRating) ProtoMessage

func (*SafetyRating) ProtoMessage()

func (*SafetyRating) ProtoReflect

func (x *SafetyRating) ProtoReflect() protoreflect.Message

func (*SafetyRating) Reset

func (x *SafetyRating) Reset()

func (*SafetyRating) String

func (x *SafetyRating) String() string

SafetyRating_HarmProbability

type SafetyRating_HarmProbability int32

The probability that a piece of content is harmful.

The classification system gives the probability of the content being unsafe. This does not indicate the severity of harm for a piece of content.

SafetyRating_HARM_PROBABILITY_UNSPECIFIED, SafetyRating_NEGLIGIBLE, SafetyRating_LOW, SafetyRating_MEDIUM, SafetyRating_HIGH

const (
	// Probability is unspecified.
	SafetyRating_HARM_PROBABILITY_UNSPECIFIED SafetyRating_HarmProbability = 0
	// Content has a negligible chance of being unsafe.
	SafetyRating_NEGLIGIBLE SafetyRating_HarmProbability = 1
	// Content has a low chance of being unsafe.
	SafetyRating_LOW SafetyRating_HarmProbability = 2
	// Content has a medium chance of being unsafe.
	SafetyRating_MEDIUM SafetyRating_HarmProbability = 3
	// Content has a high chance of being unsafe.
	SafetyRating_HIGH SafetyRating_HarmProbability = 4
)

func (SafetyRating_HarmProbability) Descriptor

func (SafetyRating_HarmProbability) Enum

func (SafetyRating_HarmProbability) EnumDescriptor

func (SafetyRating_HarmProbability) EnumDescriptor() ([]byte, []int)

Deprecated: Use SafetyRating_HarmProbability.Descriptor instead.

func (SafetyRating_HarmProbability) Number

func (SafetyRating_HarmProbability) String

func (SafetyRating_HarmProbability) Type

SafetySetting

type SafetySetting struct {

	// Required. The category for this setting.
	Category HarmCategory `protobuf:"varint,3,opt,name=category,proto3,enum=google.ai.generativelanguage.v1alpha.HarmCategory" json:"category,omitempty"`
	// Required. Controls the probability threshold at which harm is blocked.
	Threshold SafetySetting_HarmBlockThreshold `protobuf:"varint,4,opt,name=threshold,proto3,enum=google.ai.generativelanguage.v1alpha.SafetySetting_HarmBlockThreshold" json:"threshold,omitempty"`
	// contains filtered or unexported fields
}

Safety setting, affecting the safety-blocking behavior.

Passing a safety setting for a category changes the allowed probability that content is blocked.

func (*SafetySetting) Descriptor

func (*SafetySetting) Descriptor() ([]byte, []int)

Deprecated: Use SafetySetting.ProtoReflect.Descriptor instead.

func (*SafetySetting) GetCategory

func (x *SafetySetting) GetCategory() HarmCategory

func (*SafetySetting) GetThreshold

func (*SafetySetting) ProtoMessage

func (*SafetySetting) ProtoMessage()

func (*SafetySetting) ProtoReflect

func (x *SafetySetting) ProtoReflect() protoreflect.Message

func (*SafetySetting) Reset

func (x *SafetySetting) Reset()

func (*SafetySetting) String

func (x *SafetySetting) String() string

SafetySetting_HarmBlockThreshold

type SafetySetting_HarmBlockThreshold int32

Block at and beyond a specified harm probability.

SafetySetting_HARM_BLOCK_THRESHOLD_UNSPECIFIED, SafetySetting_BLOCK_LOW_AND_ABOVE, SafetySetting_BLOCK_MEDIUM_AND_ABOVE, SafetySetting_BLOCK_ONLY_HIGH, SafetySetting_BLOCK_NONE, SafetySetting_OFF

const (
	// Threshold is unspecified.
	SafetySetting_HARM_BLOCK_THRESHOLD_UNSPECIFIED SafetySetting_HarmBlockThreshold = 0
	// Content with NEGLIGIBLE will be allowed.
	SafetySetting_BLOCK_LOW_AND_ABOVE SafetySetting_HarmBlockThreshold = 1
	// Content with NEGLIGIBLE and LOW will be allowed.
	SafetySetting_BLOCK_MEDIUM_AND_ABOVE SafetySetting_HarmBlockThreshold = 2
	// Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed.
	SafetySetting_BLOCK_ONLY_HIGH SafetySetting_HarmBlockThreshold = 3
	// All content will be allowed.
	SafetySetting_BLOCK_NONE SafetySetting_HarmBlockThreshold = 4
	// Turn off the safety filter.
	SafetySetting_OFF SafetySetting_HarmBlockThreshold = 5
)

func (SafetySetting_HarmBlockThreshold) Descriptor

func (SafetySetting_HarmBlockThreshold) Enum

func (SafetySetting_HarmBlockThreshold) EnumDescriptor

func (SafetySetting_HarmBlockThreshold) EnumDescriptor() ([]byte, []int)

Deprecated: Use SafetySetting_HarmBlockThreshold.Descriptor instead.

func (SafetySetting_HarmBlockThreshold) Number

func (SafetySetting_HarmBlockThreshold) String

func (SafetySetting_HarmBlockThreshold) Type

Schema

type Schema struct {

	// Required. Data type.
	Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=google.ai.generativelanguage.v1alpha.Type" json:"type,omitempty"`
	// Optional. The format of the data. This is used only for primitive
	// datatypes. Supported formats:
	//
	//	for NUMBER type: float, double
	//	for INTEGER type: int32, int64
	//	for STRING type: enum
	Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format,omitempty"`
	// Optional. A brief description of the parameter. This could contain examples
	// of use. Parameter description may be formatted as Markdown.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// Optional. Indicates if the value may be null.
	Nullable bool `protobuf:"varint,4,opt,name=nullable,proto3" json:"nullable,omitempty"`
	// Optional. Possible values of the element of Type.STRING with enum format.
	// For example we can define an Enum Direction as :
	// {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]}
	Enum []string `protobuf:"bytes,5,rep,name=enum,proto3" json:"enum,omitempty"`
	// Optional. Schema of the elements of Type.ARRAY.
	Items *Schema `protobuf:"bytes,6,opt,name=items,proto3,oneof" json:"items,omitempty"`
	// Optional. Maximum number of the elements for Type.ARRAY.
	MaxItems int64 `protobuf:"varint,21,opt,name=max_items,json=maxItems,proto3" json:"max_items,omitempty"`
	// Optional. Minimum number of the elements for Type.ARRAY.
	MinItems int64 `protobuf:"varint,22,opt,name=min_items,json=minItems,proto3" json:"min_items,omitempty"`
	// Optional. Properties of Type.OBJECT.
	Properties map[string]*Schema `protobuf:"bytes,7,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
	// Optional. Required properties of Type.OBJECT.
	Required []string `protobuf:"bytes,8,rep,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an OpenAPI 3.0 schema object.

func (*Schema) Descriptor

func (*Schema) Descriptor() ([]byte, []int)

Deprecated: Use Schema.ProtoReflect.Descriptor instead.

func (*Schema) GetDescription

func (x *Schema) GetDescription() string

func (*Schema) GetEnum

func (x *Schema) GetEnum() []string

func (*Schema) GetFormat

func (x *Schema) GetFormat() string

func (*Schema) GetItems

func (x *Schema) GetItems() *Schema

func (*Schema) GetMaxItems

func (x *Schema) GetMaxItems() int64

func (*Schema) GetMinItems

func (x *Schema) GetMinItems() int64

func (*Schema) GetNullable

func (x *Schema) GetNullable() bool

func (*Schema) GetProperties

func (x *Schema) GetProperties() map[string]*Schema

func (*Schema) GetRequired

func (x *Schema) GetRequired() []string

func (*Schema) GetType

func (x *Schema) GetType() Type

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) ProtoReflect

func (x *Schema) ProtoReflect() protoreflect.Message

func (*Schema) Reset

func (x *Schema) Reset()

func (*Schema) String

func (x *Schema) String() string

SearchEntryPoint

type SearchEntryPoint struct {

	// Optional. Web content snippet that can be embedded in a web page or an app
	// webview.
	RenderedContent string `protobuf:"bytes,1,opt,name=rendered_content,json=renderedContent,proto3" json:"rendered_content,omitempty"`
	// Optional. Base64 encoded JSON representing array of 

Google search entry point.

func (*SearchEntryPoint) Descriptor

func (*SearchEntryPoint) Descriptor() ([]byte, []int)

Deprecated: Use SearchEntryPoint.ProtoReflect.Descriptor instead.

func (*SearchEntryPoint) GetRenderedContent

func (x *SearchEntryPoint) GetRenderedContent() string

func (*SearchEntryPoint) GetSdkBlob

func (x *SearchEntryPoint) GetSdkBlob() []byte

func (*SearchEntryPoint) ProtoMessage

func (*SearchEntryPoint) ProtoMessage()

func (*SearchEntryPoint) ProtoReflect

func (x *SearchEntryPoint) ProtoReflect() protoreflect.Message

func (*SearchEntryPoint) Reset

func (x *SearchEntryPoint) Reset()

func (*SearchEntryPoint) String

func (x *SearchEntryPoint) String() string

Segment

type Segment struct {

	// Output only. The index of a Part object within its parent Content object.
	PartIndex int32 `protobuf:"varint,1,opt,name=part_index,json=partIndex,proto3" json:"part_index,omitempty"`
	// Output only. Start index in the given Part, measured in bytes. Offset from
	// the start of the Part, inclusive, starting at zero.
	StartIndex int32 `protobuf:"varint,2,opt,name=start_index,json=startIndex,proto3" json:"start_index,omitempty"`
	// Output only. End index in the given Part, measured in bytes. Offset from
	// the start of the Part, exclusive, starting at zero.
	EndIndex int32 `protobuf:"varint,3,opt,name=end_index,json=endIndex,proto3" json:"end_index,omitempty"`
	// Output only. The text corresponding to the segment from the response.
	Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Segment of the content.

func (*Segment) Descriptor

func (*Segment) Descriptor() ([]byte, []int)

Deprecated: Use Segment.ProtoReflect.Descriptor instead.

func (*Segment) GetEndIndex

func (x *Segment) GetEndIndex() int32

func (*Segment) GetPartIndex

func (x *Segment) GetPartIndex() int32

func (*Segment) GetStartIndex

func (x *Segment) GetStartIndex() int32

func (*Segment) GetText

func (x *Segment) GetText() string

func (*Segment) ProtoMessage

func (*Segment) ProtoMessage()

func (*Segment) ProtoReflect

func (x *Segment) ProtoReflect() protoreflect.Message

func (*Segment) Reset

func (x *Segment) Reset()

func (*Segment) String

func (x *Segment) String() string

SemanticRetrieverConfig

type SemanticRetrieverConfig struct {

	// Required. Name of the resource for retrieval. Example: `corpora/123` or
	// `corpora/123/documents/abc`.
	Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
	// Required. Query to use for matching `Chunk`s in the given resource by
	// similarity.
	Query *Content `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"`
	// Optional. Filters for selecting `Document`s and/or `Chunk`s from the
	// resource.
	MetadataFilters []*MetadataFilter `protobuf:"bytes,3,rep,name=metadata_filters,json=metadataFilters,proto3" json:"metadata_filters,omitempty"`
	// Optional. Maximum number of relevant `Chunk`s to retrieve.
	MaxChunksCount *int32 `protobuf:"varint,4,opt,name=max_chunks_count,json=maxChunksCount,proto3,oneof" json:"max_chunks_count,omitempty"`
	// Optional. Minimum relevance score for retrieved relevant `Chunk`s.
	MinimumRelevanceScore *float32 `protobuf:"fixed32,5,opt,name=minimum_relevance_score,json=minimumRelevanceScore,proto3,oneof" json:"minimum_relevance_score,omitempty"`
	// contains filtered or unexported fields
}

Configuration for retrieving grounding content from a Corpus or Document created using the Semantic Retriever API.

func (*SemanticRetrieverConfig) Descriptor

func (*SemanticRetrieverConfig) Descriptor() ([]byte, []int)

Deprecated: Use SemanticRetrieverConfig.ProtoReflect.Descriptor instead.

func (*SemanticRetrieverConfig) GetMaxChunksCount

func (x *SemanticRetrieverConfig) GetMaxChunksCount() int32

func (*SemanticRetrieverConfig) GetMetadataFilters

func (x *SemanticRetrieverConfig) GetMetadataFilters() []*MetadataFilter

func (*SemanticRetrieverConfig) GetMinimumRelevanceScore

func (x *SemanticRetrieverConfig) GetMinimumRelevanceScore() float32

func (*SemanticRetrieverConfig) GetQuery

func (x *SemanticRetrieverConfig) GetQuery() *Content

func (*SemanticRetrieverConfig) GetSource

func (x *SemanticRetrieverConfig) GetSource() string

func (*SemanticRetrieverConfig) ProtoMessage

func (*SemanticRetrieverConfig) ProtoMessage()

func (*SemanticRetrieverConfig) ProtoReflect

func (x *SemanticRetrieverConfig) ProtoReflect() protoreflect.Message

func (*SemanticRetrieverConfig) Reset

func (x *SemanticRetrieverConfig) Reset()

func (*SemanticRetrieverConfig) String

func (x *SemanticRetrieverConfig) String() string

SpeechConfig

type SpeechConfig struct {

	// The configuration for the speaker to use.
	VoiceConfig *VoiceConfig `protobuf:"bytes,1,opt,name=voice_config,json=voiceConfig,proto3" json:"voice_config,omitempty"`
	// contains filtered or unexported fields
}

The speech generation config.

func (*SpeechConfig) Descriptor

func (*SpeechConfig) Descriptor() ([]byte, []int)

Deprecated: Use SpeechConfig.ProtoReflect.Descriptor instead.

func (*SpeechConfig) GetVoiceConfig

func (x *SpeechConfig) GetVoiceConfig() *VoiceConfig

func (*SpeechConfig) ProtoMessage

func (*SpeechConfig) ProtoMessage()

func (*SpeechConfig) ProtoReflect

func (x *SpeechConfig) ProtoReflect() protoreflect.Message

func (*SpeechConfig) Reset

func (x *SpeechConfig) Reset()

func (*SpeechConfig) String

func (x *SpeechConfig) String() string

StringList

type StringList struct {

	// The string values of the metadata to store.
	Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

User provided string values assigned to a single metadata key.

func (*StringList) Descriptor

func (*StringList) Descriptor() ([]byte, []int)

Deprecated: Use StringList.ProtoReflect.Descriptor instead.

func (*StringList) GetValues

func (x *StringList) GetValues() []string

func (*StringList) ProtoMessage

func (*StringList) ProtoMessage()

func (*StringList) ProtoReflect

func (x *StringList) ProtoReflect() protoreflect.Message

func (*StringList) Reset

func (x *StringList) Reset()

func (*StringList) String

func (x *StringList) String() string

TaskType

type TaskType int32

Type of task for which the embedding will be used.

TaskType_TASK_TYPE_UNSPECIFIED, TaskType_RETRIEVAL_QUERY, TaskType_RETRIEVAL_DOCUMENT, TaskType_SEMANTIC_SIMILARITY, TaskType_CLASSIFICATION, TaskType_CLUSTERING, TaskType_QUESTION_ANSWERING, TaskType_FACT_VERIFICATION

const (
	// Unset value, which will default to one of the other enum values.
	TaskType_TASK_TYPE_UNSPECIFIED TaskType = 0
	// Specifies the given text is a query in a search/retrieval setting.
	TaskType_RETRIEVAL_QUERY TaskType = 1
	// Specifies the given text is a document from the corpus being searched.
	TaskType_RETRIEVAL_DOCUMENT TaskType = 2
	// Specifies the given text will be used for STS.
	TaskType_SEMANTIC_SIMILARITY TaskType = 3
	// Specifies that the given text will be classified.
	TaskType_CLASSIFICATION TaskType = 4
	// Specifies that the embeddings will be used for clustering.
	TaskType_CLUSTERING TaskType = 5
	// Specifies that the given text will be used for question answering.
	TaskType_QUESTION_ANSWERING TaskType = 6
	// Specifies that the given text will be used for fact verification.
	TaskType_FACT_VERIFICATION TaskType = 7
)

func (TaskType) Descriptor

func (TaskType) Descriptor() protoreflect.EnumDescriptor

func (TaskType) Enum

func (x TaskType) Enum() *TaskType

func (TaskType) EnumDescriptor

func (TaskType) EnumDescriptor() ([]byte, []int)

Deprecated: Use TaskType.Descriptor instead.

func (TaskType) Number

func (x TaskType) Number() protoreflect.EnumNumber

func (TaskType) String

func (x TaskType) String() string

func (TaskType) Type

TextCompletion

type TextCompletion struct {

	// Output only. The generated text returned from the model.
	Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
	// Ratings for the safety of a response.
	//
	// There is at most one rating per category.
	SafetyRatings []*SafetyRating `protobuf:"bytes,2,rep,name=safety_ratings,json=safetyRatings,proto3" json:"safety_ratings,omitempty"`
	// Output only. Citation information for model-generated `output` in this
	// `TextCompletion`.
	//
	// This field may be populated with attribution information for any text
	// included in the `output`.
	CitationMetadata *CitationMetadata `protobuf:"bytes,3,opt,name=citation_metadata,json=citationMetadata,proto3,oneof" json:"citation_metadata,omitempty"`
	// contains filtered or unexported fields
}

Output text returned from a model.

func (*TextCompletion) Descriptor

func (*TextCompletion) Descriptor() ([]byte, []int)

Deprecated: Use TextCompletion.ProtoReflect.Descriptor instead.

func (*TextCompletion) GetCitationMetadata

func (x *TextCompletion) GetCitationMetadata() *CitationMetadata

func (*TextCompletion) GetOutput

func (x *TextCompletion) GetOutput() string

func (*TextCompletion) GetSafetyRatings

func (x *TextCompletion) GetSafetyRatings() []*SafetyRating

func (*TextCompletion) ProtoMessage

func (*TextCompletion) ProtoMessage()

func (*TextCompletion) ProtoReflect

func (x *TextCompletion) ProtoReflect() protoreflect.Message

func (*TextCompletion) Reset

func (x *TextCompletion) Reset()

func (*TextCompletion) String

func (x *TextCompletion) String() string

TextPrompt

type TextPrompt struct {

	// Required. The prompt text.
	Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Text given to the model as a prompt.

The Model will use this TextPrompt to Generate a text completion.

func (*TextPrompt) Descriptor

func (*TextPrompt) Descriptor() ([]byte, []int)

Deprecated: Use TextPrompt.ProtoReflect.Descriptor instead.

func (*TextPrompt) GetText

func (x *TextPrompt) GetText() string

func (*TextPrompt) ProtoMessage

func (*TextPrompt) ProtoMessage()

func (*TextPrompt) ProtoReflect

func (x *TextPrompt) ProtoReflect() protoreflect.Message

func (*TextPrompt) Reset

func (x *TextPrompt) Reset()

func (*TextPrompt) String

func (x *TextPrompt) String() string

TextServiceClient

type TextServiceClient interface {
	// Generates a response from the model given an input message.
	GenerateText(ctx context.Context, in *GenerateTextRequest, opts ...grpc.CallOption) (*GenerateTextResponse, error)
	// Generates an embedding from the model given an input message.
	EmbedText(ctx context.Context, in *EmbedTextRequest, opts ...grpc.CallOption) (*EmbedTextResponse, error)
	// Generates multiple embeddings from the model given input text in a
	// synchronous call.
	BatchEmbedText(ctx context.Context, in *BatchEmbedTextRequest, opts ...grpc.CallOption) (*BatchEmbedTextResponse, error)
	// Runs a model's tokenizer on a text and returns the token count.
	CountTextTokens(ctx context.Context, in *CountTextTokensRequest, opts ...grpc.CallOption) (*CountTextTokensResponse, error)
}

TextServiceClient is the client API for TextService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewTextServiceClient

func NewTextServiceClient(cc grpc.ClientConnInterface) TextServiceClient

TextServiceServer

type TextServiceServer interface {
	// Generates a response from the model given an input message.
	GenerateText(context.Context, *GenerateTextRequest) (*GenerateTextResponse, error)
	// Generates an embedding from the model given an input message.
	EmbedText(context.Context, *EmbedTextRequest) (*EmbedTextResponse, error)
	// Generates multiple embeddings from the model given input text in a
	// synchronous call.
	BatchEmbedText(context.Context, *BatchEmbedTextRequest) (*BatchEmbedTextResponse, error)
	// Runs a model's tokenizer on a text and returns the token count.
	CountTextTokens(context.Context, *CountTextTokensRequest) (*CountTextTokensResponse, error)
}

TextServiceServer is the server API for TextService service. All implementations should embed UnimplementedTextServiceServer for forward compatibility

Tool

type Tool struct {

	// Optional. A list of `FunctionDeclarations` available to the model that can
	// be used for function calling.
	//
	// The model or system does not execute the function. Instead the defined
	// function may be returned as a
	// [FunctionCall][google.ai.generativelanguage.v1alpha.Part.function_call]
	// with arguments to the client side for execution. The model may decide to
	// call a subset of these functions by populating
	// [FunctionCall][google.ai.generativelanguage.v1alpha.Part.function_call] in
	// the response. The next conversation turn may contain a
	// [FunctionResponse][google.ai.generativelanguage.v1alpha.Part.function_response]
	// with the [Content.role][google.ai.generativelanguage.v1alpha.Content.role]
	// "function" generation context for the next model turn.
	FunctionDeclarations []*FunctionDeclaration `protobuf:"bytes,1,rep,name=function_declarations,json=functionDeclarations,proto3" json:"function_declarations,omitempty"`
	// Optional. Retrieval tool that is powered by Google search.
	GoogleSearchRetrieval *GoogleSearchRetrieval `protobuf:"bytes,2,opt,name=google_search_retrieval,json=googleSearchRetrieval,proto3" json:"google_search_retrieval,omitempty"`
	// Optional. Enables the model to execute code as part of generation.
	CodeExecution *CodeExecution `protobuf:"bytes,3,opt,name=code_execution,json=codeExecution,proto3" json:"code_execution,omitempty"`
	// Optional. GoogleSearch tool type.
	// Tool to support Google Search in Model. Powered by Google.
	GoogleSearch *Tool_GoogleSearch `protobuf:"bytes,4,opt,name=google_search,json=googleSearch,proto3" json:"google_search,omitempty"`
	// contains filtered or unexported fields
}

Tool details that the model may use to generate response.

A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

func (*Tool) Descriptor

func (*Tool) Descriptor() ([]byte, []int)

Deprecated: Use Tool.ProtoReflect.Descriptor instead.

func (*Tool) GetCodeExecution

func (x *Tool) GetCodeExecution() *CodeExecution

func (*Tool) GetFunctionDeclarations

func (x *Tool) GetFunctionDeclarations() []*FunctionDeclaration

func (*Tool) GetGoogleSearch

func (x *Tool) GetGoogleSearch() *Tool_GoogleSearch

func (*Tool) GetGoogleSearchRetrieval

func (x *Tool) GetGoogleSearchRetrieval() *GoogleSearchRetrieval

func (*Tool) ProtoMessage

func (*Tool) ProtoMessage()

func (*Tool) ProtoReflect

func (x *Tool) ProtoReflect() protoreflect.Message

func (*Tool) Reset

func (x *Tool) Reset()

func (*Tool) String

func (x *Tool) String() string

ToolConfig

type ToolConfig struct {

	// Optional. Function calling config.
	FunctionCallingConfig *FunctionCallingConfig `protobuf:"bytes,1,opt,name=function_calling_config,json=functionCallingConfig,proto3" json:"function_calling_config,omitempty"`
	// contains filtered or unexported fields
}

The Tool configuration containing parameters for specifying Tool use in the request.

func (*ToolConfig) Descriptor

func (*ToolConfig) Descriptor() ([]byte, []int)

Deprecated: Use ToolConfig.ProtoReflect.Descriptor instead.

func (*ToolConfig) GetFunctionCallingConfig

func (x *ToolConfig) GetFunctionCallingConfig() *FunctionCallingConfig

func (*ToolConfig) ProtoMessage

func (*ToolConfig) ProtoMessage()

func (*ToolConfig) ProtoReflect

func (x *ToolConfig) ProtoReflect() protoreflect.Message

func (*ToolConfig) Reset

func (x *ToolConfig) Reset()

func (*ToolConfig) String

func (x *ToolConfig) String() string

Tool_GoogleSearch

type Tool_GoogleSearch struct {
	// contains filtered or unexported fields
}

GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.

func (*Tool_GoogleSearch) Descriptor

func (*Tool_GoogleSearch) Descriptor() ([]byte, []int)

Deprecated: Use Tool_GoogleSearch.ProtoReflect.Descriptor instead.

func (*Tool_GoogleSearch) ProtoMessage

func (*Tool_GoogleSearch) ProtoMessage()

func (*Tool_GoogleSearch) ProtoReflect

func (x *Tool_GoogleSearch) ProtoReflect() protoreflect.Message

func (*Tool_GoogleSearch) Reset

func (x *Tool_GoogleSearch) Reset()

func (*Tool_GoogleSearch) String

func (x *Tool_GoogleSearch) String() string

TransferOwnershipRequest

type TransferOwnershipRequest struct {

	// Required. The resource name of the tuned model to transfer ownership.
	//
	// Format: `tunedModels/my-model-id`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Required. The email address of the user to whom the tuned model is being
	// transferred to.
	EmailAddress string `protobuf:"bytes,2,opt,name=email_address,json=emailAddress,proto3" json:"email_address,omitempty"`
	// contains filtered or unexported fields
}

Request to transfer the ownership of the tuned model.

func (*TransferOwnershipRequest) Descriptor

func (*TransferOwnershipRequest) Descriptor() ([]byte, []int)

Deprecated: Use TransferOwnershipRequest.ProtoReflect.Descriptor instead.

func (*TransferOwnershipRequest) GetEmailAddress

func (x *TransferOwnershipRequest) GetEmailAddress() string

func (*TransferOwnershipRequest) GetName

func (x *TransferOwnershipRequest) GetName() string

func (*TransferOwnershipRequest) ProtoMessage

func (*TransferOwnershipRequest) ProtoMessage()

func (*TransferOwnershipRequest) ProtoReflect

func (x *TransferOwnershipRequest) ProtoReflect() protoreflect.Message

func (*TransferOwnershipRequest) Reset

func (x *TransferOwnershipRequest) Reset()

func (*TransferOwnershipRequest) String

func (x *TransferOwnershipRequest) String() string

TransferOwnershipResponse

type TransferOwnershipResponse struct {
	// contains filtered or unexported fields
}

Response from TransferOwnership.

func (*TransferOwnershipResponse) Descriptor

func (*TransferOwnershipResponse) Descriptor() ([]byte, []int)

Deprecated: Use TransferOwnershipResponse.ProtoReflect.Descriptor instead.

func (*TransferOwnershipResponse) ProtoMessage

func (*TransferOwnershipResponse) ProtoMessage()

func (*TransferOwnershipResponse) ProtoReflect

func (*TransferOwnershipResponse) Reset

func (x *TransferOwnershipResponse) Reset()

func (*TransferOwnershipResponse) String

func (x *TransferOwnershipResponse) String() string

TunedModel

type TunedModel struct {

	// The model used as the starting point for tuning.
	//
	// Types that are assignable to SourceModel:
	//
	//	*TunedModel_TunedModelSource
	//	*TunedModel_BaseModel
	SourceModel isTunedModel_SourceModel `protobuf_oneof:"source_model"`
	// Output only. The tuned model name. A unique name will be generated on
	// create. Example: `tunedModels/az2mb0bpw6i` If display_name is set on
	// create, the id portion of the name will be set by concatenating the words
	// of the display_name with hyphens and adding a random portion for
	// uniqueness.
	//
	// Example:
	//
	//   - display_name = `Sentence Translator`
	//   - name = `tunedModels/sentence-translator-u3b7m`
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Optional. The name to display for this model in user interfaces.
	// The display name must be up to 40 characters including spaces.
	DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
	// Optional. A short description of this model.
	Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// Optional. Controls the randomness of the output.
	//
	// Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will
	// produce responses that are more varied, while a value closer to `0.0` will
	// typically result in less surprising responses from the model.
	//
	// This value specifies default to be the one used by the base model while
	// creating the model.
	Temperature *float32 `protobuf:"fixed32,11,opt,name=temperature,proto3,oneof" json:"temperature,omitempty"`
	// Optional. For Nucleus sampling.
	//
	// Nucleus sampling considers the smallest set of tokens whose probability
	// sum is at least `top_p`.
	//
	// This value specifies default to be the one used by the base model while
	// creating the model.
	TopP *float32 `protobuf:"fixed32,12,opt,name=top_p,json=topP,proto3,oneof" json:"top_p,omitempty"`
	// Optional. For Top-k sampling.
	//
	// Top-k sampling considers the set of `top_k` most probable tokens.
	// This value specifies default to be used by the backend while making the
	// call to the model.
	//
	// This value specifies default to be the one used by the base model while
	// creating the model.
	TopK *int32 `protobuf:"varint,13,opt,name=top_k,json=topK,proto3,oneof" json:"top_k,omitempty"`
	// Output only. The state of the tuned model.
	State TunedModel_State `protobuf:"varint,7,opt,name=state,proto3,enum=google.ai.generativelanguage.v1alpha.TunedModel_State" json:"state,omitempty"`
	// Output only. The timestamp when this model was created.
	CreateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	// Output only. The timestamp when this model was updated.
	UpdateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
	// Required. The tuning task that creates the tuned model.
	TuningTask *TuningTask `protobuf:"bytes,10,opt,name=tuning_task,json=tuningTask,proto3" json:"tuning_task,omitempty"`
	// Optional. List of project numbers that have read access to the tuned model.
	ReaderProjectNumbers []int64 `protobuf:"varint,14,rep,packed,name=reader_project_numbers,json=readerProjectNumbers,proto3" json:"reader_project_numbers,omitempty"`
	// contains filtered or unexported fields
}

A fine-tuned model created using ModelService.CreateTunedModel.

func (*TunedModel) Descriptor

func (*TunedModel) Descriptor() ([]byte, []int)

Deprecated: Use TunedModel.ProtoReflect.Descriptor instead.

func (*TunedModel) GetBaseModel

func (x *TunedModel) GetBaseModel() string

func (*TunedModel) GetCreateTime

func (x *TunedModel) GetCreateTime() *timestamppb.Timestamp

func (*TunedModel) GetDescription

func (x *TunedModel) GetDescription() string

func (*TunedModel) GetDisplayName

func (x *TunedModel) GetDisplayName() string

func (*TunedModel) GetName

func (x *TunedModel) GetName() string

func (*TunedModel) GetReaderProjectNumbers

func (x *TunedModel) GetReaderProjectNumbers() []int64

func (*TunedModel) GetSourceModel

func (m *TunedModel) GetSourceModel() isTunedModel_SourceModel

func (*TunedModel) GetState

func (x *TunedModel) GetState() TunedModel_State

func (*TunedModel) GetTemperature

func (x *TunedModel) GetTemperature() float32

func (*TunedModel) GetTopK

func (x *TunedModel) GetTopK() int32

func (*TunedModel) GetTopP

func (x *TunedModel) GetTopP() float32

func (*TunedModel) GetTunedModelSource

func (x *TunedModel) GetTunedModelSource() *TunedModelSource

func (*TunedModel) GetTuningTask

func (x *TunedModel) GetTuningTask() *TuningTask

func (*TunedModel) GetUpdateTime

func (x *TunedModel) GetUpdateTime() *timestamppb.Timestamp

func (*TunedModel) ProtoMessage

func (*TunedModel) ProtoMessage()

func (*TunedModel) ProtoReflect

func (x *TunedModel) ProtoReflect() protoreflect.Message

func (*TunedModel) Reset

func (x *TunedModel) Reset()

func (*TunedModel) String

func (x *TunedModel) String() string

TunedModelSource

type TunedModelSource struct {

	// Immutable. The name of the `TunedModel` to use as the starting point for
	// training the new model.
	// Example: `tunedModels/my-tuned-model`
	TunedModel string `protobuf:"bytes,1,opt,name=tuned_model,json=tunedModel,proto3" json:"tuned_model,omitempty"`
	// Output only. The name of the base `Model` this `TunedModel` was tuned from.
	// Example: `models/gemini-1.5-flash-001`
	BaseModel string `protobuf:"bytes,2,opt,name=base_model,json=baseModel,proto3" json:"base_model,omitempty"`
	// contains filtered or unexported fields
}

Tuned model as a source for training a new model.

func (*TunedModelSource) Descriptor

func (*TunedModelSource) Descriptor() ([]byte, []int)

Deprecated: Use TunedModelSource.ProtoReflect.Descriptor instead.

func (*TunedModelSource) GetBaseModel

func (x *TunedModelSource) GetBaseModel() string

func (*TunedModelSource) GetTunedModel

func (x *TunedModelSource) GetTunedModel() string

func (*TunedModelSource) ProtoMessage

func (*TunedModelSource) ProtoMessage()

func (*TunedModelSource) ProtoReflect

func (x *TunedModelSource) ProtoReflect() protoreflect.Message

func (*TunedModelSource) Reset

func (x *TunedModelSource) Reset()

func (*TunedModelSource) String

func (x *TunedModelSource) String() string

TunedModel_BaseModel

type TunedModel_BaseModel struct {
	// Immutable. The name of the `Model` to tune.
	// Example: `models/gemini-1.5-flash-001`
	BaseModel string `protobuf:"bytes,4,opt,name=base_model,json=baseModel,proto3,oneof"`
}

TunedModel_State

type TunedModel_State int32

The state of the tuned model.

TunedModel_STATE_UNSPECIFIED, TunedModel_CREATING, TunedModel_ACTIVE, TunedModel_FAILED

const (
	// The default value. This value is unused.
	TunedModel_STATE_UNSPECIFIED TunedModel_State = 0
	// The model is being created.
	TunedModel_CREATING TunedModel_State = 1
	// The model is ready to be used.
	TunedModel_ACTIVE TunedModel_State = 2
	// The model failed to be created.
	TunedModel_FAILED TunedModel_State = 3
)

func (TunedModel_State) Descriptor

func (TunedModel_State) Enum

func (TunedModel_State) EnumDescriptor

func (TunedModel_State) EnumDescriptor() ([]byte, []int)

Deprecated: Use TunedModel_State.Descriptor instead.

func (TunedModel_State) Number

func (TunedModel_State) String

func (x TunedModel_State) String() string

func (TunedModel_State) Type

TunedModel_TunedModelSource

type TunedModel_TunedModelSource struct {
	// Optional. TunedModel to use as the starting point for training the new
	// model.
	TunedModelSource *TunedModelSource `protobuf:"bytes,3,opt,name=tuned_model_source,json=tunedModelSource,proto3,oneof"`
}

TuningContent

type TuningContent struct {

	// Ordered `Parts` that constitute a single message. Parts may have different
	// MIME types.
	Parts []*TuningPart `protobuf:"bytes,1,rep,name=parts,proto3" json:"parts,omitempty"`
	// Optional. The producer of the content. Must be either 'user' or 'model'.
	//
	// Useful to set for multi-turn conversations, otherwise can be left blank
	// or unset.
	Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
	// contains filtered or unexported fields
}

The structured datatype containing multi-part content of an example message.

This is a subset of the Content proto used during model inference with limited type support. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.

func (*TuningContent) Descriptor

func (*TuningContent) Descriptor() ([]byte, []int)

Deprecated: Use TuningContent.ProtoReflect.Descriptor instead.

func (*TuningContent) GetParts

func (x *TuningContent) GetParts() []*TuningPart

func (*TuningContent) GetRole

func (x *TuningContent) GetRole() string

func (*TuningContent) ProtoMessage

func (*TuningContent) ProtoMessage()

func (*TuningContent) ProtoReflect

func (x *TuningContent) ProtoReflect() protoreflect.Message

func (*TuningContent) Reset

func (x *TuningContent) Reset()

func (*TuningContent) String

func (x *TuningContent) String() string

TuningExample

type TuningExample struct {

	// The input to the model for this example.
	//
	// Types that are assignable to ModelInput:
	//
	//	*TuningExample_TextInput
	ModelInput isTuningExample_ModelInput `protobuf_oneof:"model_input"`
	// Required. The expected model output.
	Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"`
	// contains filtered or unexported fields
}

A single example for tuning.

func (*TuningExample) Descriptor

func (*TuningExample) Descriptor() ([]byte, []int)

Deprecated: Use TuningExample.ProtoReflect.Descriptor instead.

func (*TuningExample) GetModelInput

func (m *TuningExample) GetModelInput() isTuningExample_ModelInput

func (*TuningExample) GetOutput

func (x *TuningExample) GetOutput() string

func (*TuningExample) GetTextInput

func (x *TuningExample) GetTextInput() string

func (*TuningExample) ProtoMessage

func (*TuningExample) ProtoMessage()

func (*TuningExample) ProtoReflect

func (x *TuningExample) ProtoReflect() protoreflect.Message

func (*TuningExample) Reset

func (x *TuningExample) Reset()

func (*TuningExample) String

func (x *TuningExample) String() string

TuningExample_TextInput

type TuningExample_TextInput struct {
	// Optional. Text model input.
	TextInput string `protobuf:"bytes,1,opt,name=text_input,json=textInput,proto3,oneof"`
}

TuningExamples

type TuningExamples struct {

	// The examples. Example input can be for text or discuss, but all examples
	// in a set must be of the same type.
	Examples []*TuningExample `protobuf:"bytes,1,rep,name=examples,proto3" json:"examples,omitempty"`
	// Content examples. For multiturn conversations.
	MultiturnExamples []*TuningMultiturnExample `protobuf:"bytes,2,rep,name=multiturn_examples,json=multiturnExamples,proto3" json:"multiturn_examples,omitempty"`
	// contains filtered or unexported fields
}

A set of tuning examples. Can be training or validation data.

func (*TuningExamples) Descriptor

func (*TuningExamples) Descriptor() ([]byte, []int)

Deprecated: Use TuningExamples.ProtoReflect.Descriptor instead.

func (*TuningExamples) GetExamples

func (x *TuningExamples) GetExamples() []*TuningExample

func (*TuningExamples) GetMultiturnExamples

func (x *TuningExamples) GetMultiturnExamples() []*TuningMultiturnExample

func (*TuningExamples) ProtoMessage

func (*TuningExamples) ProtoMessage()

func (*TuningExamples) ProtoReflect

func (x *TuningExamples) ProtoReflect() protoreflect.Message

func (*TuningExamples) Reset

func (x *TuningExamples) Reset()

func (*TuningExamples) String

func (x *TuningExamples) String() string

TuningMultiturnExample

type TuningMultiturnExample struct {

	// Optional. Developer set system instructions.
	// Currently, text only.
	SystemInstruction *TuningContent `protobuf:"bytes,8,opt,name=system_instruction,json=systemInstruction,proto3,oneof" json:"system_instruction,omitempty"`
	// Each Content represents a turn in the conversation.
	Contents []*TuningContent `protobuf:"bytes,1,rep,name=contents,proto3" json:"contents,omitempty"`
	// contains filtered or unexported fields
}

A tuning example with multiturn input.

func (*TuningMultiturnExample) Descriptor

func (*TuningMultiturnExample) Descriptor() ([]byte, []int)

Deprecated: Use TuningMultiturnExample.ProtoReflect.Descriptor instead.

func (*TuningMultiturnExample) GetContents

func (x *TuningMultiturnExample) GetContents() []*TuningContent

func (*TuningMultiturnExample) GetSystemInstruction

func (x *TuningMultiturnExample) GetSystemInstruction() *TuningContent

func (*TuningMultiturnExample) ProtoMessage

func (*TuningMultiturnExample) ProtoMessage()

func (*TuningMultiturnExample) ProtoReflect

func (x *TuningMultiturnExample) ProtoReflect() protoreflect.Message

func (*TuningMultiturnExample) Reset

func (x *TuningMultiturnExample) Reset()

func (*TuningMultiturnExample) String

func (x *TuningMultiturnExample) String() string

TuningPart

type TuningPart struct {

	// Data for the part. Only text supported.
	//
	// Types that are assignable to Data:
	//
	//	*TuningPart_Text
	Data isTuningPart_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

A datatype containing data that is part of a multi-part TuningContent message.

This is a subset of the Part used for model inference, with limited type support.

A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data.

func (*TuningPart) Descriptor

func (*TuningPart) Descriptor() ([]byte, []int)

Deprecated: Use TuningPart.ProtoReflect.Descriptor instead.

func (*TuningPart) GetData

func (m *TuningPart) GetData() isTuningPart_Data

func (*TuningPart) GetText

func (x *TuningPart) GetText() string

func (*TuningPart) ProtoMessage

func (*TuningPart) ProtoMessage()

func (*TuningPart) ProtoReflect

func (x *TuningPart) ProtoReflect() protoreflect.Message

func (*TuningPart) Reset

func (x *TuningPart) Reset()

func (*TuningPart) String

func (x *TuningPart) String() string

TuningPart_Text

type TuningPart_Text struct {
	// Inline text.
	Text string `protobuf:"bytes,2,opt,name=text,proto3,oneof"`
}

TuningSnapshot

type TuningSnapshot struct {

	// Output only. The tuning step.
	Step int32 `protobuf:"varint,1,opt,name=step,proto3" json:"step,omitempty"`
	// Output only. The epoch this step was part of.
	Epoch int32 `protobuf:"varint,2,opt,name=epoch,proto3" json:"epoch,omitempty"`
	// Output only. The mean loss of the training examples for this step.
	MeanLoss float32 `protobuf:"fixed32,3,opt,name=mean_loss,json=meanLoss,proto3" json:"mean_loss,omitempty"`
	// Output only. The timestamp when this metric was computed.
	ComputeTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=compute_time,json=computeTime,proto3" json:"compute_time,omitempty"`
	// contains filtered or unexported fields
}

Record for a single tuning step.

func (*TuningSnapshot) Descriptor

func (*TuningSnapshot) Descriptor() ([]byte, []int)

Deprecated: Use TuningSnapshot.ProtoReflect.Descriptor instead.

func (*TuningSnapshot) GetComputeTime

func (x *TuningSnapshot) GetComputeTime() *timestamppb.Timestamp

func (*TuningSnapshot) GetEpoch

func (x *TuningSnapshot) GetEpoch() int32

func (*TuningSnapshot) GetMeanLoss

func (x *TuningSnapshot) GetMeanLoss() float32

func (*TuningSnapshot) GetStep

func (x *TuningSnapshot) GetStep() int32

func (*TuningSnapshot) ProtoMessage

func (*TuningSnapshot) ProtoMessage()

func (*TuningSnapshot) ProtoReflect

func (x *TuningSnapshot) ProtoReflect() protoreflect.Message

func (*TuningSnapshot) Reset

func (x *TuningSnapshot) Reset()

func (*TuningSnapshot) String

func (x *TuningSnapshot) String() string

TuningTask

type TuningTask struct {

	// Output only. The timestamp when tuning this model started.
	StartTime *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// Output only. The timestamp when tuning this model completed.
	CompleteTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=complete_time,json=completeTime,proto3" json:"complete_time,omitempty"`
	// Output only. Metrics collected during tuning.
	Snapshots []*TuningSnapshot `protobuf:"bytes,3,rep,name=snapshots,proto3" json:"snapshots,omitempty"`
	// Required. Input only. Immutable. The model training data.
	TrainingData *Dataset `protobuf:"bytes,4,opt,name=training_data,json=trainingData,proto3" json:"training_data,omitempty"`
	// Immutable. Hyperparameters controlling the tuning process. If not provided,
	// default values will be used.
	Hyperparameters *Hyperparameters `protobuf:"bytes,5,opt,name=hyperparameters,proto3" json:"hyperparameters,omitempty"`
	// contains filtered or unexported fields
}

Tuning tasks that create tuned models.

func (*TuningTask) Descriptor

func (*TuningTask) Descriptor() ([]byte, []int)

Deprecated: Use TuningTask.ProtoReflect.Descriptor instead.

func (*TuningTask) GetCompleteTime

func (x *TuningTask) GetCompleteTime() *timestamppb.Timestamp

func (*TuningTask) GetHyperparameters

func (x *TuningTask) GetHyperparameters() *Hyperparameters

func (*TuningTask) GetSnapshots

func (x *TuningTask) GetSnapshots() []*TuningSnapshot

func (*TuningTask) GetStartTime

func (x *TuningTask) GetStartTime() *timestamppb.Timestamp

func (*TuningTask) GetTrainingData

func (x *TuningTask) GetTrainingData() *Dataset

func (*TuningTask) ProtoMessage

func (*TuningTask) ProtoMessage()

func (*TuningTask) ProtoReflect

func (x *TuningTask) ProtoReflect() protoreflect.Message

func (*TuningTask) Reset

func (x *TuningTask) Reset()

func (*TuningTask) String

func (x *TuningTask) String() string

Type

type Type int32

Type contains the list of OpenAPI data types as defined by https://spec.openapis.org/oas/v3.0.3#data-types

Type_TYPE_UNSPECIFIED, Type_STRING, Type_NUMBER, Type_INTEGER, Type_BOOLEAN, Type_ARRAY, Type_OBJECT

const (
	// Not specified, should not be used.
	Type_TYPE_UNSPECIFIED Type = 0
	// String type.
	Type_STRING Type = 1
	// Number type.
	Type_NUMBER Type = 2
	// Integer type.
	Type_INTEGER Type = 3
	// Boolean type.
	Type_BOOLEAN Type = 4
	// Array type.
	Type_ARRAY Type = 5
	// Object type.
	Type_OBJECT Type = 6
)

func (Type) Descriptor

func (Type) Descriptor() protoreflect.EnumDescriptor

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Type.Descriptor instead.

func (Type) Number

func (x Type) Number() protoreflect.EnumNumber

func (Type) String

func (x Type) String() string

func (Type) Type

func (Type) Type() protoreflect.EnumType

UnimplementedCacheServiceServer

type UnimplementedCacheServiceServer struct {
}

UnimplementedCacheServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedCacheServiceServer) CreateCachedContent

func (UnimplementedCacheServiceServer) DeleteCachedContent

func (UnimplementedCacheServiceServer) GetCachedContent

func (UnimplementedCacheServiceServer) ListCachedContents

func (UnimplementedCacheServiceServer) UpdateCachedContent

UnimplementedDiscussServiceServer

type UnimplementedDiscussServiceServer struct {
}

UnimplementedDiscussServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedDiscussServiceServer) CountMessageTokens

func (UnimplementedDiscussServiceServer) GenerateMessage

UnimplementedFileServiceServer

type UnimplementedFileServiceServer struct {
}

UnimplementedFileServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedFileServiceServer) CreateFile

func (UnimplementedFileServiceServer) DeleteFile

func (UnimplementedFileServiceServer) GetFile

func (UnimplementedFileServiceServer) ListFiles

UnimplementedGenerativeServiceServer

type UnimplementedGenerativeServiceServer struct {
}

UnimplementedGenerativeServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedGenerativeServiceServer) BatchEmbedContents

func (UnimplementedGenerativeServiceServer) BidiGenerateContent

func (UnimplementedGenerativeServiceServer) CountTokens

func (UnimplementedGenerativeServiceServer) EmbedContent

func (UnimplementedGenerativeServiceServer) GenerateAnswer

func (UnimplementedGenerativeServiceServer) GenerateContent

func (UnimplementedGenerativeServiceServer) StreamGenerateContent

UnimplementedModelServiceServer

type UnimplementedModelServiceServer struct {
}

UnimplementedModelServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedModelServiceServer) CreateTunedModel

func (UnimplementedModelServiceServer) DeleteTunedModel

func (UnimplementedModelServiceServer) GetModel

func (UnimplementedModelServiceServer) GetTunedModel

func (UnimplementedModelServiceServer) ListModels

func (UnimplementedModelServiceServer) ListTunedModels

func (UnimplementedModelServiceServer) UpdateTunedModel

UnimplementedPermissionServiceServer

type UnimplementedPermissionServiceServer struct {
}

UnimplementedPermissionServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedPermissionServiceServer) CreatePermission

func (UnimplementedPermissionServiceServer) DeletePermission

func (UnimplementedPermissionServiceServer) GetPermission

func (UnimplementedPermissionServiceServer) ListPermissions

func (UnimplementedPermissionServiceServer) TransferOwnership

func (UnimplementedPermissionServiceServer) UpdatePermission

UnimplementedPredictionServiceServer

type UnimplementedPredictionServiceServer struct {
}

UnimplementedPredictionServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedPredictionServiceServer) Predict

UnimplementedRetrieverServiceServer

type UnimplementedRetrieverServiceServer struct {
}

UnimplementedRetrieverServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedRetrieverServiceServer) BatchCreateChunks

func (UnimplementedRetrieverServiceServer) BatchDeleteChunks

func (UnimplementedRetrieverServiceServer) BatchUpdateChunks

func (UnimplementedRetrieverServiceServer) CreateChunk

func (UnimplementedRetrieverServiceServer) CreateCorpus

func (UnimplementedRetrieverServiceServer) CreateDocument

func (UnimplementedRetrieverServiceServer) DeleteChunk

func (UnimplementedRetrieverServiceServer) DeleteCorpus

func (UnimplementedRetrieverServiceServer) DeleteDocument

func (UnimplementedRetrieverServiceServer) GetChunk

func (UnimplementedRetrieverServiceServer) GetCorpus

func (UnimplementedRetrieverServiceServer) GetDocument

func (UnimplementedRetrieverServiceServer) ListChunks

func (UnimplementedRetrieverServiceServer) ListCorpora

func (UnimplementedRetrieverServiceServer) ListDocuments

func (UnimplementedRetrieverServiceServer) QueryCorpus

func (UnimplementedRetrieverServiceServer) QueryDocument

func (UnimplementedRetrieverServiceServer) UpdateChunk

func (UnimplementedRetrieverServiceServer) UpdateCorpus

func (UnimplementedRetrieverServiceServer) UpdateDocument

UnimplementedTextServiceServer

type UnimplementedTextServiceServer struct {
}

UnimplementedTextServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedTextServiceServer) BatchEmbedText

func (UnimplementedTextServiceServer) CountTextTokens

func (UnimplementedTextServiceServer) EmbedText

func (UnimplementedTextServiceServer) GenerateText

UnsafeCacheServiceServer

type UnsafeCacheServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCacheServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CacheServiceServer will result in compilation errors.

UnsafeDiscussServiceServer

type UnsafeDiscussServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeDiscussServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DiscussServiceServer will result in compilation errors.

UnsafeFileServiceServer

type UnsafeFileServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FileServiceServer will result in compilation errors.

UnsafeGenerativeServiceServer

type UnsafeGenerativeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeGenerativeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GenerativeServiceServer will result in compilation errors.

UnsafeModelServiceServer

type UnsafeModelServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeModelServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ModelServiceServer will result in compilation errors.

UnsafePermissionServiceServer

type UnsafePermissionServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePermissionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PermissionServiceServer will result in compilation errors.

UnsafePredictionServiceServer

type UnsafePredictionServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePredictionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PredictionServiceServer will result in compilation errors.

UnsafeRetrieverServiceServer

type UnsafeRetrieverServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeRetrieverServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RetrieverServiceServer will result in compilation errors.

UnsafeTextServiceServer

type UnsafeTextServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTextServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TextServiceServer will result in compilation errors.

UpdateCachedContentRequest

type UpdateCachedContentRequest struct {

	// Required. The content cache entry to update
	CachedContent *CachedContent `protobuf:"bytes,1,opt,name=cached_content,json=cachedContent,proto3" json:"cached_content,omitempty"`
	// The list of fields to update.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update CachedContent.

func (*UpdateCachedContentRequest) Descriptor

func (*UpdateCachedContentRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateCachedContentRequest.ProtoReflect.Descriptor instead.

func (*UpdateCachedContentRequest) GetCachedContent

func (x *UpdateCachedContentRequest) GetCachedContent() *CachedContent

func (*UpdateCachedContentRequest) GetUpdateMask

func (x *UpdateCachedContentRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateCachedContentRequest) ProtoMessage

func (*UpdateCachedContentRequest) ProtoMessage()

func (*UpdateCachedContentRequest) ProtoReflect

func (*UpdateCachedContentRequest) Reset

func (x *UpdateCachedContentRequest) Reset()

func (*UpdateCachedContentRequest) String

func (x *UpdateCachedContentRequest) String() string

UpdateChunkRequest

type UpdateChunkRequest struct {

	// Required. The `Chunk` to update.
	Chunk *Chunk `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
	// Required. The list of fields to update.
	// Currently, this only supports updating `custom_metadata` and `data`.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update a Chunk.

func (*UpdateChunkRequest) Descriptor

func (*UpdateChunkRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateChunkRequest.ProtoReflect.Descriptor instead.

func (*UpdateChunkRequest) GetChunk

func (x *UpdateChunkRequest) GetChunk() *Chunk

func (*UpdateChunkRequest) GetUpdateMask

func (x *UpdateChunkRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateChunkRequest) ProtoMessage

func (*UpdateChunkRequest) ProtoMessage()

func (*UpdateChunkRequest) ProtoReflect

func (x *UpdateChunkRequest) ProtoReflect() protoreflect.Message

func (*UpdateChunkRequest) Reset

func (x *UpdateChunkRequest) Reset()

func (*UpdateChunkRequest) String

func (x *UpdateChunkRequest) String() string

UpdateCorpusRequest

type UpdateCorpusRequest struct {

	// Required. The `Corpus` to update.
	Corpus *Corpus `protobuf:"bytes,1,opt,name=corpus,proto3" json:"corpus,omitempty"`
	// Required. The list of fields to update.
	// Currently, this only supports updating `display_name`.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update a Corpus.

func (*UpdateCorpusRequest) Descriptor

func (*UpdateCorpusRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateCorpusRequest.ProtoReflect.Descriptor instead.

func (*UpdateCorpusRequest) GetCorpus

func (x *UpdateCorpusRequest) GetCorpus() *Corpus

func (*UpdateCorpusRequest) GetUpdateMask

func (x *UpdateCorpusRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateCorpusRequest) ProtoMessage

func (*UpdateCorpusRequest) ProtoMessage()

func (*UpdateCorpusRequest) ProtoReflect

func (x *UpdateCorpusRequest) ProtoReflect() protoreflect.Message

func (*UpdateCorpusRequest) Reset

func (x *UpdateCorpusRequest) Reset()

func (*UpdateCorpusRequest) String

func (x *UpdateCorpusRequest) String() string

UpdateDocumentRequest

type UpdateDocumentRequest struct {

	// Required. The `Document` to update.
	Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"`
	// Required. The list of fields to update.
	// Currently, this only supports updating `display_name` and
	// `custom_metadata`.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update a Document.

func (*UpdateDocumentRequest) Descriptor

func (*UpdateDocumentRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateDocumentRequest.ProtoReflect.Descriptor instead.

func (*UpdateDocumentRequest) GetDocument

func (x *UpdateDocumentRequest) GetDocument() *Document

func (*UpdateDocumentRequest) GetUpdateMask

func (x *UpdateDocumentRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateDocumentRequest) ProtoMessage

func (*UpdateDocumentRequest) ProtoMessage()

func (*UpdateDocumentRequest) ProtoReflect

func (x *UpdateDocumentRequest) ProtoReflect() protoreflect.Message

func (*UpdateDocumentRequest) Reset

func (x *UpdateDocumentRequest) Reset()

func (*UpdateDocumentRequest) String

func (x *UpdateDocumentRequest) String() string

UpdatePermissionRequest

type UpdatePermissionRequest struct {

	// Required. The permission to update.
	//
	// The permission's `name` field is used to identify the permission to update.
	Permission *Permission `protobuf:"bytes,1,opt,name=permission,proto3" json:"permission,omitempty"`
	// Required. The list of fields to update. Accepted ones:
	//   - role (`Permission.role` field)
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update the Permission.

func (*UpdatePermissionRequest) Descriptor

func (*UpdatePermissionRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdatePermissionRequest.ProtoReflect.Descriptor instead.

func (*UpdatePermissionRequest) GetPermission

func (x *UpdatePermissionRequest) GetPermission() *Permission

func (*UpdatePermissionRequest) GetUpdateMask

func (x *UpdatePermissionRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdatePermissionRequest) ProtoMessage

func (*UpdatePermissionRequest) ProtoMessage()

func (*UpdatePermissionRequest) ProtoReflect

func (x *UpdatePermissionRequest) ProtoReflect() protoreflect.Message

func (*UpdatePermissionRequest) Reset

func (x *UpdatePermissionRequest) Reset()

func (*UpdatePermissionRequest) String

func (x *UpdatePermissionRequest) String() string

UpdateTunedModelRequest

type UpdateTunedModelRequest struct {

	// Required. The tuned model to update.
	TunedModel *TunedModel `protobuf:"bytes,1,opt,name=tuned_model,json=tunedModel,proto3" json:"tuned_model,omitempty"`
	// Optional. The list of fields to update.
	UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	// contains filtered or unexported fields
}

Request to update a TunedModel.

func (*UpdateTunedModelRequest) Descriptor

func (*UpdateTunedModelRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateTunedModelRequest.ProtoReflect.Descriptor instead.

func (*UpdateTunedModelRequest) GetTunedModel

func (x *UpdateTunedModelRequest) GetTunedModel() *TunedModel

func (*UpdateTunedModelRequest) GetUpdateMask

func (x *UpdateTunedModelRequest) GetUpdateMask() *fieldmaskpb.FieldMask

func (*UpdateTunedModelRequest) ProtoMessage

func (*UpdateTunedModelRequest) ProtoMessage()

func (*UpdateTunedModelRequest) ProtoReflect

func (x *UpdateTunedModelRequest) ProtoReflect() protoreflect.Message

func (*UpdateTunedModelRequest) Reset

func (x *UpdateTunedModelRequest) Reset()

func (*UpdateTunedModelRequest) String

func (x *UpdateTunedModelRequest) String() string

VideoMetadata

type VideoMetadata struct {

	// Duration of the video.
	VideoDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=video_duration,json=videoDuration,proto3" json:"video_duration,omitempty"`
	// contains filtered or unexported fields
}

Metadata for a video File.

func (*VideoMetadata) Descriptor

func (*VideoMetadata) Descriptor() ([]byte, []int)

Deprecated: Use VideoMetadata.ProtoReflect.Descriptor instead.

func (*VideoMetadata) GetVideoDuration

func (x *VideoMetadata) GetVideoDuration() *durationpb.Duration

func (*VideoMetadata) ProtoMessage

func (*VideoMetadata) ProtoMessage()

func (*VideoMetadata) ProtoReflect

func (x *VideoMetadata) ProtoReflect() protoreflect.Message

func (*VideoMetadata) Reset

func (x *VideoMetadata) Reset()

func (*VideoMetadata) String

func (x *VideoMetadata) String() string

VoiceConfig

type VoiceConfig struct {

	// The configuration for the speaker to use.
	//
	// Types that are assignable to VoiceConfig:
	//
	//	*VoiceConfig_PrebuiltVoiceConfig
	VoiceConfig isVoiceConfig_VoiceConfig `protobuf_oneof:"voice_config"`
	// contains filtered or unexported fields
}

The configuration for the voice to use.

func (*VoiceConfig) Descriptor

func (*VoiceConfig) Descriptor() ([]byte, []int)

Deprecated: Use VoiceConfig.ProtoReflect.Descriptor instead.

func (*VoiceConfig) GetPrebuiltVoiceConfig

func (x *VoiceConfig) GetPrebuiltVoiceConfig() *PrebuiltVoiceConfig

func (*VoiceConfig) GetVoiceConfig

func (m *VoiceConfig) GetVoiceConfig() isVoiceConfig_VoiceConfig

func (*VoiceConfig) ProtoMessage

func (*VoiceConfig) ProtoMessage()

func (*VoiceConfig) ProtoReflect

func (x *VoiceConfig) ProtoReflect() protoreflect.Message

func (*VoiceConfig) Reset

func (x *VoiceConfig) Reset()

func (*VoiceConfig) String

func (x *VoiceConfig) String() string

VoiceConfig_PrebuiltVoiceConfig

type VoiceConfig_PrebuiltVoiceConfig struct {
	// The configuration for the prebuilt voice to use.
	PrebuiltVoiceConfig *PrebuiltVoiceConfig `protobuf:"bytes,1,opt,name=prebuilt_voice_config,json=prebuiltVoiceConfig,proto3,oneof"`
}