Documentation
¶
Index ¶
Constants ¶
View Source
const EmbedDimensions = 768
View Source
const Provider = "VertexAI"
View Source
const TypeClassification embed.Type = "CLASSIFICATION"
View Source
const TypeClustering embed.Type = "CLUSTERING"
View Source
const TypeCodeRetrieval embed.Type = "CODE_RETRIEVAL_QUERY"
View Source
const TypeDocument embed.Type = "RETRIEVAL_DOCUMENT"
View Source
const TypeFactVerification embed.Type = "FACT_VERIFICATION"
View Source
const TypeQuery embed.Type = "RETRIEVAL_QUERY"
View Source
const TypeQuestionAnswer embed.Type = "QUESTION_ANSWERING"
View Source
const TypeSemanticSimilarity embed.Type = "SEMANTIC_SIMILARITY"
Variables ¶
View Source
var EmbedMode_multilang_002 = embed.Model{ Provider: Provider, Name: "text-multilingual-embedding-002", Description: "see https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api", InputMaxTokens: 2048, OutputDimensions: 768, }
View Source
var EmbedModel_text_004 = embed.Model{ Provider: Provider, Name: "text-embedding-004", Description: "see https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api", InputMaxTokens: 2048, OutputDimensions: 768, }
View Source
var EmbedModel_text_005 = embed.Model{ Provider: Provider, Name: "text-embedding-005", Description: "see https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api", InputMaxTokens: 2048, OutputDimensions: 768, }
View Source
var EmbedModel_text_gecko_003 = embed.Model{ Provider: Provider, Name: "textembedding-gecko@003", Description: "see https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api", InputMaxTokens: 2048, OutputDimensions: 768, }
var EmbedModel_text_gecko_001 = embed.Model{ // deprecated?
Provider: Provider, Name: "textembedding-gecko@001", Description: "see https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api", InputMaxTokens: 2048, OutputDimensions: 768, }
View Source
var EmbedModel_text_gecko_multilang_001 = embed.Model{ Provider: Provider, Name: "textembedding-gecko-multilingual@001", Description: "see https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/text-embeddings-api", InputMaxTokens: 2048, OutputDimensions: 768, }
View Source
var EmbedModels = map[string]embed.Model{ EmbedModel_text_005.Name: EmbedModel_text_005, EmbedModel_text_004.Name: EmbedModel_text_004, EmbedMode_multilang_002.Name: EmbedMode_multilang_002, EmbedModel_text_gecko_003.Name: EmbedModel_text_gecko_003, EmbedModel_text_gecko_multilang_001.Name: EmbedModel_text_gecko_multilang_001, }
View Source
var GenModel_gemini_1_5_flash = gen.Model{ Provider: Provider, Name: "gemini-1.5-flash", Description: "Fast and versatile performance across a diverse variety of tasks", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_1_5_flash_001 = gen.Model{ Provider: Provider, Name: "gemini-1.5-flash-002", Description: "Fast and versatile performance across a diverse variety of tasks", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_1_5_flash_002 = gen.Model{ Provider: Provider, Name: "gemini-1.5-flash-001", Description: "Fast and versatile performance across a diverse variety of tasks", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_1_5_pro = gen.Model{ Provider: Provider, Name: "gemini-1.5-pro", Description: "Complex reasoning tasks requiring more intelligence", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_1_5_pro_001 = gen.Model{ Provider: Provider, Name: "gemini-1.5-pro-001", Description: "Complex reasoning tasks requiring more intelligence", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_1_5_pro_002 = gen.Model{ Provider: Provider, Name: "gemini-1.5-pro-002", Description: "Complex reasoning tasks requiring more intelligence", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_2_0_flash = gen.Model{ Provider: Provider, Name: "gemini-2.0-flash-exp", Description: "Fast and versatile performance across a diverse variety of tasks", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModel_gemini_2_0_flash_001 = gen.Model{ Provider: Provider, Name: "gemini-2.0-flash-001", Description: "Fast and versatile performance across a diverse variety of tasks", InputContentTypes: nil, InputMaxToken: 0, OutputMaxToken: 0, SupportTools: false, SupportStructuredOutput: false, }
View Source
var GenModels = map[string]gen.Model{ GenModel_gemini_2_0_flash_001.Name: GenModel_gemini_2_0_flash_001, GenModel_gemini_1_5_flash.Name: GenModel_gemini_1_5_flash, GenModel_gemini_1_5_flash_001.Name: GenModel_gemini_1_5_flash_001, GenModel_gemini_1_5_flash_002.Name: GenModel_gemini_1_5_flash_002, GenModel_gemini_1_5_pro.Name: GenModel_gemini_1_5_pro, GenModel_gemini_1_5_pro_002.Name: GenModel_gemini_1_5_pro_002, GenModel_gemini_1_5_pro_001.Name: GenModel_gemini_1_5_pro_001, }
Functions ¶
This section is empty.
Types ¶
type GoogleConfig ¶
type GoogleEmbedRequest ¶
type GoogleEmbedResponse ¶
type JSONSchema ¶ added in v0.8.0
type JSONSchema struct {
// Optional. The type of the data.
Type Type `json:"type,omitempty"`
// Optional. The format of the data.
// Supported formats:
//
// for NUMBER type: "float", "double"
// for INTEGER type: "int32", "int64"
// for STRING type: "email", "byte", etc
Format string `json:"format,omitempty"`
// Optional. The title of the Schema.
Title string `json:"title,omitempty"`
// Optional. The description of the data.
Description string `json:"description,omitempty"`
// Optional. Indicates if the value may be null.
Nullable bool `json:"nullable,omitempty"`
// Optional. SCHEMA FIELDS FOR TYPE ARRAY
// Schema of the elements of Type.ARRAY.
Items *JSONSchema `json:"items,omitempty"`
// Optional. Minimum number of the elements for Type.ARRAY.
MinItems int `json:"min_items,omitempty"`
// Optional. Maximum number of the elements for Type.ARRAY.
MaxItems int `json:"max_items,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 `json:"enum, omitempty"`
// Optional. SCHEMA FIELDS FOR TYPE OBJECT
// Properties of Type.OBJECT.
Properties map[string]*JSONSchema `json:"properties,omitempty"`
// Optional. Required properties of Type.OBJECT.
Required []string `json:"required,omitempty"`
// Optional. Minimum number of the properties for Type.OBJECT.
MinProperties int `json:"min_properties,omitempty"`
// Optional. Maximum number of the properties for Type.OBJECT.
MaxProperties int `json:"max_properties,omitempty"`
// Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
// Minimum value of the Type.INTEGER and Type.NUMBER
Minimum float64 `json:"minimum,omitempty"`
// Optional. Maximum value of the Type.INTEGER and Type.NUMBER
Maximum float64 `json:"maximum,omitempty"`
// Optional. SCHEMA FIELDS FOR TYPE STRING
// Minimum length of the Type.STRING
MinLength int `json:"min_length,omitempty"`
// Optional. Maximum length of the Type.STRING
MaxLength int `json:"max_length,omitempty"`
// Optional. Pattern of the Type.STRING to restrict a string to a regular
// expression.
Pattern string `json:"pattern,omitempty"`
}
JSONSchema is used to define the format of input/output data. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). More fields may be added in the future as needed.
Click to show internal directories.
Click to hide internal directories.