mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
Remove the 'User Message' tag in the quick answer process.
This commit is contained in:
parent
408174ed8f
commit
6b4c00f286
1 changed files with 3 additions and 0 deletions
|
|
@ -295,6 +295,9 @@ class RoleZero(Role):
|
|||
if "QUICK" in intent_result or "AMBIGUOUS" in intent_result: # llm call with the original context
|
||||
async with ThoughtReporter(enable_llm_stream=True) as reporter:
|
||||
await reporter.async_report({"type": "quick"})
|
||||
# remove "[Message] from A to B :" tag.
|
||||
pattern = r"\[Message\] from .* to .*:\s*"
|
||||
memory[-1].content = re.sub(pattern, "", memory[-1].content, count=1)
|
||||
answer = await self.llm.aask(
|
||||
self.llm.format_msg(memory),
|
||||
system_msgs=[QUICK_RESPONSE_SYSTEM_PROMPT.format(role_info=self._get_prefix())],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue