manager

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 14 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)
}

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

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) GetTokenManager

func (m *LLMManagerImpl) GetTokenManager() (token.Manager, bool)

GetTokenManager retorna o TokenManager se ele estiver configurado.

Jump to

Keyboard shortcuts

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