Skip to content

Commit

Permalink
Merge pull request #99 from IDLe-Engineering/patch-1
Browse files Browse the repository at this point in the history
Update sendLLMMessage.ts
  • Loading branch information
andrewpareles authored Oct 14, 2024
2 parents 69d848f + 7f81836 commit b0758e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extensions/void/src/common/sendLLMMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ const sendOpenAIMsg: SendLLMMessageFnTypeInternal = ({ messages, onText, onFinal
didAbort = true;
};

const openai = new OpenAI({ apiKey: apiConfig.openAI.apikey, dangerouslyAllowBrowser: true });
//const openai = new OpenAI({ apiKey: apiConfig.openAI.apikey, dangerouslyAllowBrowser: true });
const openai = apiConfig.whichApi === 'openAICompatible' ? new OpenAI({ baseURL: apiConfig.openAICompatible.endpoint, apiKey: apiConfig.openAICompatible.apikey, dangerouslyAllowBrowser: true }) : new OpenAI({ apiKey: apiConfig.openAI.apikey, dangerouslyAllowBrowser: true });

let options: OpenAI.Chat.Completions.ChatCompletionCreateParamsStreaming
if (apiConfig.whichApi === 'openAI') {
Expand Down

0 comments on commit b0758e0

Please sign in to comment.