Versions in this module Expand all Collapse all v0 v0.1.3 Jan 4, 2024 v0.1.2 Dec 28, 2023 v0.1.2-pre Dec 28, 2023 v0.1.2-alpha.1 Dec 29, 2023 v0.1.2-alpha.0 Dec 29, 2023 v0.1.2-alpha Dec 28, 2023 v0.1.1 Dec 20, 2023 v0.1.0 Dec 13, 2023 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() schema.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(projectID 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)