Documentation
¶
Overview ¶
* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAIClient ¶
type OpenAIClient struct {
// contains filtered or unexported fields
}
OpenAIClient implementa o cliente para interagir com a API da OpenAI
func NewOpenAIClient ¶
func NewOpenAIClient(apiKey, model string, logger *zap.Logger, maxAttempts int, backoff time.Duration) *OpenAIClient
NewOpenAIClient cria uma nova instância de OpenAIClient.
func (*OpenAIClient) GetModelName ¶
func (c *OpenAIClient) GetModelName() string
GetModelName retorna o nome do modelo de linguagem utilizado pelo cliente.
func (*OpenAIClient) SendPrompt ¶
func (c *OpenAIClient) SendPrompt(ctx context.Context, prompt string, history []models.Message) (string, error)
SendPrompt envia um prompt para o modelo de linguagem e retorna a resposta.
Click to show internal directories.
Click to hide internal directories.