Documentation
¶
Index ¶
- Variables
- func ConvertOggToMP3(oggData []byte) ([]byte, error)
- type ChannelInfo
- type ChatService
- func (s *ChatService) GetCurrentModelForChat(ctx context.Context, chatID int64, userID int64, name string) (*ai.ModelInfo, error)
- func (s *ChatService) GetCurrentModelSpec(ctx context.Context, chatID int64) (string, error)
- func (s *ChatService) MergeModelParams(chatID int64, provider, alias, prompt string, requestParams ai.ModelParams) (ai.ModelParams, error)
- func (s *ChatService) ResetChatModel(ctx context.Context, chatID int64) error
- func (s *ChatService) SetChatModel(ctx context.Context, chatID int64, modelSpec string) error
- type CurrencyService
- type DuckDuckGoSearch
- type ImageResult
- type Localizer
- type TelegramAPI
- func (t *TelegramAPI) Auth(ctx context.Context, phone, password string, ...) error
- func (t *TelegramAPI) AuthIfNeeded(ctx context.Context, phone, password string, ...) error
- func (t *TelegramAPI) GetChannelByID(ctx context.Context, channelID int64) (*ChannelInfo, error)
- func (t *TelegramAPI) GetChannelPosts(ctx context.Context, channelName string, since time.Time, limit int, ...) ([]string, error)
- func (t *TelegramAPI) GetPostComments(ctx context.Context, channelInput string, postID int, limit int) ([]string, error)
- func (t *TelegramAPI) ResolveChannel(ctx context.Context, channelName string) (*ChannelInfo, error)
- func (t *TelegramAPI) ResolveChannelInput(ctx context.Context, input string) (*ChannelInfo, error)
- type TextResult
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrVQDNotFound = errors.New("could not extract vqd")
)
Functions ¶
func ConvertOggToMP3 ¶
Types ¶
type ChannelInfo ¶
func (*ChannelInfo) GetShareID ¶
func (c *ChannelInfo) GetShareID() string
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
func NewChatService ¶
func NewChatService(db database.Database, registry *ai.ProviderRegistry, cfg *config.Config) *ChatService
func (*ChatService) GetCurrentModelForChat ¶
func (*ChatService) GetCurrentModelSpec ¶
func (*ChatService) MergeModelParams ¶
func (s *ChatService) MergeModelParams(chatID int64, provider, alias, prompt string, requestParams ai.ModelParams) (ai.ModelParams, error)
func (*ChatService) ResetChatModel ¶
func (s *ChatService) ResetChatModel(ctx context.Context, chatID int64) error
func (*ChatService) SetChatModel ¶
type CurrencyService ¶
type CurrencyService struct {
// contains filtered or unexported fields
}
func GetCurrencyService ¶
func GetCurrencyService() *CurrencyService
func (*CurrencyService) GetUSDRate ¶
type DuckDuckGoSearch ¶
type DuckDuckGoSearch struct {
// contains filtered or unexported fields
}
func NewDuckDuckGoSearch ¶
func NewDuckDuckGoSearch(client *http.Client, rateLimit time.Duration) *DuckDuckGoSearch
func (*DuckDuckGoSearch) Text ¶
func (d *DuckDuckGoSearch) Text( keywords string, region string, timeLimit string, maxResults int, ) ([]TextResult, error)
type ImageResult ¶
type Localizer ¶
type Localizer struct {
// contains filtered or unexported fields
}
func NewLocalizer ¶
type TelegramAPI ¶
type TelegramAPI struct {
// contains filtered or unexported fields
}
func GetTD ¶
func GetTD() *TelegramAPI
func InitTDInstance ¶
func InitTDInstance(cfg config.TelegramConfig, cache cache.Cache, logger logger.Logger) *TelegramAPI
func NewTelegramAPI ¶
func (*TelegramAPI) Auth ¶
func (t *TelegramAPI) Auth(ctx context.Context, phone, password string, codePromptFunc auth.CodeAuthenticatorFunc) error
func (*TelegramAPI) AuthIfNeeded ¶
func (t *TelegramAPI) AuthIfNeeded(ctx context.Context, phone, password string, codePromptFunc auth.CodeAuthenticatorFunc) error
func (*TelegramAPI) GetChannelByID ¶
func (t *TelegramAPI) GetChannelByID(ctx context.Context, channelID int64) (*ChannelInfo, error)
func (*TelegramAPI) GetChannelPosts ¶
func (t *TelegramAPI) GetChannelPosts( ctx context.Context, channelName string, since time.Time, limit int, offset int, ) ([]string, error)
GetChannelPosts retrieves messages from a channel for the specified period
func (*TelegramAPI) GetPostComments ¶
func (*TelegramAPI) ResolveChannel ¶
func (t *TelegramAPI) ResolveChannel(ctx context.Context, channelName string) (*ChannelInfo, error)
func (*TelegramAPI) ResolveChannelInput ¶
func (t *TelegramAPI) ResolveChannelInput(ctx context.Context, input string) (*ChannelInfo, error)
ResolveChannelInput automatically resolves channel information and cached it Supported formats: - Post URL ("https://t.me/channel/123") - Username + post ID ("channel", 123) - Channel ID + post ID (123456, 123)
type TextResult ¶
Click to show internal directories.
Click to hide internal directories.