Documentation
¶
Overview ¶
* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT
Index ¶
- type ConfigError
- type LLMManager
- type LLMManagerImpl
- func (m *LLMManagerImpl) GetAvailableProviders() []string
- func (m *LLMManagerImpl) GetClient(provider string, model string) (client.LLMClient, error)
- func (m *LLMManagerImpl) GetStackSpotAgentID() string
- func (m *LLMManagerImpl) GetStackSpotRealm() string
- func (m *LLMManagerImpl) GetTokenManager() (token.Manager, bool)
- func (m *LLMManagerImpl) SetStackSpotAgentID(agentID string)
- func (m *LLMManagerImpl) SetStackSpotRealm(realm string)
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.Manager, bool)
SetStackSpotRealm(realm string)
SetStackSpotAgentID(agentID string)
GetStackSpotRealm() string
GetStackSpotAgentID() string
}
LLMManager é a interface que define os métodos que o gerenciador de LLMs deve implementar
func NewLLMManager ¶
func NewLLMManager(logger *zap.Logger) (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) GetStackSpotAgentID ¶ added in v1.30.0
func (m *LLMManagerImpl) GetStackSpotAgentID() string
GetStackSpotAgentID retorna o agentID atual.
func (*LLMManagerImpl) GetStackSpotRealm ¶ added in v1.30.0
func (m *LLMManagerImpl) GetStackSpotRealm() string
GetStackSpotRealm retorna o realm atual.
func (*LLMManagerImpl) GetTokenManager ¶
func (m *LLMManagerImpl) GetTokenManager() (token.Manager, bool)
GetTokenManager retorna o TokenManager se ele estiver configurado.
func (*LLMManagerImpl) SetStackSpotAgentID ¶ added in v1.30.0
func (m *LLMManagerImpl) SetStackSpotAgentID(agentID string)
SetStackSpotAgentID atualiza o agentID em tempo de execução.
func (*LLMManagerImpl) SetStackSpotRealm ¶ added in v1.30.0
func (m *LLMManagerImpl) SetStackSpotRealm(realm string)
SetStackSpotRealm atualiza o realm em tempo de execução.