mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-01 03:46:23 +02:00
修改quick think response category 临时if逻辑
This commit is contained in:
parent
c8cc67cdb2
commit
e0cc3e8d1b
2 changed files with 2 additions and 6 deletions
|
|
@ -256,17 +256,13 @@ class RoleZero(Role):
|
|||
context = self.llm.format_msg(memory + [UserMessage(content=QUICK_THINK_PROMPT)])
|
||||
intent_result = await self.llm.aask(context)
|
||||
|
||||
if "QUICK" in intent_result:
|
||||
# llm call with the original context
|
||||
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))
|
||||
elif "SEARCH" in intent_result:
|
||||
query = "\n".join(str(msg) for msg in memory)
|
||||
answer = await SearchEnhancedQA().run(query)
|
||||
elif "AMBIGUOUS " in intent_result:
|
||||
# TODO: out of domain, ask human for help
|
||||
pass
|
||||
|
||||
if answer:
|
||||
self.rc.memory.add(AIMessage(content=answer, cause_by=RunCommand))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue