manager

package
v1.44.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 20 Imported by: 0

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.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

func (m *LLMManagerImpl) GetClient(provider string, model string) (client.LLMClient, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL