Skip to content

Commit

Permalink
fix: 解耦LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
MarleneJiang committed Aug 30, 2023
1 parent 88119a7 commit de2820e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions package/motion/chain/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TypeScriptChain,
} from "@idealeap/gwt";
export interface chainSchema {
llm?: LLM;
llmSchema?: createLLMSchema;
chainName?: string;
}
Expand All @@ -27,8 +28,8 @@ export class Chain {
chainName?: string;
chain: FunctionChain | TypeScriptChain;
constructor(params: chainSchema) {
const { llmSchema, chainName } = params;
this.llm = new LLM(llmSchema || {});
const { llmSchema, chainName, llm } = params;
this.llm = llm || new LLM(llmSchema || {});
this.chainName = chainName || "";
switch (this.chainName) {
case "typeChat":
Expand Down

0 comments on commit de2820e

Please sign in to comment.