mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
make system message a list
This commit is contained in:
parent
7a96978e14
commit
a26199afd9
1 changed files with 2 additions and 2 deletions
|
|
@ -271,12 +271,12 @@ class RoleZero(Role):
|
|||
# routing
|
||||
memory = self.get_memories(k=4) # FIXME: A magic number for two rounds of Q&A
|
||||
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())
|
||||
intent_result = await self.llm.aask(context, system_msgs=[self.format_quick_system_prompt()])
|
||||
|
||||
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"})
|
||||
answer = await self.llm.aask(self.llm.format_msg(memory), system_msgs=QUICK_RESPONSE_SYSTEM_PROMPT.format(role_info=self._get_prefix()))
|
||||
answer = await self.llm.aask(self.llm.format_msg(memory), system_msgs=[QUICK_RESPONSE_SYSTEM_PROMPT.format(role_info=self._get_prefix())])
|
||||
elif "SEARCH" in intent_result:
|
||||
query = "\n".join(str(msg) for msg in memory)
|
||||
answer = await SearchEnhancedQA().run(query)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue