Versions in this module Expand all Collapse all v0 v0.1.0 Dec 14, 2024 Changes in this version + const MessageRoleAssistant + const MessageRoleSystem + const MessageRoleUser + type ChatCompletionConfig struct + FrequencyPenalty float64 + MaxTokens int + PresencePenalty float64 + ResponseFormat struct{ ... } + Seed int + Stop []string + Stream bool + Temperature float64 + TopP float64 + User string + type ChatCompletionRequest struct + FrequencyPenalty float64 + MaxTokens int + Messages []Message + Model string + PresencePenalty float64 + ResponseFormat struct{ ... } + Seed int + Stop []string + Stream bool + Temperature float64 + TopP float64 + User string + type ChatCompletionResponse struct + Choices []struct{ ... } + Created int + ID string + Model string + Object string + SystemFingerprint string + Usage struct{ ... } + XGroq struct{ ... } + type Conversation struct + func NewConversation(systemPrompt string) *Conversation + func (c *Conversation) AddMessages(messages ...Message) + func (c *Conversation) ClearHistory() + func (c *Conversation) Complete(g *GroqClient, model string, config *ChatCompletionConfig) (ChatCompletionResponse, error) + type GroqClient struct + func NewGroqClient(apiKey string) (*GroqClient, error) + func (g *GroqClient) GetModel(modelId string) (Model, error) + func (g *GroqClient) GetModels() ([]Model, error) + func (g *GroqClient) TranscribeAudio(filename string, model string, config *TranscriptionConfig) (Transcription, error) + func (g *GroqClient) TranslateAudio(filename string, model string, config *TranslationConfig) (Transcription, error) + type Message struct + Content string + Role string + type Model struct + Active bool + ContextWindow int + Created int + Id string + Object string + OwnedBy string + type Transcription struct + Duration float64 + Language string + Segments []transcriptionSegment + Task string + Text string + XGroq struct{ ... } + type TranscriptionConfig struct + Language string + Prompt string + ResponseFormat string + Temperature float64 + type TranslationConfig struct + Prompt string + ResponseFormat string + Temperature float64