mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-01 03:46:23 +02:00
refactor: think
This commit is contained in:
parent
6f55709ec5
commit
8f8a5e185a
1 changed files with 3 additions and 4 deletions
|
|
@ -54,13 +54,12 @@ class Assistant(Role):
|
|||
last_talk = await self.refine_memory()
|
||||
if not last_talk:
|
||||
return False
|
||||
prompt = f"Refer to this text:\n {last_talk}\n"
|
||||
prompt = ""
|
||||
skills = self.skills.get_skill_list()
|
||||
for desc, name in skills.items():
|
||||
prompt += f"If the text explicitly want you to {desc}, return `[SKILL]: {name}` brief and clear. For instance: [SKILL]: {name}\n"
|
||||
prompt += (
|
||||
'Otherwise, return `[TALK]: {talk}` brief and clear. For instance: if {talk} is "xxxx" return [TALK]: xxxx'
|
||||
)
|
||||
prompt += 'Otherwise, return `[TALK]: {talk}` brief and clear. For instance: if {talk} is "xxxx" return [TALK]: xxxx\n\n'
|
||||
prompt = f"Now the text is: {last_talk}"
|
||||
logger.info(prompt)
|
||||
rsp = await self._llm.aask(prompt, [])
|
||||
logger.info(f"THINK: {prompt}\n, THINK RESULT: {rsp}\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue