hello_world example compatibility

This commit is contained in:
better629
2025-03-13 14:22:02 +08:00
parent b1cc2cf361
commit edff9b2842
+1 -1
View File
@@ -14,7 +14,7 @@ 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], stream=True)
if llm.reasoning_content:
if hasattr(llm, "reasoning_content") and llm.reasoning_content:
logger.info(f"A reasoning: {llm.reasoning_content}")
logger.info(f"A: {rsp}")
return rsp