Documentation ¶
Index ¶
- func Client(apiKey string, req types.ChatArgs) (string, error)
- func StreamClient(apiKey string, req types.ChatArgs, chunkChan chan string)
- func StreamCompleteClient(apiKey string, req types.ChatArgs) (string, error)
- type ClientChatError
- type GroqChatArgs
- func (args GroqChatArgs) Chat(apiKey string, prompt string, assistant string) (string, error)
- func (params GroqChatArgs) StreamChat(apiKey string, prompt string, system string, ipcChan chan string)
- func (params GroqChatArgs) StreamCompleteChat(apiKey string, prompt string, system string) (string, error)
- type RateLimiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientChatError ¶
type ClientChatError struct {
// contains filtered or unexported fields
}
ChatError represents a chat-related error.
type GroqChatArgs ¶
func ChatGroq ¶
func ChatGroq(kwargs ...map[string]interface{}) GroqChatArgs
func (GroqChatArgs) StreamChat ¶
func (params GroqChatArgs) StreamChat(apiKey string, prompt string, system string, ipcChan chan string)
StreamChat sends a prompt to the stream chat client and returns the response.
func (GroqChatArgs) StreamCompleteChat ¶
func (params GroqChatArgs) StreamCompleteChat(apiKey string, prompt string, system string) (string, error)
StreamCompleteChat sends a prompt to the stream complete chat client and returns the response.
type RateLimiter ¶
RateLimiter is a simple rate limiter implementation
func (*RateLimiter) Wait ¶
func (r *RateLimiter) Wait()
Wait blocks until it's time to allow the next request
Click to show internal directories.
Click to hide internal directories.