Kumi
0acc1456f9
Introduced a configuration option to emulate tool usage in models that do not natively support tools, facilitating the use of such functionality without direct model support. This should benefit users aiming to leverage tool-based features without relying on specific AI models. Additionally, enhanced error logging in the GPTBot class by including traceback details, aiding in debugging and incident resolution. - Added `EmulateTools` option in the `config.dist.ini` for flexible tool handling. - Enriched error logging with stack traces in `bot.py` for better insight during failures.
210 lines
No EOL
6 KiB
INI
210 lines
No EOL
6 KiB
INI
# Copy this file to config.ini and replace the values below to match your needs
|
|
#
|
|
# The values that are not commented have to be set, everything else comes with
|
|
# sensible defaults.
|
|
|
|
###############################################################################
|
|
|
|
[GPTBot]
|
|
|
|
# Some way for the user to contact you.
|
|
# Ideally, either your personal user ID or a support room
|
|
# If this is your user ID and Debug is 1, any errors that occur when using the script will be reported to you in detail
|
|
#
|
|
Operator = Contact details not set
|
|
|
|
# Enable debug mode
|
|
# Will send error tracebacks to you (= Operator above) if an error occurs processing a message from you
|
|
# Defaults to 0 (= off)
|
|
#
|
|
# Debug = 1
|
|
|
|
# The default room name used by the !newroom command
|
|
# Defaults to GPTBot if not set
|
|
#
|
|
# DefaultRoomName = GPTBot
|
|
|
|
# Contents of a special message sent to the GPT API with every request.
|
|
# Can be used to give the bot some context about the environment it's running in
|
|
#
|
|
# SystemMessage = You are a helpful bot.
|
|
|
|
# Force inclusion of the SystemMessage defined above if one is defined on per-room level
|
|
# If no custom message is defined for the room, SystemMessage is always included
|
|
#
|
|
# ForceSystemMessage = 0
|
|
|
|
# Path to a custom logo
|
|
# Used as room/space image and profile picture
|
|
# Defaults to logo.png in assets directory
|
|
#
|
|
# Logo = assets/logo.png
|
|
|
|
# Display name for the bot
|
|
#
|
|
# DisplayName = GPTBot
|
|
|
|
# A list of allowed users
|
|
# If not defined, everyone is allowed to use the bot
|
|
# Use the "*:homeserver.matrix" syntax to allow everyone on a given homeserver
|
|
#
|
|
# AllowedUsers = ["*:matrix.local"]
|
|
|
|
# Minimum level of log messages that should be printed
|
|
# Available log levels in ascending order: trace, debug, info, warning, error, critical
|
|
# Defaults to info
|
|
#
|
|
LogLevel = info
|
|
|
|
###############################################################################
|
|
|
|
[OpenAI]
|
|
|
|
# The Chat Completion model you want to use.
|
|
#
|
|
# Unless you are in the GPT-4 beta (if you don't know - you aren't),
|
|
# leave this as the default value (gpt-3.5-turbo)
|
|
#
|
|
# Model = gpt-3.5-turbo
|
|
|
|
# The Image Generation model you want to use.
|
|
#
|
|
# ImageModel = dall-e-2
|
|
|
|
# Your OpenAI API key
|
|
#
|
|
# Find this in your OpenAI account:
|
|
# https://platform.openai.com/account/api-keys
|
|
#
|
|
APIKey = sk-yoursecretkey
|
|
|
|
# The maximum amount of input sent to the API
|
|
#
|
|
# In conjunction with MaxMessage, this determines how much context (= previous
|
|
# messages) you can send with your query.
|
|
#
|
|
# If you set this too high, the responses you receive will become shorter the
|
|
# longer the conversation gets.
|
|
#
|
|
# https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them
|
|
#
|
|
# MaxTokens = 3000
|
|
|
|
# The maximum number of messages in the room that will be considered as context
|
|
#
|
|
# By default, the last (up to) 20 messages will be sent as context, in addition
|
|
# to the system message and the current query itself.
|
|
#
|
|
# MaxMessages = 20
|
|
|
|
# The base URL of the OpenAI API
|
|
#
|
|
# Setting this allows you to use a self-hosted AI model for chat completions
|
|
# using something like https://github.com/abetlen/llama-cpp-python
|
|
#
|
|
# BaseURL = https://openai.local/v1
|
|
|
|
# Whether to force the use of tools in the chat completion model
|
|
#
|
|
# Currently, only gpt-3.5-turbo supports tools. If you set this to 1, the bot
|
|
# will use that model for tools even if you have a different model set as the
|
|
# default. It will only generate the final result using the default model.
|
|
#
|
|
# ForceTools = 0
|
|
|
|
# Whether to emulate tools in the chat completion model
|
|
#
|
|
# This will make the bot use the default model to *emulate* tools. This is
|
|
# useful if you want to use a model that doesn't support tools, but still want
|
|
# to be able to use tools. However, this may cause all kinds of weird results.
|
|
#
|
|
# EmulateTools = 0
|
|
|
|
###############################################################################
|
|
|
|
[WolframAlpha]
|
|
|
|
# An API key for Wolfram|Alpha
|
|
# Request one at https://developer.wolframalpha.com
|
|
#
|
|
# Leave unset to disable Wolfram|Alpha integration (`!gptbot calculate`)
|
|
#
|
|
#APIKey = YOUR-APIKEY
|
|
|
|
###############################################################################
|
|
|
|
[Matrix]
|
|
|
|
# The URL to your Matrix homeserver
|
|
#
|
|
# If you are using Pantalaimon, this should be the URL of your Pantalaimon
|
|
# instance, not the Matrix homeserver itself.
|
|
#
|
|
Homeserver = https://matrix.local
|
|
|
|
# An Access Token for the user your bot runs as
|
|
# Can be obtained using a request like this:
|
|
#
|
|
# See https://www.matrix.org/docs/guides/client-server-api#login
|
|
# for information on how to obtain this value
|
|
#
|
|
AccessToken = syt_yoursynapsetoken
|
|
|
|
# The Matrix user ID of the bot (@local:domain.tld)
|
|
# Only specify this if the bot fails to figure it out by itself
|
|
#
|
|
# UserID = @gptbot:matrix.local
|
|
|
|
###############################################################################
|
|
|
|
[Database]
|
|
|
|
# Path of the main database
|
|
# Used to "remember" settings, etc.
|
|
#
|
|
Path = database.db
|
|
|
|
# Path of the Crypto Store - required to support encrypted rooms
|
|
# (not tested/supported yet)
|
|
#
|
|
CryptoStore = store.db
|
|
|
|
###############################################################################
|
|
|
|
[TrackingMore]
|
|
|
|
# API key for TrackingMore
|
|
# If not defined, the bot will not be able to provide parcel tracking
|
|
#
|
|
# APIKey = abcde-fghij-klmnop
|
|
|
|
###############################################################################
|
|
|
|
[Replicate]
|
|
|
|
# API key for replicate.com
|
|
# Can be used to run lots of different AI models
|
|
# If not defined, the features that depend on it are not available
|
|
#
|
|
# APIKey = r8_alotoflettersandnumbershere
|
|
|
|
###############################################################################
|
|
|
|
[HuggingFace]
|
|
|
|
# API key for Hugging Face
|
|
# Can be used to run lots of different AI models
|
|
# If not defined, the features that depend on it are not available
|
|
#
|
|
# APIKey = __________________________
|
|
|
|
###############################################################################
|
|
|
|
[OpenWeatherMap]
|
|
|
|
# API key for OpenWeatherMap
|
|
# If not defined, the bot will be unable to provide weather information
|
|
#
|
|
# APIKey = __________________________
|
|
|
|
############################################################################### |