Versions in this module Expand all Collapse all v0 v0.1.15 Oct 30, 2024 v0.1.14 Oct 30, 2024 Changes in this version + const RoleAssistant + const RoleSystem + const RoleTypeUser + type APIError struct + Message string + type Client struct + func NewClient(client httpClient, ...) *Client + func (c *Client) CreateEmbedding(ctx context.Context, texts *CreateEmbeddingRequest) (*CreateEmbeddingResponse, error) + func (c *Client) GenerateContent(ctx context.Context, request *GenerateContentRequest) (*GenerateContentResponse, error) + func (c *Client) Summarize(ctx context.Context, inputText string, maxLength int) (*SummarizeResponse, error) + type CreateEmbeddingRequest struct + Text []string + type CreateEmbeddingResponse struct + Result struct{ ... } + type GenerateContentRequest struct + Messages []Message + Stream bool + StreamingFunc func(ctx context.Context, chunk []byte) error + type GenerateContentResponse struct + Errors []APIError + Messages []string + Result struct{ ... } + Success bool + type Message struct + Content string + Role Role + type Role string + type StreamingResponse struct + P string + Response string + type SummarizeRequest struct + InputText string + MaxLength int + type SummarizeResponse struct + Result struct{ ... } + Success bool