You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ feat(openai-wrapper.ts): Added a function to use the original OpenAI for image generation even if you are using Azure OpenAI
🔧 fix(Dockerfile, compose.yaml): downgrade Node version from 20 to 16 and add new environment variables
🐛 fix(botservice.ts): correct update of answer variable in postMessage function to prevent duplication of error messages
🔧 Refactoring: Converted plugin and types files to ES modules and performed code formatting
🔧 fix(tsconfig.json): update module resolution settings
🔧 fix(tsconfig.json): change TypeScript module resolution strategy from "node" to "bundler", set baseUrl and paths
🔧 chore(esbuild.config.js): change output directory from 'out' to 'dist'
✨ feat(build.sh): add build script
🔧 chore(.gitignore): update .gitignore to ignore .env extensions
📝 docs(README.md): Update project details to reflect new features and changes
🔥 remove(openai-thread-completion.ts): deleted openai-thread-completion.ts file

4
17
5
18
The bot can talk to you like a regular mattermost user. It's like having chat.openai.com built collaboratively built into Mattermost!
6
-
But that's not all, you can also use it to generate images via Dall-E or diagram visualizations via a yFiles plugin!
19
+
But that's not all, you can also use it to generate images via Dall-E or diagram visualizations via a yFiles plugin!
7
20
8
21
Here's how to get the bot running - it's easy if you have a Docker host.
9
22
@@ -30,6 +43,11 @@ or when [running the docker image](#using-the-ready-made-docker-image) or when c
30
43
| OPENAI_MODEL_NAME | no |`gpt-3.5-turbo`| The OpenAI language model to use, defaults to `gpt-3.5-turbo`|
31
44
| OPENAI_MAX_TOKENS | no |`2000`| The maximum number of tokens to pass to the OpenAI API, defaults to 2000 |
32
45
| OPENAI_TEMPERATURE | no |`0.2`| The sampling temperature to use, between 0 and 2, defaults to 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. |
46
+
| MAX_PROMPT_TOKENS | no |`2096`| Maximum number of prompt tokens, default to 2000. For example on GPT-4 = 8196 - OPENAI_MAX_TOKENS. |
47
+
| AZURE_OPENAI_API_KEY | no |`0123456789abcdefghijklmno`| The Azure OpenAI Service API key to authoenticate. If OPENAI_API_KEY is also set, the original OpenAI is used for image generation. |
48
+
| AZURE_OPENAI_API_INSTANCE_NAME | no |`example-name`| The instance name on the Azure OpenAI Service |
49
+
| AZURE_OPENAI_API_DEPLOYMENT_NAME | no |`gpt-35-turbo`| The name of the deployed model on the Azure OpenAI Service |
50
+
| AZURE_OPENAI_API_VERSION | no |`2023-03-15-preview`| The Azure OpenAI version |
33
51
| YFILES_SERVER_URL | no |`http://localhost:3835`| The URL to the yFiles graph service for embedding auto-generated diagrams. |
34
52
| NODE_EXTRA_CA_CERTS | no |`/file/to/cert.crt`| a link to a certificate file to pass to node.js for authenticating self-signed certificates |
35
53
| MATTERMOST_BOTNAME | no |`"@chatgpt"`| the name of the bot user in Mattermost, defaults to '@chatgpt' |
@@ -56,6 +74,17 @@ docker run -d --restart unless-stopped \
For testing, you could now just run `npm install` and `npm run start` directly, but be sure to set the [environment variables](#options)or pass them to the node process, first!
96
+
For testing, you could now just run `npm ci` and `npm run start`or directly, but be sure to set the [environment variables](#options) or pass them to the node process, first!
68
97
69
98
For production use, in order to create a service on a docker container that will always provide the service without you having to run it on your own machine, you can do the following:
70
99
@@ -149,7 +178,14 @@ services:
149
178
```
150
179
151
180
### Run the container as a service
152
-
When all configuration is complete, start the container service.
181
+
When all configuration is complete, build and start the container service.
182
+
183
+
Build docker image:
184
+
```bash
185
+
docker compose build
186
+
```
187
+
188
+
Start container:
153
189
```bash
154
190
docker compose up -d
155
191
```
@@ -175,7 +211,7 @@ Here's an example chat that I just had with our bot:
175
211
>chatgpt (BOT):
176
212
>>Hello there! I'm @chatgpt, a friendly and reliable Mattermost bot designed to make your communication experience smoother and more efficient. I'm honored to be part of the team at yWorks, where I help employees get things done faster and with less hassle. With my advanced machine learning algorithms, I'm capable of understanding complex natural language queries and providing succinct and accurate responses in a matter of seconds. Whether you're a developer looking for information on your codebase or a manager seeking to streamline your team's workflows, I'm here to help. Installing a Mattermost chatbot like me is a must for any organization looking to boost its productivity and enjoy a more pleasant communication experience. So what are you waiting for? Let's chat!
177
213
178
-
I built this tool as a quick hack on a rainy Saturday afternoon, but we are using the bot in production in our Mattermost instance at our office at [yworks](https://www.yworks.com) and the bot has proved to be very helpful for many simple tasks. Give it a try and provide feedback if you like! It's really not very expensive: We had it running for about 30 users for two weeks and that cost us less than half a dollar for the ChatGPT service!
214
+
I built this tool as a quick hack on a rainy Saturday afternoon, but we are using the bot in production in our Mattermost instance at our office at [yworks](https://www.yworks.com) and the bot has proved to be very helpful for many simple tasks. Give it a try and provide feedback if you like! It's really not very expensive: We had it running for about 30 users for two weeks and that cost us less than half a dollar for the ChatGPT service!
179
215
180
216
I will also accept helpful pull requests if you find an issue or have an idea for an improvement.
0 commit comments