File tree Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Expand file tree Collapse file tree 4 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ LANGUAGE=
17
17
MODEL =
18
18
temperature =
19
19
top_p =
20
+ max_tokens =
20
21
TARGET_LABEL =
21
22
PROMPT = Below there is a code diff please help me do a code review
Original file line number Diff line number Diff line change @@ -61,10 +61,11 @@ jobs:
61
61
# Optional
62
62
LANGUAGE : Chinese
63
63
OPENAI_API_ENDPOINT : https://api.openai.com/v1
64
- MODEL :
64
+ MODEL : gpt-turbo-3.5-0613
65
65
PROMPT :
66
66
top_p : 1
67
67
temperature : 1
68
+ max_tokens : 10000
68
69
` ` `
69
70
70
71
## Self-hosting
Original file line number Diff line number Diff line change @@ -148256,6 +148256,9 @@ class Chat {
148256
148256
model: process.env.MODEL || 'gpt-3.5-turbo',
148257
148257
temperature: +(process.env.temperature || 0) || 1,
148258
148258
top_p: +(process.env.top_p || 0) || 1,
148259
+ max_tokens: process.env.max_tokens
148260
+ ? +process.env.max_tokens
148261
+ : undefined,
148259
148262
},
148260
148263
});
148261
148264
}
Original file line number Diff line number Diff line change @@ -5,11 +5,15 @@ export class Chat {
5
5
constructor ( apikey : string ) {
6
6
this . chatAPI = new ChatGPTAPI ( {
7
7
apiKey : apikey ,
8
- apiBaseUrl : process . env . OPENAI_API_ENDPOINT || 'https://api.openai.com/v1' ,
8
+ apiBaseUrl :
9
+ process . env . OPENAI_API_ENDPOINT || 'https://api.openai.com/v1' ,
9
10
completionParams : {
10
11
model : process . env . MODEL || 'gpt-3.5-turbo' ,
11
12
temperature : + ( process . env . temperature || 0 ) || 1 ,
12
13
top_p : + ( process . env . top_p || 0 ) || 1 ,
14
+ max_tokens : process . env . max_tokens
15
+ ? + process . env . max_tokens
16
+ : undefined ,
13
17
} ,
14
18
} ) ;
15
19
}
You can’t perform that action at this time.
0 commit comments