File tree 4 files changed +9
-6
lines changed
helm/chatgpt-mattermost-bot
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
37
37
| PLUGINS | no | ` graph-plugin, image-plugin ` | The enabled plugins of the bot. By default all plugins (grpah-plugin and image-plugin) are enabled. |
38
38
| DEBUG_LEVEL | no | ` TRACE ` | a debug level used for logging activity, defaults to ` INFO ` |
39
39
| 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? |
40
41
41
42
> ** Note**
42
43
> 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 17
17
DEBUG_LEVEL : " {{ .Values.config.DEBUG_LEVEL | default " INFO" }}"
18
18
BOT_CONTEXT_MSG : " {{ .Values.config.BOT_CONTEXT_MSG | default " 100" }}"
19
19
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 3
3
repository : chatgpt-mattermost-bot
4
4
pullPolicy : IfNotPresent
5
5
# Overrides the image tag whose default is the chart appVersion.
6
- tag : " v2.1.2 "
6
+ tag : " "
7
7
8
8
imagePullSecrets : []
9
9
@@ -26,6 +26,7 @@ config: # required: example: descriptio
26
26
DEBUG_LEVEL : " " # no TRACE a debug level used for logging activity, defaults to INFO
27
27
BOT_CONTEXT_MSG : " " # no 15 The number of previous messages which are appended to the conversation with ChatGPT, defaults to 100
28
28
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?
29
30
30
31
31
32
serviceAccount :
Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ if (!global.FormData) {
20
20
21
21
const name = process . env [ 'MATTERMOST_BOTNAME' ] || '@chatgpt'
22
22
const 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."
23
26
24
27
/* List of all registered plugins */
25
28
const plugins : PluginBase < any > [ ] = [
@@ -30,9 +33,8 @@ const plugins: PluginBase<any>[] = [
30
33
]
31
34
32
35
/* 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 } )
36
38
37
39
async function onClientMessage ( msg : WebSocketMessage < JSONMessageData > , meId : string ) {
38
40
if ( msg . event !== 'posted' || ! meId ) {
You can’t perform that action at this time.
0 commit comments