1-
21from llm .base_llm import BaseLLM
32from llm .doubao_llm import DoubaoLLM
4- from llm .qwen_llm import QwenLLM
53from llm .openai_llm import OpenaiLLM
4+ from llm .qwen_llm import QwenLLM
65
76def model_selector (args ) -> BaseLLM :
87 # set default
@@ -11,19 +10,19 @@ def model_selector(args) -> BaseLLM:
1110
1211 if getattr (args , 'use_doubao' , False ):
1312 return DoubaoLLM (args .model , args .language , max_level , temperature )
14- elif getattr (args , 'use_qwen' , False ):
13+ if getattr (args , 'use_qwen' , False ):
1514 return QwenLLM (args .model , args .language , max_level , temperature )
16- elif getattr (args , 'use_openai' , False ):
15+ if getattr (args , 'use_openai' , False ):
1716 return OpenaiLLM (args .model , args .language , max_level , temperature )
18- else :
19- raise ValueError ("Please at least set one of --use-doubao、--use-qwen or --use-openai" )
17+
18+ raise ValueError ("Please at least set one of --use-doubao、--use-qwen or --use-openai" )
2019
2120def format_selector (args ) -> int :
2221 if args .only_freemind :
2322 return 1
24- elif args .only_xmind :
23+ if args .only_xmind :
2524 return 2
26- elif args .only_svg :
25+ if args .only_svg :
2726 return 3
2827 return 0
2928
0 commit comments