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 ConfigError ¶
type ConfigError struct {
Mensagem string
}
ConfigError representa um erro de configuração, como variáveis de ambiente ausentes
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
Error implementa a interface de erro para ConfigError
type LLMManager ¶
type LLMManager interface {
GetClient(provider string, model string) (client.LLMClient, error)
GetAvailableProviders() []string
GetTokenManager() (*token.TokenManager, bool)
}
LLMManager é a interface que define os métodos que o gerenciador de LLMs deve implementar
func NewLLMManager ¶
func NewLLMManager(logger *zap.Logger, slugName, tenantName string) (LLMManager, error)
NewLLMManager cria uma nova instância de LLMManagerImpl.
type LLMManagerImpl ¶
type LLMManagerImpl struct {
// contains filtered or unexported fields
}
LLMManagerImpl gerencia diferentes clientes LLM e o TokenManager
func (*LLMManagerImpl) GetAvailableProviders ¶
func (m *LLMManagerImpl) GetAvailableProviders() []string
GetAvailableProviders retorna uma lista de provedores disponíveis configurados
func (*LLMManagerImpl) GetClient ¶
GetClient retorna um cliente LLM com base no provedor e no modelo especificados.
func (*LLMManagerImpl) GetTokenManager ¶
func (m *LLMManagerImpl) GetTokenManager() (*token.TokenManager, bool)
GetTokenManager retorna o TokenManager se ele estiver configurado.