Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotInterface ¶ added in v0.3.0
type BotInterface interface {
HandleUpdateAsync(ctx context.Context, update json.RawMessage, remoteAddr string)
API() telegram.BotAPI
GetActiveSessions() ([]rag.ActiveSessionInfo, error)
ForceCloseSession(ctx context.Context, userID int64) (int, error)
ForceCloseSessionWithProgress(ctx context.Context, userID int64, onProgress rag.ProgressCallback) (*rag.ProcessingStats, error)
SendTestMessage(ctx context.Context, userID int64, text string, saveToHistory bool) (*rag.TestMessageResult, error)
}
BotInterface is an interface that abstracts the bot's functionality needed by the web server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(ctx context.Context, logger *slog.Logger, cfg *config.Config, factRepo storage.FactRepository, userRepo storage.UserRepository, statsRepo storage.StatsRepository, logRepo storage.LogRepository, topicRepo storage.TopicRepository, msgRepo storage.MessageRepository, factHistoryRepo storage.FactHistoryRepository, maintenanceRepo storage.MaintenanceRepository, bot BotInterface, rag *rag.Service) (*Server, error)
Click to show internal directories.
Click to hide internal directories.