reply

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatGptClient added in v0.2.3

type ChatGptClient interface {
	Ask(message *telebot.Message) string
}

ChatGptClient defines an interface for interacting with ChatGPT

type ImageMetadataDescription added in v0.10.11

type ImageMetadataDescription struct {
	Model       string   `json:"model"`
	Description string   `json:"description"`
	VisibleText string   `json:"visible_text"`
	MemeOrJoke  string   `json:"meme_or_joke"`
	Tags        []string `json:"tags"`
}

type RandomGenerator added in v0.2.3

type RandomGenerator interface {
	// Intn returns a random int in [0,n)
	Intn(n int) int
}

RandomGenerator defines an interface for random number generation

type RealChatGptClient added in v0.2.3

type RealChatGptClient struct{}

RealChatGptClient implements ChatGptClient using the actual OpenAI API

func (*RealChatGptClient) Ask added in v0.2.3

func (c *RealChatGptClient) Ask(message *telebot.Message) string

type RealRandomGenerator added in v0.2.3

type RealRandomGenerator struct {
	// contains filtered or unexported fields
}

RealRandomGenerator implements RandomGenerator using the standard library

func NewRealRandomGenerator added in v0.2.3

func NewRealRandomGenerator() *RealRandomGenerator

func (*RealRandomGenerator) Intn added in v0.2.3

func (r *RealRandomGenerator) Intn(n int) int

type ReplyPlugin

type ReplyPlugin struct {
	// contains filtered or unexported fields
}

func (*ReplyPlugin) Process

func (p *ReplyPlugin) Process(message *telebot.Message)

func (*ReplyPlugin) SetDependencies added in v0.2.3

func (p *ReplyPlugin) SetDependencies(random RandomGenerator, chatClient ChatGptClient)

SetDependencies allows injecting dependencies for testing

func (*ReplyPlugin) Start

func (p *ReplyPlugin) Start(_ interface{})

type ResolvedImageTarget added in v0.9.0

type ResolvedImageTarget struct {
	ChatID    int64
	MessageID int
	FileID    string
	Source    string
	Width     int
	Height    int
}

Jump to

Keyboard shortcuts

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