Merge branch 'openrouter' into 'mgx_ops'

update: LLMType增加openrouter

See merge request pub/MetaGPT!188
This commit is contained in:
张雷 2024-06-26 09:39:57 +00:00
commit 8107698235
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@ class LLMType(Enum):
MOONSHOT = "moonshot"
MISTRAL = "mistral"
YI = "yi" # lingyiwanwu
OPEN_ROUTER = "open_router"
def __missing__(self, key):
return self.OPENAI

View file

@ -40,7 +40,8 @@ from metagpt.utils.token_counter import (
)
@register_provider([LLMType.OPENAI, LLMType.FIREWORKS, LLMType.OPEN_LLM, LLMType.MOONSHOT, LLMType.MISTRAL, LLMType.YI])
@register_provider([LLMType.OPENAI, LLMType.FIREWORKS, LLMType.OPEN_LLM, LLMType.MOONSHOT, LLMType.MISTRAL, LLMType.YI,
LLMType.OPEN_ROUTER])
class OpenAILLM(BaseLLM):
"""Check https://platform.openai.com/examples for examples"""