diff --git a/src/agent/utils.ts b/src/agent/utils.ts index 0efe1d49..39be1eea 100644 --- a/src/agent/utils.ts +++ b/src/agent/utils.ts @@ -1,20 +1,13 @@ import { isArtifactCodeContent } from "@/lib/artifact_content_types"; import { BaseStore, LangGraphRunnableConfig } from "@langchain/langgraph"; -import { ArtifactCodeV3, ArtifactMarkdownV3, Reflections } from "../types"; +import { + ArtifactCodeV3, + ArtifactMarkdownV3, + Reflections, + ModelConfig, +} from "../types"; import { initChatModel } from "langchain/chat_models/universal"; -type ModelConfig = { - temperature?: number; - modelProvider: string; - maxTokens?: number; - azureConfig?: { - azureOpenAIApiKey: string; - azureOpenAIApiInstanceName: string; - azureOpenAIApiDeploymentName: string; - azureOpenAIApiVersion: string; - }; -}; - /** * Wrapper around initChatModel */ diff --git a/src/types.ts b/src/types.ts index 22fbd6c5..a028a494 100644 --- a/src/types.ts +++ b/src/types.ts @@ -265,3 +265,16 @@ export type RewriteArtifactMetaToolResponse = title: string; language: ProgrammingLanguageOptions; }; + +export interface ModelConfig { + temperature?: number; + modelProvider: string; + maxTokens?: number; + azureConfig?: { + azureOpenAIApiKey: string; + azureOpenAIApiInstanceName: string; + azureOpenAIApiDeploymentName: string; + azureOpenAIApiVersion: string; + azureOpenAIBasePath?: string; + }; +}