Documentation
¶
Index ¶
- type HTTPModelService
- func (s *HTTPModelService) GetCurrentModel() string
- func (s *HTTPModelService) IsModelAvailable(modelID string) bool
- func (s *HTTPModelService) ListModels(ctx context.Context) ([]string, error)
- func (s *HTTPModelService) SelectModel(modelID string) error
- func (s *HTTPModelService) ValidateModel(modelID string) error
- type InMemoryConversationRepository
- func (r *InMemoryConversationRepository) AddMessage(msg domain.ConversationEntry) error
- func (r *InMemoryConversationRepository) Clear() error
- func (r *InMemoryConversationRepository) Export(format domain.ExportFormat) ([]byte, error)
- func (r *InMemoryConversationRepository) GetMessageCount() int
- func (r *InMemoryConversationRepository) GetMessages() []domain.ConversationEntry
- func (r *InMemoryConversationRepository) UpdateLastMessage(content string) error
- func (r *InMemoryConversationRepository) UpdateLastMessageToolCalls(toolCalls *[]sdk.ChatCompletionMessageToolCall) error
- type LLMToolService
- func (s *LLMToolService) ExecuteTool(ctx context.Context, name string, args map[string]interface{}) (string, error)
- func (s *LLMToolService) IsToolEnabled(name string) bool
- func (s *LLMToolService) ListTools() []domain.ToolDefinition
- func (s *LLMToolService) ValidateTool(name string, args map[string]interface{}) error
- type LocalFileService
- type ModelsResponse
- type NoOpToolService
- func (s *NoOpToolService) ExecuteTool(ctx context.Context, name string, args map[string]interface{}) (string, error)
- func (s *NoOpToolService) IsToolEnabled(name string) bool
- func (s *NoOpToolService) ListTools() []domain.ToolDefinition
- func (s *NoOpToolService) ValidateTool(name string, args map[string]interface{}) error
- type StreamingChatService
- type ToolResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPModelService ¶
type HTTPModelService struct {
// contains filtered or unexported fields
}
HTTPModelService implements ModelService using HTTP API calls
func NewHTTPModelService ¶
func NewHTTPModelService(baseURL, apiKey string) *HTTPModelService
NewHTTPModelService creates a new HTTP-based model service
func (*HTTPModelService) GetCurrentModel ¶
func (s *HTTPModelService) GetCurrentModel() string
func (*HTTPModelService) IsModelAvailable ¶
func (s *HTTPModelService) IsModelAvailable(modelID string) bool
func (*HTTPModelService) ListModels ¶
func (s *HTTPModelService) ListModels(ctx context.Context) ([]string, error)
func (*HTTPModelService) SelectModel ¶
func (s *HTTPModelService) SelectModel(modelID string) error
func (*HTTPModelService) ValidateModel ¶
func (s *HTTPModelService) ValidateModel(modelID string) error
type InMemoryConversationRepository ¶
type InMemoryConversationRepository struct {
// contains filtered or unexported fields
}
InMemoryConversationRepository implements ConversationRepository using in-memory storage
func NewInMemoryConversationRepository ¶
func NewInMemoryConversationRepository() *InMemoryConversationRepository
NewInMemoryConversationRepository creates a new in-memory conversation repository
func (*InMemoryConversationRepository) AddMessage ¶
func (r *InMemoryConversationRepository) AddMessage(msg domain.ConversationEntry) error
func (*InMemoryConversationRepository) Clear ¶
func (r *InMemoryConversationRepository) Clear() error
func (*InMemoryConversationRepository) Export ¶
func (r *InMemoryConversationRepository) Export(format domain.ExportFormat) ([]byte, error)
func (*InMemoryConversationRepository) GetMessageCount ¶
func (r *InMemoryConversationRepository) GetMessageCount() int
func (*InMemoryConversationRepository) GetMessages ¶
func (r *InMemoryConversationRepository) GetMessages() []domain.ConversationEntry
func (*InMemoryConversationRepository) UpdateLastMessage ¶
func (r *InMemoryConversationRepository) UpdateLastMessage(content string) error
func (*InMemoryConversationRepository) UpdateLastMessageToolCalls ¶
func (r *InMemoryConversationRepository) UpdateLastMessageToolCalls(toolCalls *[]sdk.ChatCompletionMessageToolCall) error
type LLMToolService ¶
type LLMToolService struct {
// contains filtered or unexported fields
}
LLMToolService implements ToolService with direct tool execution
func NewLLMToolService ¶
func NewLLMToolService(cfg *config.Config) *LLMToolService
NewLLMToolService creates a new LLM tool service
func (*LLMToolService) ExecuteTool ¶
func (*LLMToolService) IsToolEnabled ¶
func (s *LLMToolService) IsToolEnabled(name string) bool
func (*LLMToolService) ListTools ¶
func (s *LLMToolService) ListTools() []domain.ToolDefinition
func (*LLMToolService) ValidateTool ¶
func (s *LLMToolService) ValidateTool(name string, args map[string]interface{}) error
type LocalFileService ¶
type LocalFileService struct {
// contains filtered or unexported fields
}
LocalFileService implements FileService using local filesystem operations
func NewLocalFileService ¶
func NewLocalFileService() *LocalFileService
NewLocalFileService creates a new local file service
func (*LocalFileService) GetFileInfo ¶
func (s *LocalFileService) GetFileInfo(path string) (domain.FileInfo, error)
func (*LocalFileService) ListProjectFiles ¶
func (s *LocalFileService) ListProjectFiles() ([]string, error)
func (*LocalFileService) ReadFile ¶
func (s *LocalFileService) ReadFile(path string) (string, error)
func (*LocalFileService) ValidateFile ¶
func (s *LocalFileService) ValidateFile(path string) error
type ModelsResponse ¶
type ModelsResponse struct { Data []struct { ID string `json:"id"` Object string `json:"object"` } `json:"data"` }
ModelsResponse represents the API response for listing models
type NoOpToolService ¶
type NoOpToolService struct{}
NoOpToolService implements ToolService as a no-op (when tools are disabled)
func NewNoOpToolService ¶
func NewNoOpToolService() *NoOpToolService
NewNoOpToolService creates a new no-op tool service
func (*NoOpToolService) ExecuteTool ¶
func (*NoOpToolService) IsToolEnabled ¶
func (s *NoOpToolService) IsToolEnabled(name string) bool
func (*NoOpToolService) ListTools ¶
func (s *NoOpToolService) ListTools() []domain.ToolDefinition
func (*NoOpToolService) ValidateTool ¶
func (s *NoOpToolService) ValidateTool(name string, args map[string]interface{}) error
type StreamingChatService ¶
type StreamingChatService struct {
// contains filtered or unexported fields
}
StreamingChatService implements ChatService using streaming SDK client
func NewStreamingChatService ¶
func NewStreamingChatService(baseURL, apiKey string, timeoutSeconds int, toolService domain.ToolService) *StreamingChatService
NewStreamingChatService creates a new streaming chat service
func (*StreamingChatService) CancelRequest ¶
func (s *StreamingChatService) CancelRequest(requestID string) error
func (*StreamingChatService) GetMetrics ¶
func (s *StreamingChatService) GetMetrics(requestID string) *domain.ChatMetrics