telegram

package
v0.0.0-...-66bbac4 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(ctx context.Context)

Types

type TelegramWriter

type TelegramWriter struct {
	Context context.Context
	Prompt  string
	Bot     *tgbotapi.BotAPI
	ChatID  int64
	Type    string
	ReplyID int
	Message *memory.Message
	// contains filtered or unexported fields
}

func NewTelegramWriter

func NewTelegramWriter(ctx context.Context, msg *memory.Message, reply bool, prompt ...string) *TelegramWriter

func (*TelegramWriter) Close

func (w *TelegramWriter) Close() error

func (*TelegramWriter) Flush

func (w *TelegramWriter) Flush()

func (*TelegramWriter) GetObjects

func (*TelegramWriter) Header

func (w *TelegramWriter) Header() http.Header

func (*TelegramWriter) SetPreWriteCallback

func (w *TelegramWriter) SetPreWriteCallback(fn func())

func (*TelegramWriter) SetPrompt

func (w *TelegramWriter) SetPrompt(prompt string)

func (*TelegramWriter) Write

func (w *TelegramWriter) Write(p []byte) (n int, err error)

func (*TelegramWriter) WriteHeader

func (w *TelegramWriter) WriteHeader(int)

func (*TelegramWriter) WriteObject

Jump to

Keyboard shortcuts

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