api proxy

This commit is contained in:
Rafi
2023-04-05 23:17:14 +08:00
parent 21dc2b9236
commit fb9e8b8c7d
11 changed files with 431 additions and 439 deletions

View File

@@ -2,6 +2,7 @@ export const useMyFetch = (url, options = {}) => {
let defaultOptions = {
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
}
}
if (process.server) {

View File

@@ -5,10 +5,10 @@ export const useCurrentModel = () => useState('currentModel', () => getCurrentMo
export const useApiKey = () => useState('apiKey', () => getStoredApiKey())
export const useConversation = () => useState('conversation', () => getDefaultConversationData())
export const useConversations = () => useState('conversations', () => [])
export const useSettings = () => useState('settings', () => getSystemSettings())
export const useUser = () => useState('user', () => null)
export const useUser = () => useState('user', () => null)
export const useDrawer = () => useState('drawer', () => false)