tweetseditor

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Editor

type Editor interface {
	Edit(ctx context.Context, tweets []common.Tweet, out chan string) error
	EditLongStory(ctx context.Context, tweets []common.Tweet, out chan string) (string, error)
	TranslateLongStory(ctx context.Context, content string) (string, error)
	Clean()
}

func NewEditor

func NewEditor(client *openai.Client, log log.Logger) Editor

type Manager added in v0.2.27

type Manager interface {
	Edit(ctx context.Context) context.Context
	SubscribeEdited() <-chan string
	SubscribeLongStoryMessages() <-chan string
	SubscribeRusStoryMessages() <-chan string
}

func NewManager added in v0.2.27

func NewManager(sendInterval time.Duration, cleanInterval time.Duration, editor Editor, repo repo, log log.Logger) Manager

type Tweet added in v0.0.4

type Tweet struct {
	Content   string `json:"telegram_message"`
	Link      string `json:"link"`
	Useful    bool   `json:"useful_information"`
	Duplicate bool   `json:"duplicate_information"`
}

Jump to

Keyboard shortcuts

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