diff --git a/src/api/api.ts b/src/api/api.ts index ecc14ca..9acd160 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -65,6 +65,8 @@ export const getChatCompletionStream = async ( if (text.includes('insufficient_quota')) { error += '\nMessage from freechatgpt.chat:\nToo many request! We recommend changing your API endpoint or API key'; + } else { + error += '\nRate limited! Please try again later.'; } throw new Error(error); } diff --git a/src/constants/auth.ts b/src/constants/auth.ts index 4c719f5..13d889e 100644 --- a/src/constants/auth.ts +++ b/src/constants/auth.ts @@ -1,7 +1,9 @@ -export const defaultAPIEndpoint = 'https://chatgpt-api.shn.hk/v1/'; +export const defaultAPIEndpoint = + 'https://sharegpt.churchless.tech/share/v1/chat'; export const officialAPIEndpoint = 'https://api.openai.com/v1/chat/completions'; export const availableEndpoints = [ + 'https://sharegpt.churchless.tech/share/v1/chat', 'https://chatgpt-api.shn.hk/v1/', officialAPIEndpoint, ];