diff --git a/packages/vscode/src/connectioninfotree.ts b/packages/vscode/src/connectioninfotree.ts index 7b21308489..59415c2407 100644 --- a/packages/vscode/src/connectioninfotree.ts +++ b/packages/vscode/src/connectioninfotree.ts @@ -2,11 +2,11 @@ import * as vscode from "vscode" import { ExtensionState } from "./state" import { MODEL_PROVIDERS } from "../../core/src/constants" import { YAMLStringify } from "../../core/src/yaml" -import { APIType } from "../../core/src/host" +import { OpenAIAPIType } from "../../core/src/host" class ConnectionInfoTreeData { provider: string - apiType?: APIType + apiType?: OpenAIAPIType } class ConnectionInfoTreeDataProvider diff --git a/packages/vscode/src/extension.ts b/packages/vscode/src/extension.ts index 92f14ec7ef..53e14f2052 100644 --- a/packages/vscode/src/extension.ts +++ b/packages/vscode/src/extension.ts @@ -21,7 +21,7 @@ import type MarkdownIt from "markdown-it" import MarkdownItGitHubAlerts from "markdown-it-github-alerts" import { activateConnectionInfoTree } from "./connectioninfotree" import { updateConnectionConfiguration } from "../../core/src/connection" -import { APIType } from "../../core/src/host" +import { OpenAIAPIType } from "../../core/src/host" import { activeTaskProvider } from "./taskprovider" import { activateSamplesCommands } from "./samplescommands" import { activateChatParticipant } from "./chatparticipant" @@ -45,7 +45,7 @@ export async function activate(context: ExtensionContext) { context.subscriptions.push( registerCommand( "genaiscript.connection.configure", - async (provider?: string, apiType?: APIType) => { + async (provider?: string, apiType?: OpenAIAPIType) => { await updateConnectionConfiguration(provider, apiType) await vscode.env.openExternal( vscode.Uri.parse(DOCS_CONFIGURATION_URL) diff --git a/packages/vscode/src/lmaccess.ts b/packages/vscode/src/lmaccess.ts index 8c6ac68ae9..034cb2c2d1 100644 --- a/packages/vscode/src/lmaccess.ts +++ b/packages/vscode/src/lmaccess.ts @@ -13,7 +13,7 @@ import { TOOL_NAME, MODEL_PROVIDER_AZURE_SERVERLESS, } from "../../core/src/constants" -import { APIType } from "../../core/src/host" +import { OpenAIAPIType } from "../../core/src/host" import { parseModelIdentifier } from "../../core/src/models" import { ChatCompletionMessageParam } from "../../core/src/chattypes" import { LanguageModelChatRequest } from "../../core/src/server/client" @@ -45,7 +45,7 @@ async function generateLanguageModelConfiguration( const items: (vscode.QuickPickItem & { model?: string provider?: string - apiType?: APIType + apiType?: OpenAIAPIType })[] = [] if (isLanguageModelsAvailable()) { const models = await vscode.lm.selectChatModels() @@ -101,12 +101,12 @@ async function generateLanguageModelConfiguration( } ) - const res: { model?: string; provider?: string; apiType?: APIType } = + const res: { model?: string; provider?: string; apiType?: OpenAIAPIType } = await vscode.window.showQuickPick< vscode.QuickPickItem & { model?: string provider?: string - apiType?: APIType + apiType?: OpenAIAPIType } >(items, { title: `Configure a Language Model for ${modelId}`,