mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-14 15:25:17 +02:00
change ways of using config
This commit is contained in:
parent
2fcb2a1cfe
commit
f9519ca417
4 changed files with 15 additions and 11 deletions
|
|
@ -2,12 +2,13 @@ import json
|
|||
from typing import Optional, Union
|
||||
|
||||
from metagpt.config2 import config
|
||||
from metagpt.configs.llm_config import LLMType
|
||||
from metagpt.logs import log_llm_stream, logger
|
||||
from metagpt.provider.azure_openai_api import AzureOpenAILLM
|
||||
from metagpt.provider.openai_api import OpenAILLM
|
||||
from metagpt.schema import Message
|
||||
|
||||
OriginalLLM = OpenAILLM if not config.openai_api_type else AzureOpenAILLM
|
||||
OriginalLLM = OpenAILLM if config.llm.api_type == LLMType.OPENAI else AzureOpenAILLM
|
||||
|
||||
|
||||
class MockLLM(OriginalLLM):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue