Skip to content

Commit d925dd5

Browse files
committed
Move ModelConfig to types
1 parent 04879b2 commit d925dd5

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

src/agent/utils.ts

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
import { isArtifactCodeContent } from "@/lib/artifact_content_types";
22
import { BaseStore, LangGraphRunnableConfig } from "@langchain/langgraph";
3-
import { ArtifactCodeV3, ArtifactMarkdownV3, Reflections } from "../types";
3+
import {
4+
ArtifactCodeV3,
5+
ArtifactMarkdownV3,
6+
Reflections,
7+
ModelConfig,
8+
} from "../types";
49
import { initChatModel } from "langchain/chat_models/universal";
510

6-
type ModelConfig = {
7-
temperature?: number;
8-
modelProvider: string;
9-
maxTokens?: number;
10-
azureConfig?: {
11-
azureOpenAIApiKey: string;
12-
azureOpenAIApiInstanceName: string;
13-
azureOpenAIApiDeploymentName: string;
14-
azureOpenAIApiVersion: string;
15-
};
16-
};
17-
1811
/**
1912
* Wrapper around initChatModel
2013
*/

src/types.ts

+13
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,16 @@ export type RewriteArtifactMetaToolResponse =
265265
title: string;
266266
language: ProgrammingLanguageOptions;
267267
};
268+
269+
export interface ModelConfig {
270+
temperature?: number;
271+
modelProvider: string;
272+
maxTokens?: number;
273+
azureConfig?: {
274+
azureOpenAIApiKey: string;
275+
azureOpenAIApiInstanceName: string;
276+
azureOpenAIApiDeploymentName: string;
277+
azureOpenAIApiVersion: string;
278+
azureOpenAIBasePath?: string;
279+
};
280+
}

0 commit comments

Comments
 (0)