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, topicRepo storage.TopicRepository, msgRepo storage.MessageRepository, factHistoryRepo storage.FactHistoryRepository, maintenanceRepo storage.MaintenanceRepository, bot BotInterface, rag *rag.Service) (*Server, error)
func (*Server) SetAgentLogRepo ¶ added in v0.4.8
func (s *Server) SetAgentLogRepo(repo storage.AgentLogRepository)
SetAgentLogRepo sets the agent log repository (used for debug UI)
func (*Server) SetPeopleRepository ¶ added in v0.5.1
func (s *Server) SetPeopleRepository(repo storage.PeopleRepository)
SetPeopleRepository sets the people repository (v0.5.1)
type TopicWithMessages ¶ added in v0.5.1
type TopicWithMessages struct {
storage.TopicExtended
Messages []storage.Message
}
TopicWithMessages extends TopicExtended with loaded messages for UI display.
Click to show internal directories.
Click to hide internal directories.