cmd

package
v0.0.0-...-407f28a Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package cmd contains commands for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Run

type Run struct {
	Bot struct {
		Timeout time.Duration `long:"timeout" env:"TIMEOUT" default:"6m" description:"timeout for requests"`

		Telegram struct {
			Token string `long:"token" env:"TOKEN" description:"telegram token"`
		} `group:"telegram" namespace:"telegram" env-namespace:"TELEGRAM"`

		AdminIDs  []string `long:"admin-ids" env:"ADMIN_IDS" description:"admin IDs"`
		AuthToken string   `long:"auth-token" env:"AUTH_TOKEN" description:"token for authorizing requests"`
	} `group:"bot" namespace:"bot" env-namespace:"BOT"`

	Revisor struct {
		OpenAI struct {
			Token     string        `long:"token" env:"TOKEN" description:"OpenAI token"`
			MaxTokens int           `long:"max-tokens" env:"MAX_TOKENS" default:"1000" description:"max tokens for OpenAI"`
			Timeout   time.Duration `long:"timeout" env:"TIMEOUT" default:"5m" description:"timeout for OpenAI calls"`
		} `group:"openai" namespace:"openai" env-namespace:"OPENAI"`
	} `group:"revisor" namespace:"revisor" env-namespace:"REVISOR"`

	StorePath string `long:"store-path" env:"STORE_PATH" description:"parent dir for bolt files"`
}

Run is a command to run the bot.

func (Run) Execute

func (r Run) Execute(_ []string) error

Execute runs the command.

Jump to

Keyboard shortcuts

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