diff --git a/src/contributes/codecomplete/llm.ts b/src/contributes/codecomplete/llm.ts index b65a79c..49dc4ed 100644 --- a/src/contributes/codecomplete/llm.ts +++ b/src/contributes/codecomplete/llm.ts @@ -18,14 +18,10 @@ export interface CodeCompletionChunk { export async function* streamComplete(prompt: string): AsyncGenerator { const nvidiaKey = DevChatConfig.getInstance().get("complete_key"); const ollamaApiBase = DevChatConfig.getInstance().get("complete_ollama_api_base"); - const devchatApiBase = DevChatConfig.getInstance().get("complete_devchat_api_base"); + const devchatToken = DevChatConfig.getInstance().get("providers.devchat.api_key"); + const devchatEndpoint = DevChatConfig.getInstance().get("providers.devchat.api_base"); - if (devchatApiBase) { - for await (const chunk of devchatComplete(prompt)) { - yield chunk; - } - } - else if (ollamaApiBase) { + if (ollamaApiBase) { for await (const chunk of ollamaDeepseekComplete(prompt)) { yield chunk; } @@ -33,6 +29,10 @@ export async function* streamComplete(prompt: string): AsyncGenerator { - const devchatApiBase = DevChatConfig.getInstance().get("complete_devchat_api_base"); - const completionApiBase = devchatApiBase + "/completions"; + const devchatEndpoint = DevChatConfig.getInstance().get("providers.devchat.api_base"); + const completionApiBase = devchatEndpoint + "/completions"; let model = DevChatConfig.getInstance().get("complete_model"); if (!model) { diff --git a/tools b/tools index 490dcff..a2cd340 160000 --- a/tools +++ b/tools @@ -1 +1 @@ -Subproject commit 490dcffe01ab02b96032df9606d46f2add23d89e +Subproject commit a2cd34022a4504862039564a92c5067385df419e