Skip to content

chore: fix ci and improve system message #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions service/src/storage/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function getOriginConfig() {
process.env.OPENAI_API_DISABLE_DEBUG === 'true',
process.env.OPENAI_ACCESS_TOKEN,
process.env.OPENAI_API_BASE_URL,
process.env.OPENAI_API_MODEL === 'ChatGPTUnofficialProxyAPI' ? 'ChatGPTUnofficialProxyAPI' : 'ChatGPTAPI',
'ChatGPTAPI',
process.env.API_REVERSE_PROXY,
(process.env.SOCKS_PROXY_HOST && process.env.SOCKS_PROXY_PORT)
? (`${process.env.SOCKS_PROXY_HOST}:${process.env.SOCKS_PROXY_PORT}`)
Expand Down Expand Up @@ -76,12 +76,6 @@ export async function getOriginConfig() {
if (config.siteConfig.registerReview === undefined)
config.siteConfig.registerReview = process.env.REGISTER_REVIEW === 'true'
}
if (config.apiModel !== 'ChatGPTAPI' && config.apiModel !== 'ChatGPTUnofficialProxyAPI') {
if (isNotEmptyString(config.accessToken))
config.apiModel = 'ChatGPTUnofficialProxyAPI'
else
config.apiModel = 'ChatGPTAPI'
}

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

if (!config.advancedConfig) {
config.advancedConfig = new AdvancedConfig(
'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully.Respond using markdown (latex start with $).',
'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown (latex start with $).',
0.8,
1,
20,
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/settings/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface SettingsState {

export function defaultSetting(): SettingsState {
return {
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
systemMessage: 'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown(latex start with $).',
temperature: 0.8,
top_p: 1,
}
Expand Down
4 changes: 2 additions & 2 deletions src/store/modules/user/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function defaultSetting(): UserState {
config: { chatModel: 'gpt-3.5-turbo' },
roles: [],
advanced: {
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
systemMessage: 'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown (latex start with $).',
temperature: 0.8,
top_p: 1,
maxContextCount: 20,
Expand All @@ -57,7 +57,7 @@ export function getLocalState(): UserState {
}
if (!localSetting.userInfo.advanced) {
localSetting.userInfo.advanced = {
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
systemMessage: 'You are a large language model. Follow the user\'s instructions carefully. Respond using markdown (latex start with $).',
temperature: 0.8,
top_p: 1,
maxContextCount: 20,
Expand Down