Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFeatureFlags ¶
func NewFeatureFlags() error
Types ¶
type AppConfig ¶
type AppConfig struct { Keywords []string `env:"APP_ANALYZER_KEYWORDS" env-default:"internship,opportunity,training,intern"` Version string `env:"APP_VERSION" env-default:"development"` }
func NewAppConfig ¶
type Flags ¶
type Flags struct { IsLabelerJobEnabled bool `env:"LABELER_JOB_ENABLED" env-default:"true"` IsAnalyzerJobEnabled bool `env:"ANALYZER_JOB_ENABLED" env-default:"true"` IsSummarizerJobEnabled bool `env:"SUMMARIZER_JOB_ENABLED" env-default:"true"` IsSenderJobEnabled bool `env:"SENDER_JOB_ENABLED" env-default:"true"` }
var (
FeatureFlags Flags
)
type GPT ¶
type GPT struct { // OpenAIKey is a secret key for performing authentication. You can get it from OpenAI. // // https://platform.openai.com/account/api-keys OpenAIKey string `env:"OPENAI_KEY" env-description:"OpenAI API Key" env-required:"true"` // MaxTokens is the maximum number of tokens to generate. Requests can use up to 2048 tokens shared between prompt and completion. // (One token is roughly 4 characters for normal English text) // // https://platform.openai.com/docs/api-reference/completions/create#completions/create-max_tokens MaxTokens int `env:"MAX_TOKENS" env-description:"Max tokens to use for completion" env-default:"70"` // FeedPrompts is a some kind of prompt to add before, after you real message. FeedPrompts struct { // BeforeMsg is a prompt to add before your message. BeforeMsg string `` /* 136-byte string literal not displayed */ // AfterMsg is a prompt to add after your message. AfterMsg string `` /* 204-byte string literal not displayed */ // ResponseExample is an example of a response from the internship program. ResponseExample string `` /* 237-byte string literal not displayed */ } }
func (*GPT) FeedPrompt ¶
type Gmail ¶
type Gmail struct { // CredentialsFile is a path to your credentials file for performing OAuth2 // authentication. You can get it from Google Cloud Console. // // https://console.cloud.google.com/apis/credentials // CredentialsFile string `env:"GMAIL_CREDENTIALS_FILE" env-description:"Path to your credentials file" env-default:"credentials.json"` // TokenFile is a path to your token file for performing OAuth2 // authentication. Will be used to store token after authentication and // refreshing access token automatically, when it expires. TokenFile string `env:"GMAIL_TOKEN_FILE" env-description:"Path to your token file" env-default:"token.json"` // LabelsLst is a list of labels that will be created in your Gmail account, // used for marking processed messages to avoid processing them again. LabelsLst []string `env:"GMAIL_LABELS" env-default:"i4u,intern:true,intern:false"` // L is a labels parsed after setup from yaml config file. L *LabelsMapper `yaml:"labels"` // MessagesLimit is a batch size for fetching messages from Gmail. MessagesLimit int64 `env:"GMAIL_MESSAGES_LIMIT" env-description:"Batch size for fetching messages" env-default:"2"` }
type LabelsMapper ¶
type LabelsMapper struct { I4U string `yaml:"i4u"` NotIntern string `yaml:"intern:false"` IsIntern string `yaml:"intern:true"` }
LabelsMapper is a struct that holds the labels mapping between the labels that will be created in your Gmail account, and the labels that will be used for marking processed messages to avoid processing them again.
func (*LabelsMapper) GetInternLabel ¶
func (l *LabelsMapper) GetInternLabel(isIntern bool) string
type Telegram ¶
type Telegram struct { ChatID int64 `env:"TG_CHAT_ID" env-description:"Telegram chat ID" env-required:"true"` AlertsChatID int64 `env:"TG_ALERTS_CHAT_ID" env-description:"Telegram alerts chat ID" env-required:"true"` Token string `env:"TG_TOKEN" env-description:"Telegram bot token" env-required:"true"` }
func NewTelegram ¶
Click to show internal directories.
Click to hide internal directories.