mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-05-24 14:15:17 +02:00
simplify code
This commit is contained in:
parent
119385c5ce
commit
cc774db7b3
4 changed files with 19 additions and 17 deletions
|
|
@ -13,7 +13,9 @@ from metagpt.logs import logger
|
|||
|
||||
async def ask_and_print(question: str, llm: LLM, system_prompt) -> str:
|
||||
logger.info(f"Q: {question}")
|
||||
rsp = await llm.aask(question, system_msgs=[system_prompt])
|
||||
rsp = await llm.aask(question, system_msgs=[system_prompt], stream=True)
|
||||
if llm.reasoning_content:
|
||||
logger.info(f"A reasoning: {llm.reasoning_content}")
|
||||
logger.info(f"A: {rsp}")
|
||||
return rsp
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue