Merge branch 'feat-llm' into 'mgx_ops'

Feat llm

See merge request pub/MetaGPT!253
This commit is contained in:
张雷 2024-07-26 02:08:41 +00:00
commit a1c0af117b
3 changed files with 5 additions and 1 deletions

View file

@ -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

View file

@ -49,6 +49,8 @@ from metagpt.utils.token_counter import (
LLMType.MISTRAL,
LLMType.YI,
LLMType.OPEN_ROUTER,
LLMType.DEEPSEEK,
LLMType.SILICONFLOW,
]
)
class OpenAILLM(BaseLLM):

View file

@ -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