Skip to content

Constants

See constants.py on GitHub

ACTIVE_CHANNEL_CUTOFF_HOURS = 2 module-attribute

How recent is active

BOT_NAME = 'PBot' module-attribute

Name the bot

DEFAULT_TOKEN_ENCODING = 'cl100k_base' module-attribute

(DEPRECATION WARNING) How to count tokens.

MESSAGE_HISTORY_CUTTOFF_HOURS = 8 module-attribute

'How old is irrelevent

OPENAI_MAX_TOKENS = 4097 module-attribute

(DEPRECATION WARNING) OpenAI max tokens. This is model dependant.

OPENAI_MODEL = 'gpt-3.5-turbo' module-attribute

(DEPRECATION WARNING) OpenAI model to use.

OPENAI_TEMP = 1 module-attribute

(DEPRECATION WARNING) Default model 'temperature' to use.

REDIS_CHANNEL_KEY_PREFIX = 'channel' module-attribute

Key-prefix for a channel

REDIS_MESSAGES_KEY = 'messages' module-attribute

Key for all messages

REDIS_MESSAGE_KEY_PREFIX = 'message' module-attribute

Key-prefix for a message

REDIS_PROMPT_KEY = 'prompt' module-attribute

(DEPRECATION WARNING)

REDIS_RESPONSES_KEY = 'responses' module-attribute

Key for all responses

REDIS_RESPONSE_KEY_PREFIX = 'response' module-attribute

Key-prefix for a response