allow overriding Core API URL

This commit is contained in:
josc146
2023-12-12 22:37:36 +08:00
parent 0c796c8cfc
commit b8f8837a8f
9 changed files with 27 additions and 7 deletions

View File

@@ -436,7 +436,7 @@ const ChatPanel: FC = observer(() => {
const chatSseController = new AbortController();
chatSseControllers[answerId] = chatSseController;
fetchEventSource( // https://api.openai.com/v1/chat/completions || http://127.0.0.1:${port}/v1/chat/completions
getServerRoot(port) + '/v1/chat/completions',
getServerRoot(port, true) + '/v1/chat/completions',
{
method: 'POST',
headers: {