Skip to content

Commit 9105f67

Browse files
committed
fix: fix cli not working
1 parent c37a977 commit 9105f67

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/config.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,16 @@ export function setupConfig(initConfig?: Partial<Config>): void {
4242
config = { ...config, ...initConfig };
4343
}
4444

45-
if (config.port === 0) {
46-
config.port = 3700;
47-
}
48-
if (config.rateLimit === 0) {
49-
config.rateLimit = 10;
45+
config.port ??= 3700;
46+
config.rateLimit ??= 60;
47+
config.coolDown ??= 3;
48+
config.timeout ??= 180;
49+
config.simulateRoles ??= 2;
50+
51+
if (!config?.accessTokens?.length) {
52+
config.accessTokens = [];
5053
}
54+
5155
if (!config.bot) {
5256
config.bot = {
5357
"gpt-3.5-turbo-16k": "ChatGPT-16k",

0 commit comments

Comments
 (0)