mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-23 15:48:11 +02:00
fix ml_engineer test
This commit is contained in:
parent
b585064edc
commit
a1b16b7e99
3 changed files with 84 additions and 3 deletions
|
|
@ -13,7 +13,10 @@ OriginalLLM = OpenAILLM if config.llm.api_type == LLMType.OPENAI else AzureOpenA
|
|||
|
||||
class MockLLM(OriginalLLM):
|
||||
def __init__(self, allow_open_api_call):
|
||||
super().__init__(config.get_openai_llm())
|
||||
original_llm_config = (
|
||||
config.get_openai_llm() if config.llm.api_type == LLMType.OPENAI else config.get_azure_llm()
|
||||
)
|
||||
super().__init__(original_llm_config)
|
||||
self.allow_open_api_call = allow_open_api_call
|
||||
self.rsp_cache: dict = {}
|
||||
self.rsp_candidates: list[dict] = [] # a test can have multiple calls with the same llm, thus a list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue