mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 22:02:38 +02:00
Merge branch 'feat-llm' into 'mgx_ops'
Feat llm See merge request pub/MetaGPT!253
This commit is contained in:
commit
a1c0af117b
3 changed files with 5 additions and 1 deletions
|
|
@ -32,6 +32,8 @@ class LLMType(Enum):
|
|||
MISTRAL = "mistral"
|
||||
YI = "yi" # lingyiwanwu
|
||||
OPEN_ROUTER = "open_router"
|
||||
DEEPSEEK = "deepseek"
|
||||
SILICONFLOW = "siliconflow"
|
||||
|
||||
def __missing__(self, key):
|
||||
return self.OPENAI
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ from metagpt.utils.token_counter import (
|
|||
LLMType.MISTRAL,
|
||||
LLMType.YI,
|
||||
LLMType.OPEN_ROUTER,
|
||||
LLMType.DEEPSEEK,
|
||||
LLMType.SILICONFLOW,
|
||||
]
|
||||
)
|
||||
class OpenAILLM(BaseLLM):
|
||||
|
|
|
|||
|
|
@ -660,7 +660,7 @@ def role_raise_decorator(func):
|
|||
if re.match(r"^openai\.", name) or re.match(r"^httpx\.", name):
|
||||
raise last_error
|
||||
|
||||
raise Exception(format_trackback_info(limit=None))
|
||||
raise Exception(format_trackback_info(limit=None)) from e
|
||||
|
||||
return wrapper
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue