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

@@ -173,7 +173,7 @@ const CompositionPanel: FC = observer(() => {
let answer = '';
compositionSseController = new AbortController();
fetchEventSource( // https://api.openai.com/v1/completions || http://127.0.0.1:${port}/v1/completions
getServerRoot(port) + '/v1/completions',
getServerRoot(port, true) + '/v1/completions',
{
method: 'POST',
headers: {