camel-ai / camel

🐫 CAMEL: Finding the Scaling Law of Agents. A multi-agent framework. https://www.camel-ai.org
https://www.camel-ai.org
Apache License 2.0
5.29k stars 640 forks source link

[Feature Request] Support streaming output and remove `print_text_animated` #178

Closed lightaime closed 1 year ago

lightaime commented 1 year ago

Required prerequisites

Motivation

The current logger is not true streaming. To reduce logging time, we should support true streaming.

Solution

A tutorial about streaming completion is available here: https://github.com/openai/openai-cookbook/blob/main/examples/How_to_stream_completions.ipynb.

Alternatives

No response

Additional context

No response

zechengz commented 1 year ago

As discussed in this PR https://github.com/camel-ai/camel/pull/184 comments that we are not going to support terminal prints in the near future. So, I don't support stream mode with any "real time" printing. Also to make current debugging easier, keep print_text_animated in camel/agents/embodied_agent.py, camel/agents/critic_agent.py and camel/human.py makes more sense to me. So I am going to close this ticket. Please let me know if you have any questions or suggestions.