mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-05 22:02:38 +02:00
add llm_mock in actions, roles, serialize_deserialize
This commit is contained in:
parent
9564975541
commit
7aa185c477
41 changed files with 51 additions and 2 deletions
|
|
@ -56,11 +56,11 @@ class MockLLM(OpenAILLM):
|
|||
if msg not in self.rsp_cache:
|
||||
# Call the original unmocked method
|
||||
rsp = await self.original_aask(msg, system_msgs, format_msgs, timeout, stream)
|
||||
logger.info(f"added '{rsp[:10]}' ... to response cache")
|
||||
logger.info(f"Added '{rsp[:20]}' ... to response cache")
|
||||
self.rsp_cache[msg] = rsp
|
||||
return rsp
|
||||
else:
|
||||
logger.info("use response cache")
|
||||
logger.info("Use response cache")
|
||||
return self.rsp_cache[msg]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue