Versions in this module Expand all Collapse all v1 v1.0.12 Sep 1, 2024 v1.0.11 Sep 1, 2024 v1.0.10 Sep 1, 2024 v1.0.9 Sep 1, 2024 v1.0.8 Sep 1, 2024 v1.0.7 Sep 1, 2024 v1.0.6 Sep 1, 2024 v1.0.5 Aug 31, 2024 v1.0.4 Aug 31, 2024 v1.0.3 Aug 31, 2024 Changes in this version + const ChatModelName + const TextModelName + var ErrEmptyResponse = errors.New("empty response") + var ErrInvalidValue = errors.New("invalid value") + var ErrMissingValue = errors.New("missing value") + type ChatMessage struct + Author string + Content string + func (m ChatMessage) GetContent() string + func (m ChatMessage) GetType() llms.ChatMessageType + type ChatRequest struct + CandidateCount int + Context string + Messages []*ChatMessage + Temperature float64 + TopK int + TopP int + type ChatResponse struct + Candidates []ChatMessage + type Completion struct + Text string + type CompletionRequest struct + MaxTokens int + Prompts []string + StopSequences []string + Temperature float64 + TopK int + TopP int + type EmbeddingRequest struct + Input []string + type PaLMClient struct + func New(ctx context.Context, projectID, location string, opts ...option.ClientOption) (*PaLMClient, error) + func (c *PaLMClient) CreateChat(ctx context.Context, r *ChatRequest) (*ChatResponse, error) + func (c *PaLMClient) CreateCompletion(ctx context.Context, r *CompletionRequest) ([]*Completion, error) + func (c *PaLMClient) CreateEmbedding(ctx context.Context, r *EmbeddingRequest) ([][]float32, error)