added new api endpoint

Fixes #98
This commit is contained in:
Jing Hua 2023-03-19 13:00:34 +08:00
parent bdc95cb305
commit 1069f62fc6
2 changed files with 5 additions and 1 deletions

View file

@ -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);
}

View file

@ -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,
];