File tree Expand file tree Collapse file tree 4 files changed +9
-6
lines changed
helm/chatgpt-mattermost-bot Expand file tree Collapse file tree 4 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ or when [running the docker image](#using-the-ready-made-docker-image) or when c
3737| PLUGINS | no | ` graph-plugin, image-plugin ` | The enabled plugins of the bot. By default all plugins (grpah-plugin and image-plugin) are enabled. |
3838| DEBUG_LEVEL | no | ` TRACE ` | a debug level used for logging activity, defaults to ` INFO ` |
3939| BOT_CONTEXT_MSG | no | ` 15 ` | The number of previous messages which are appended to the conversation with ChatGPT, defaults to 100 |
40+ | BOT_INSTRUCTION | no | ` Act like Elon Musk ` | Extra instruction to give your assistance. How should the assistant behave? |
4041
4142> ** Note**
4243> The ` YFILES_SERVER_URL ` is used for automatically converting text information created by the bot into diagrams.
Original file line number Diff line number Diff line change 1717 DEBUG_LEVEL : " {{ .Values.config.DEBUG_LEVEL | default " INFO" }}"
1818 BOT_CONTEXT_MSG : " {{ .Values.config.BOT_CONTEXT_MSG | default " 100" }}"
1919 NODE_ENV : " {{ .Values.config.NODE_ENV | default " production" }}"
20-
21-
20+ BOT_INSTRUCTION : " {{ .Values.config.BOT_INSTRUCTION | default " " }}"
Original file line number Diff line number Diff line change 33 repository : chatgpt-mattermost-bot
44 pullPolicy : IfNotPresent
55 # Overrides the image tag whose default is the chart appVersion.
6- tag : " v2.1.2 "
6+ tag : " "
77
88imagePullSecrets : []
99
@@ -26,6 +26,7 @@ config: # required: example: descriptio
2626 DEBUG_LEVEL : " " # no TRACE a debug level used for logging activity, defaults to INFO
2727 BOT_CONTEXT_MSG : " " # no 15 The number of previous messages which are appended to the conversation with ChatGPT, defaults to 100
2828 NODE_ENV : " " # no development The mode NodeJS runs in. Defaults to production
29+ BOT_INSTRUCTION : " " # no Act like Elon Musk Extra instruction to give your assistance. How should the assistant behave?
2930
3031
3132serviceAccount :
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ if (!global.FormData) {
2020
2121const name = process . env [ 'MATTERMOST_BOTNAME' ] || '@chatgpt'
2222const contextMsgCount = Number ( process . env [ 'BOT_CONTEXT_MSG' ] ?? 100 )
23+ const additionalBotInstructions = process . env [ 'BOT_INSTRUCTION' ] || "You are a helpful assistant. Whenever users asks you for help you will " +
24+ "provide them with succinct answers formatted using Markdown. You know the user's name as it is provided within the " +
25+ "meta data of the messages."
2326
2427/* List of all registered plugins */
2528const plugins : PluginBase < any > [ ] = [
@@ -30,9 +33,8 @@ const plugins: PluginBase<any>[] = [
3033]
3134
3235/* The main system instruction for GPT */
33- const botInstructions = "Your name is " + name + " and you are a helpful assistant. Whenever users asks you for help you will " +
34- "provide them with succinct answers formatted using Markdown. You know the user's name as it is provided within the " +
35- "meta data of the messages."
36+ const botInstructions = "Your name is " + name + ". " + additionalBotInstructions
37+ botLog . debug ( { botInstructions : botInstructions } )
3638
3739async function onClientMessage ( msg : WebSocketMessage < JSONMessageData > , meId : string ) {
3840 if ( msg . event !== 'posted' || ! meId ) {
You can’t perform that action at this time.
0 commit comments