mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-08 00:15:12 +00:00
feat: enhance agent TUI and CLI with streaming responses and model selection improvements
- Added a `_safe_render` function to escape Rich markup and convert markdown to Rich format. - Implemented token-by-token streaming for agent responses in the TUI, improving user experience during interactions. - Updated the CLI to allow selection of LLM providers and models, enhancing flexibility in agent creation. - Refactored benchmark case paths to use a `tests` directory instead of `benchmarks`. - Introduced a `last_stream_result` property in the `NewAgent` class to retrieve the latest streaming response. These changes aim to provide a more interactive and user-friendly experience in managing agents within the CrewAI framework.
This commit is contained in:
@@ -192,12 +192,12 @@ def _train_new_agents(agent_files: list, n_iterations: int) -> None:
|
||||
|
||||
from crewai_cli.benchmark import load_benchmark_cases
|
||||
|
||||
benchmarks_dir = Path("benchmarks")
|
||||
tests_dir = Path("tests")
|
||||
agents_trained = 0
|
||||
|
||||
for agent_path in agent_files:
|
||||
agent_name = agent_path.stem
|
||||
cases_path = benchmarks_dir / f"{agent_name}_cases.json"
|
||||
cases_path = tests_dir / f"{agent_name}_cases.json"
|
||||
|
||||
if not cases_path.exists():
|
||||
click.secho(f" Skipping {agent_name} — no {cases_path}", fg="yellow")
|
||||
|
||||
Reference in New Issue
Block a user