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
Copy file name to clipboardExpand all lines: .env.example
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,10 @@
51
51
# # OpenAI API 模型名称,默认值为 `gpt-3.5-turbo`,这是目前可用的最好的模型。
52
52
# OPENAI_API_MODEL_NAME=
53
53
54
+
# # OpenAI token limit, used to calculate text split and truncation before calling Chat Completion API, usually set to the max token limit of the model and let insights-bot decide how to handle, default is `4096`
Or only copy or download the necessary `.env.example` and `docker-compose.yml` files (but you will only be able to run the bot with pre-bundled docker image):
Create your `.env` by making a copy of the contents from `.env.example` file. The .env file should be placed at the root of the project directory next to your `docker-compose.yml` file.
189
202
203
+
```shell
204
+
cp .env.example .env
205
+
```
206
+
190
207
Replace your OpenAI token and other environment variables in `.env`, and then run:
191
208
192
209
```shell
193
-
docker-compose --profile hub up -d
210
+
dockercompose --profile hub up -d
194
211
```
195
212
196
-
If you prefer run docker image from local codes, then run:
213
+
If you prefer run docker image from local codes (which means build it manually, you will need the entire source code of this project), then run:
|`OPENAI_API_SECRET`|`true`|| OpenAI API Secret Key that looks like `sk-************************************************`, you can obtain one by signing in to OpenAI platform and create one at [http://platform.openai.com/account/api-keys](http://platform.openai.com/account/api-keys). |
237
254
|`OPENAI_API_HOST`|`false`|`https://api.openai.com`| OpenAI API Host, you can specify one if you have a relay or reversed proxy configured. Such as `https://openai.example.workers.dev`|
238
255
|`OPENAI_API_MODEL_NAME`|`false`|`gpt-3.5-turbo`| OpenAI API model name, default is `gpt-3.5-turbo`, you can specify one if you want to use another model. Such as `gpt-4`|
239
-
|`DB_CONNECTION_STR`|`true`|| PostgreSQL database URL. Such as `postgres://postgres:postgres@localhost:5432/postgres`. You could also suffix with `?search_path=<schema name>` if you want to specify a schema |
256
+
|`OPENAI_API_TOKEN_LIMIT`|`false`|`4096`| OpenAI API token limit used to computed the splits and truncations of texts before calling Chat Completion API generally set to the maximum token limit of a model, and let insights-bot to determine how to process it, default is `4096`|
257
+
|`DB_CONNECTION_STR`|`true`|`postgresql://postgres:123456@db_local:5432/postgres?search_path=public&sslmode=disable`| PostgreSQL database URL. Such as `postgres://postgres:postgres@localhost:5432/postgres`. You could also suffix with `?search_path=<schema name>` if you want to specify a schema. |
240
258
|`SLACK_CLIENT_ID`|`false`|| Slack app client id, you can create a slack app and get it, see: [tutorial](https://api.slack.com/tutorials/slack-apps-and-postman)|
241
259
|`SLACK_CLIENT_SECRET`|`false`|| Slack app client secret, you can create a slack app and get it, see: [tutorial](https://api.slack.com/tutorials/slack-apps-and-postman)|
242
260
|`SLACK_WEBHOOK_PORT`|`false`|`7070`| Port for Slack Bot/App Webhook server, default is 7070 |
|`OPENAI_API_SECRET`|`true`|| OpenAI API 密钥,通常类似于 `sk-************************************************` 的结构,你可以登录到 Open AI 并在 [http://platform.openai.com/account/api-keys](http://platform.openai.com/account/api-keys) 上创建一个。 |
239
256
|`OPENAI_API_HOST`|`false`|`https://api.openai.com`| OpenAI API 的域名,如果配置了中继或反向代理,则可以指定一个。比如 `https://openai.example.workers.dev`|
240
257
|`OPENAI_API_MODEL_NAME`|`false`|`gpt-3.5-turbo`| OpenAI API 模型名称,默认为 `gpt-3.5-turbo`,如果你使用其他模型,比如 `gpt-4` 则可以制指定一个。 |
0 commit comments