Documentation ¶
Overview ¶
package vertex implements a langchaingo provider for Google Vertex AI LLMs, including the new Gemini models. See https://cloud.google.com/vertex-ai for more details.
Index ¶
- Constants
- Variables
- type Vertex
- func (g *Vertex) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)
- func (g *Vertex) CreateEmbedding(ctx context.Context, texts []string) ([][]float32, error)
- func (g *Vertex) GenerateContent(ctx context.Context, messages []llms.MessageContent, ...) (*llms.ContentResponse, error)
Constants ¶
View Source
const ( CITATIONS = "citations" SAFETY = "safety" RoleSystem = "system" RoleModel = "model" RoleUser = "user" RoleTool = "tool" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Vertex ¶
Vertex is a type that represents a Vertex AI API client.
Right now, the Vertex Gemini SDK doesn't support embeddings; therefore, for embeddings we also hold a palmclient.
func (*Vertex) Call ¶
func (g *Vertex) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)
Call implements the llms.Model interface.
func (*Vertex) CreateEmbedding ¶
CreateEmbedding creates embeddings from texts.
func (*Vertex) GenerateContent ¶
func (g *Vertex) GenerateContent( ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption, ) (*llms.ContentResponse, error)
GenerateContent implements the llms.Model interface.
Click to show internal directories.
Click to hide internal directories.