Skip to content

Commit 4e5747d

Browse files
authored
chore: fix ci and improve system message (#598)
Signed-off-by: Bob Du <[email protected]>
1 parent 9d057f5 commit 4e5747d

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

service/src/storage/config.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function getOriginConfig() {
3232
process.env.OPENAI_API_DISABLE_DEBUG === 'true',
3333
process.env.OPENAI_ACCESS_TOKEN,
3434
process.env.OPENAI_API_BASE_URL,
35-
process.env.OPENAI_API_MODEL === 'ChatGPTUnofficialProxyAPI' ? 'ChatGPTUnofficialProxyAPI' : 'ChatGPTAPI',
35+
'ChatGPTAPI',
3636
process.env.API_REVERSE_PROXY,
3737
(process.env.SOCKS_PROXY_HOST && process.env.SOCKS_PROXY_PORT)
3838
? (`${process.env.SOCKS_PROXY_HOST}:${process.env.SOCKS_PROXY_PORT}`)
@@ -76,12 +76,6 @@ export async function getOriginConfig() {
7676
if (config.siteConfig.registerReview === undefined)
7777
config.siteConfig.registerReview = process.env.REGISTER_REVIEW === 'true'
7878
}
79-
if (config.apiModel !== 'ChatGPTAPI' && config.apiModel !== 'ChatGPTUnofficialProxyAPI') {
80-
if (isNotEmptyString(config.accessToken))
81-
config.apiModel = 'ChatGPTUnofficialProxyAPI'
82-
else
83-
config.apiModel = 'ChatGPTAPI'
84-
}
8579

8680
if (config.auditConfig === undefined) {
8781
config.auditConfig = new AuditConfig(
@@ -102,7 +96,7 @@ export async function getOriginConfig() {
10296

10397
if (!config.advancedConfig) {
10498
config.advancedConfig = new AdvancedConfig(
105-
'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully.Respond using markdown (latex start with $).',
99+
'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown (latex start with $).',
106100
0.8,
107101
1,
108102
20,

src/store/modules/settings/helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface SettingsState {
1010

1111
export function defaultSetting(): SettingsState {
1212
return {
13-
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
13+
systemMessage: 'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown(latex start with $).',
1414
temperature: 0.8,
1515
top_p: 1,
1616
}

src/store/modules/user/helper.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function defaultSetting(): UserState {
3838
config: { chatModel: 'gpt-3.5-turbo' },
3939
roles: [],
4040
advanced: {
41-
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
41+
systemMessage: 'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown (latex start with $).',
4242
temperature: 0.8,
4343
top_p: 1,
4444
maxContextCount: 20,
@@ -57,7 +57,7 @@ export function getLocalState(): UserState {
5757
}
5858
if (!localSetting.userInfo.advanced) {
5959
localSetting.userInfo.advanced = {
60-
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
60+
systemMessage: 'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown (latex start with $).',
6161
temperature: 0.8,
6262
top_p: 1,
6363
maxContextCount: 20,

0 commit comments

Comments
 (0)