2023-04-17 20:28:29 +00:00
|
|
|
|
# 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.
|
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
[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
|
feat: Expand bot usage control and API support
Enhanced bot flexibility by enabling the specification of room IDs in the allowed users' list, broadening access control capabilities. This change allows for more granular control over who can interact with the bot, particularly useful in scenarios where the bot's usage needs to be restricted to specific rooms. Additionally, updated documentation and configurations reflect the inclusion of new AI models and self-hosted API support, catering to a wider range of use cases and setups. The README.md and config.dist.ini files have been updated to offer clearer guidance on setup, configuration, and troubleshooting, aiming to improve user experience and ease of deployment.
- Introduced the ability for room-specific bot access, enhancing user and room management flexibility.
- Expanded AI model support, including `gpt-4o` and `ollama`, increases the bot's versatility and application scenarios.
- Updated Python version compatibility to 3.12 to ensure users are leveraging the latest language features and improvements.
- Improved troubleshooting documentation to assist users in resolving common issues more efficiently.
2024-05-16 05:24:34 +00:00
|
|
|
|
# If not defined, everyone is allowed to use the bot (so you should really define this)
|
2023-05-25 12:41:32 +00:00
|
|
|
|
# Use the "*:homeserver.matrix" syntax to allow everyone on a given homeserver
|
feat: Expand bot usage control and API support
Enhanced bot flexibility by enabling the specification of room IDs in the allowed users' list, broadening access control capabilities. This change allows for more granular control over who can interact with the bot, particularly useful in scenarios where the bot's usage needs to be restricted to specific rooms. Additionally, updated documentation and configurations reflect the inclusion of new AI models and self-hosted API support, catering to a wider range of use cases and setups. The README.md and config.dist.ini files have been updated to offer clearer guidance on setup, configuration, and troubleshooting, aiming to improve user experience and ease of deployment.
- Introduced the ability for room-specific bot access, enhancing user and room management flexibility.
- Expanded AI model support, including `gpt-4o` and `ollama`, increases the bot's versatility and application scenarios.
- Updated Python version compatibility to 3.12 to ensure users are leveraging the latest language features and improvements.
- Improved troubleshooting documentation to assist users in resolving common issues more efficiently.
2024-05-16 05:24:34 +00:00
|
|
|
|
# Alternatively, you can also specify a room ID to allow everyone in the room to use the bot within that room
|
2023-05-25 12:41:32 +00:00
|
|
|
|
#
|
feat: Expand bot usage control and API support
Enhanced bot flexibility by enabling the specification of room IDs in the allowed users' list, broadening access control capabilities. This change allows for more granular control over who can interact with the bot, particularly useful in scenarios where the bot's usage needs to be restricted to specific rooms. Additionally, updated documentation and configurations reflect the inclusion of new AI models and self-hosted API support, catering to a wider range of use cases and setups. The README.md and config.dist.ini files have been updated to offer clearer guidance on setup, configuration, and troubleshooting, aiming to improve user experience and ease of deployment.
- Introduced the ability for room-specific bot access, enhancing user and room management flexibility.
- Expanded AI model support, including `gpt-4o` and `ollama`, increases the bot's versatility and application scenarios.
- Updated Python version compatibility to 3.12 to ensure users are leveraging the latest language features and improvements.
- Improved troubleshooting documentation to assist users in resolving common issues more efficiently.
2024-05-16 05:24:34 +00:00
|
|
|
|
# AllowedUsers = ["*:matrix.local", "!roomid:matrix.local"]
|
2023-05-25 12:41:32 +00:00
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
|
|
2023-04-16 14:08:57 +00:00
|
|
|
|
[OpenAI]
|
2023-04-17 20:28:29 +00:00
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
2023-11-07 13:02:10 +00:00
|
|
|
|
# The Image Generation model you want to use.
|
|
|
|
|
#
|
|
|
|
|
# ImageModel = dall-e-2
|
|
|
|
|
|
2023-04-17 20:28:29 +00:00
|
|
|
|
# Your OpenAI API key
|
|
|
|
|
#
|
|
|
|
|
# Find this in your OpenAI account:
|
|
|
|
|
# https://platform.openai.com/account/api-keys
|
|
|
|
|
#
|
feat: Expand bot usage control and API support
Enhanced bot flexibility by enabling the specification of room IDs in the allowed users' list, broadening access control capabilities. This change allows for more granular control over who can interact with the bot, particularly useful in scenarios where the bot's usage needs to be restricted to specific rooms. Additionally, updated documentation and configurations reflect the inclusion of new AI models and self-hosted API support, catering to a wider range of use cases and setups. The README.md and config.dist.ini files have been updated to offer clearer guidance on setup, configuration, and troubleshooting, aiming to improve user experience and ease of deployment.
- Introduced the ability for room-specific bot access, enhancing user and room management flexibility.
- Expanded AI model support, including `gpt-4o` and `ollama`, increases the bot's versatility and application scenarios.
- Updated Python version compatibility to 3.12 to ensure users are leveraging the latest language features and improvements.
- Improved troubleshooting documentation to assist users in resolving common issues more efficiently.
2024-05-16 05:24:34 +00:00
|
|
|
|
# This may not be required for self-hosted models – in that case, just leave it
|
|
|
|
|
# as it is.
|
|
|
|
|
#
|
2023-04-16 14:08:57 +00:00
|
|
|
|
APIKey = sk-yoursecretkey
|
|
|
|
|
|
2023-04-17 20:28:29 +00:00
|
|
|
|
# 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
|
|
|
|
|
|
2023-05-31 18:21:07 +00:00
|
|
|
|
# The base URL of the OpenAI API
|
|
|
|
|
#
|
|
|
|
|
# Setting this allows you to use a self-hosted AI model for chat completions
|
feat: Expand bot usage control and API support
Enhanced bot flexibility by enabling the specification of room IDs in the allowed users' list, broadening access control capabilities. This change allows for more granular control over who can interact with the bot, particularly useful in scenarios where the bot's usage needs to be restricted to specific rooms. Additionally, updated documentation and configurations reflect the inclusion of new AI models and self-hosted API support, catering to a wider range of use cases and setups. The README.md and config.dist.ini files have been updated to offer clearer guidance on setup, configuration, and troubleshooting, aiming to improve user experience and ease of deployment.
- Introduced the ability for room-specific bot access, enhancing user and room management flexibility.
- Expanded AI model support, including `gpt-4o` and `ollama`, increases the bot's versatility and application scenarios.
- Updated Python version compatibility to 3.12 to ensure users are leveraging the latest language features and improvements.
- Improved troubleshooting documentation to assist users in resolving common issues more efficiently.
2024-05-16 05:24:34 +00:00
|
|
|
|
# using something like llama-cpp-python or ollama
|
2023-05-31 18:21:07 +00:00
|
|
|
|
#
|
|
|
|
|
# BaseURL = https://openai.local/v1
|
|
|
|
|
|
2023-11-28 17:15:21 +00:00
|
|
|
|
# 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
|
|
|
|
|
|
2023-12-29 21:46:19 +00:00
|
|
|
|
# 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
|
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
2023-04-28 10:01:27 +00:00
|
|
|
|
[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
|
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
2023-04-16 14:08:57 +00:00
|
|
|
|
[Matrix]
|
2023-04-17 20:28:29 +00:00
|
|
|
|
|
|
|
|
|
# The URL to your Matrix homeserver
|
|
|
|
|
#
|
2023-12-05 09:09:14 +00:00
|
|
|
|
# If you are using Pantalaimon, this should be the URL of your Pantalaimon
|
|
|
|
|
# instance, not the Matrix homeserver itself.
|
|
|
|
|
#
|
2023-04-16 14:08:57 +00:00
|
|
|
|
Homeserver = https://matrix.local
|
2023-04-17 20:28:29 +00:00
|
|
|
|
|
|
|
|
|
# An Access Token for the user your bot runs as
|
|
|
|
|
#
|
|
|
|
|
# See https://www.matrix.org/docs/guides/client-server-api#login
|
|
|
|
|
# for information on how to obtain this value
|
|
|
|
|
#
|
2023-04-16 14:08:57 +00:00
|
|
|
|
AccessToken = syt_yoursynapsetoken
|
2023-04-17 20:28:29 +00:00
|
|
|
|
|
2024-04-23 16:05:50 +00:00
|
|
|
|
# Instead of an Access Token, you can also use a User ID and password
|
|
|
|
|
# to log in. Upon first run, the bot will automatically turn this into
|
|
|
|
|
# an Access Token and store it in the config file, and remove the
|
|
|
|
|
# password from the config file.
|
|
|
|
|
#
|
|
|
|
|
# This is particularly useful if you are using Pantalaimon, where this
|
|
|
|
|
# is the only (easy) way to generate an Access Token.
|
2023-04-17 20:28:29 +00:00
|
|
|
|
#
|
|
|
|
|
# UserID = @gptbot:matrix.local
|
2024-04-23 16:05:50 +00:00
|
|
|
|
# Password = yourpassword
|
|
|
|
|
|
2023-04-17 20:28:29 +00:00
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
2023-05-09 12:32:35 +00:00
|
|
|
|
|
2023-04-17 20:28:29 +00:00
|
|
|
|
[Database]
|
|
|
|
|
|
2023-05-25 07:28:28 +00:00
|
|
|
|
# Path of the main database
|
|
|
|
|
# Used to "remember" settings, etc.
|
|
|
|
|
#
|
2023-04-28 10:01:27 +00:00
|
|
|
|
Path = database.db
|
2023-05-05 11:58:57 +00:00
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
2023-05-05 11:58:57 +00:00
|
|
|
|
[TrackingMore]
|
|
|
|
|
|
|
|
|
|
# API key for TrackingMore
|
|
|
|
|
# If not defined, the bot will not be able to provide parcel tracking
|
|
|
|
|
#
|
2023-05-25 07:28:28 +00:00
|
|
|
|
# APIKey = abcde-fghij-klmnop
|
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
2023-05-25 07:28:28 +00:00
|
|
|
|
[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
|
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
2023-05-25 07:28:28 +00:00
|
|
|
|
[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
|
|
|
|
|
#
|
2023-05-25 12:41:32 +00:00
|
|
|
|
# APIKey = __________________________
|
|
|
|
|
|
2023-11-28 17:15:21 +00:00
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
|
|
[OpenWeatherMap]
|
|
|
|
|
|
|
|
|
|
# API key for OpenWeatherMap
|
|
|
|
|
# If not defined, the bot will be unable to provide weather information
|
|
|
|
|
#
|
|
|
|
|
# APIKey = __________________________
|
|
|
|
|
|
2023-05-25 12:41:32 +00:00
|
|
|
|
###############################################################################
|