Skip to content

Commit

Permalink
fixed types
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Oct 21, 2024
1 parent aad615d commit 3efc609
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/vscode/src/connectioninfotree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/vscode/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions packages/vscode/src/lmaccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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}`,
Expand Down

0 comments on commit 3efc609

Please sign in to comment.