Versions in this module Expand all Collapse all v0 v0.0.4 Sep 25, 2023 v0.0.3 Sep 21, 2023 v0.0.2 Sep 21, 2023 v0.0.1 Sep 19, 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 + 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) ([][]float64, error)