bot

package
v0.0.0-...-ae9b2c7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func New

func New(botAPI *tgbotapi.BotAPI, imagePredictor ImagePredictor) *Bot

func (*Bot) FetchAsync

func (bot *Bot) FetchAsync(ctx context.Context, config tgbotapi.UpdateConfig, ch chan *tgbotapi.Update)

func (*Bot) Start

func (b *Bot) Start(ctx context.Context)

func (*Bot) StartWorkers

func (b *Bot) StartWorkers(ctx context.Context, ch chan *tgbotapi.Update)

func (*Bot) Stop

func (b *Bot) Stop()

type ImagePredictor

type ImagePredictor interface {
	PredictImage(imageBytes []byte) (*model.Result, error)
	Stop() error
}

A ImagePredictor predicts the class of an image

Jump to

Keyboard shortcuts

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