mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-18 13:55:17 +02:00
expand mem window for quick think
This commit is contained in:
parent
646bafbe9e
commit
86e0ad0218
2 changed files with 2 additions and 2 deletions
|
|
@ -286,7 +286,7 @@ class RoleZero(Role):
|
|||
return rsp_msg, ""
|
||||
|
||||
# routing
|
||||
memory = self.get_memories(k=4) # FIXME: A magic number for two rounds of Q&A
|
||||
memory = self.get_memories(k=self.memory_k)
|
||||
context = self.llm.format_msg(memory + [UserMessage(content=QUICK_THINK_PROMPT)])
|
||||
intent_result = await self.llm.aask(context, system_msgs=[self.format_quick_system_prompt()])
|
||||
|
||||
|
|
|
|||
|
|
@ -842,7 +842,7 @@ def decode_image(img_url_or_b64: str) -> Image:
|
|||
|
||||
def extract_image_paths(content: str) -> bool:
|
||||
# We require that the path must have a space preceding it, like "xxx /an/absolute/path.jpg xxx"
|
||||
pattern = r"[^\s]+\.(?:png|jpe?g|gif|bmp|tiff)"
|
||||
pattern = r"[^\s]+\.(?:png|jpe?g|gif|bmp|tiff|PNG|JPE?G|GIF|BMP|TIFF)"
|
||||
image_paths = re.findall(pattern, content)
|
||||
return image_paths
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue