Skip to content

Commit

Permalink
revert lint format
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed May 15, 2024
1 parent 6886bbc commit 78be0ff
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ export function fetchRegister<T = any>(username: string, password: string) {
}

export function fetchUpdateUserInfo<T = any>(name: string, avatar: string, description: string) {
return post<T>({
url: '/user-info',
data: { name, avatar, description },
})
return post<T>({
url: '/user-info',
data: { name, avatar, description },
})
}

// 提交用户兑换后额度
Expand Down Expand Up @@ -237,10 +237,10 @@ export function fetchGetChatRoomsCount<T = any>(page: number, size: number, user
}

export function fetchCreateChatRoom<T = any>(title: string, roomId: number, chatModel?: string) {
return post<T>({
url: '/room-create',
data: { title, roomId, chatModel },
})
return post<T>({
url: '/room-create',
data: { title, roomId, chatModel },
})
}

export function fetchRenameChatRoom<T = any>(title: string, roomId: number) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Setting/Message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { t } from '@/locales'
interface Props {
dateTime?: string
model?: string
model?: string
text?: string
inversion?: boolean
error?: boolean
Expand Down
24 changes: 12 additions & 12 deletions src/store/modules/settings/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ import { ss } from '@/utils/storage'
const LOCAL_NAME = 'settingsStorage'

export interface SettingsState {
systemMessage: string
temperature: number
top_p: number
systemMessage: string
temperature: number
top_p: number
}

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.',
temperature: 0.8,
top_p: 1,
}
return {
systemMessage: 'You are ChatGPT, a large language model trained by OpenAI. Follow the user\'s instructions carefully. Respond using markdown.',
temperature: 0.8,
top_p: 1,
}
}

export function getLocalState(): SettingsState {
const localSetting: SettingsState | undefined = ss.get(LOCAL_NAME)
return { ...defaultSetting(), ...localSetting }
const localSetting: SettingsState | undefined = ss.get(LOCAL_NAME)
return { ...defaultSetting(), ...localSetting }
}

export function setLocalState(setting: SettingsState): void {
ss.set(LOCAL_NAME, setting)
ss.set(LOCAL_NAME, setting)
}

export function removeLocalState() {
ss.remove(LOCAL_NAME)
ss.remove(LOCAL_NAME)
}
2 changes: 1 addition & 1 deletion src/store/modules/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const useUserStore = defineStore('user-store', {
this.userInfo = { ...this.userInfo, ...userInfo }
this.recordState()
if (update) {
await fetchUpdateUserInfo(userInfo.name ?? '', userInfo.avatar ?? '', userInfo.description ?? '')
await fetchUpdateUserInfo(userInfo.name ?? '', userInfo.avatar ?? '', userInfo.description ?? '')
// 更新用户信息和额度写一起了,如果传了额度则更新
if (userInfo.useAmount)
await fetchUpdateUserAmt(userInfo.useAmount)
Expand Down

0 comments on commit 78be0ff

Please sign in to comment.