configs

package
v0.0.0-...-b336c4c Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "unknown version"
	BuildTime = "unknown time"
)

Functions

This section is empty.

Types

type ChatConfig

type ChatConfig struct {
	ChatID           []int64       `json:"chat_id"`
	MaxHistoryLength int           `json:"max_history_length"`
	MaxHistoryTokens int           `json:"max_history_tokens"`
	Params           ChatGPTParams `json:"params"`
}

type ChatGPTParams

type ChatGPTParams struct {
	InitMessage string         `json:"init_message"`
	ExtraParams map[string]any `json:"extra_params"`
}

type Config

type Config struct {
	OpenAI   OpenAI   `json:"openai"`
	Telegram Telegram `json:"telegram"`
	Database Database `json:"database"`
}

func NewConfig

func NewConfig(path string) ([]*Config, error)

type Database

type Database struct {
	Type string `json:"type"`
	Path string `json:"path"`
}

type OpenAI

type OpenAI struct {
	Key   string `json:"key"`
	Model string `json:"model"`
}

type Telegram

type Telegram struct {
	Token         string       `json:"token"`
	Admin         []int64      `json:"admin"`
	AvailableChat []ChatConfig `json:"available_chat"`
}

Jump to

Keyboard shortcuts

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