mirror of
https://github.com/deiucanta/chatpad.git
synced 2026-03-11 09:04:31 +00:00
Fixed api base
This commit is contained in:
parent
e8240a7bef
commit
e8adc27cfb
1 changed files with 2 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ export async function createStreamChatCompletion(
|
|||
) {
|
||||
const settings = await db.settings.get("general");
|
||||
const model = settings?.openAiModel ?? config.defaultModel;
|
||||
const chatCompletionsUrl = settings?.openAiApiBase ? settings?.openAiApiBase + "/chat/completions" : undefined;
|
||||
|
||||
return OpenAIExt.streamClientChatCompletion(
|
||||
{
|
||||
|
|
@ -36,6 +37,7 @@ export async function createStreamChatCompletion(
|
|||
},
|
||||
{
|
||||
apiKey: apiKey,
|
||||
chatCompletionsUrl: chatCompletionsUrl,
|
||||
handler: {
|
||||
onContent(content, isFinal, stream) {
|
||||
setStreamContent(messageId, content, isFinal);
|
||||
|
|
|
|||
Loading…
Reference in a new issue