我想知道如何使用Autogen的串流功能.
下面的代码使用Autogen使代理具有流功能.
llm_config = {
"config_list" : config_list,
"timeout" : 120,
"seed" : random.randint(1, 100),
"stream" : True
}
user_proxy.initiate_chat(
manager,
message="hello, the weather is nice today",
llm_config=llm_config,
)
我所知道的流功能是在句子结束之前打印和显示每个字母,但即使我使用选项("stream":true),结果也是整个文本在终端上输出.
我不确定我是误解了流媒体功能,还是知道如何正确使用它.你能帮帮忙吗? 谢谢您:)