Versions in this module Expand all Collapse all v0 v0.1.9 Feb 28, 2024 v0.1.8 Feb 27, 2024 v0.1.7 Feb 27, 2024 v0.1.6 Feb 27, 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() 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)