Replies: 7 comments
-
![]() |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
And, it's not a bug, so maybe you can change the issue type?😂 |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
收到,感谢您
…---- Replied Message ----
| From | ***@***.***> |
| Date | 2/26/2025 11:04 |
| To | ***@***.***> |
| Cc | ***@***.***>,
***@***.***> |
| Subject | Re: [microsoft/autogen] How can I access the information inside a variable without printing it to the console? (Issue #5717) |
你可以看看源代码,这个run_stream方法实际返回的是一个yield generator,你可以用async for mes in ...:的方式来运行它,这实际上也是Console方法中在做的事情。
You can look at the source code. The run_stream method actually returns a yield generator. You can run it in the async for mes in ...: , which is actually what the Console method is doing.
下面是一个例子: Here is a example:
Run the agent and stream the messages to the console.
async def main() -> None:
async for message in agent.run_stream(task="What is the weather in New York?"):
print(message)
asyncio.run(main())
这个我看了,没有提供直接获取结果的方法吗?这也太扯了
我没有发现更多的能直接获取结果的方法,也需你可以根据自己的需要来写一个方法做返回输出,里面的结构其实不是很复杂。
I haven't found more methods that can directly obtain the results, and you also need to write a method according to your needs to return the output. The structure inside is actually not very complicated.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
pengjunfeng11 left a comment (microsoft/autogen#5717)
你可以看看源代码,这个run_stream方法实际返回的是一个yield generator,你可以用async for mes in ...:的方式来运行它,这实际上也是Console方法中在做的事情。
You can look at the source code. The run_stream method actually returns a yield generator. You can run it in the async for mes in ...: , which is actually what the Console method is doing.
下面是一个例子: Here is a example:
Run the agent and stream the messages to the console.
async def main() -> None:
async for message in agent.run_stream(task="What is the weather in New York?"):
print(message)
asyncio.run(main())
这个我看了,没有提供直接获取结果的方法吗?这也太扯了
我没有发现更多的能直接获取结果的方法,也需你可以根据自己的需要来写一个方法做返回输出,里面的结构其实不是很复杂。
I haven't found more methods that can directly obtain the results, and you also need to write a method according to your needs to return the output. The structure inside is actually not very complicated.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the doc issue?
Describe the issue
A clear and concise description of what the issue is. What is missing or incorrect?
What do you want to see in the doc?
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Link to the doc page, if applicable
https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/quickstart.html
Beta Was this translation helpful? Give feedback.
All reactions