mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-27 09:46:24 +02:00
remove Dict, use direct LLMConfig / Browser. / Search. / Mermaid. instead
This commit is contained in:
parent
4de8fa3682
commit
c275f28a37
16 changed files with 60 additions and 82 deletions
|
|
@ -6,14 +6,12 @@
|
|||
@File : llm.py
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from metagpt.configs.llm_config import LLMType
|
||||
from metagpt.context import CONTEXT
|
||||
from metagpt.provider.base_llm import BaseLLM
|
||||
|
||||
|
||||
def LLM(name: Optional[str] = None, provider: LLMType = LLMType.OPENAI) -> BaseLLM:
|
||||
def LLM() -> BaseLLM:
|
||||
"""get the default llm provider if name is None"""
|
||||
# context.use_llm(name=name, provider=provider)
|
||||
return CONTEXT.llm(name=name, provider=provider)
|
||||
return CONTEXT.llm()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue