From a21e310d784beb23202cd5a61286846a1e41f436 Mon Sep 17 00:00:00 2001
From: "Brandon Hancock (bhancock_ai)"
<109994880+bhancockio@users.noreply.github.com>
Date: Tue, 21 Jan 2025 11:10:25 -0500
Subject: [PATCH] add docs for crewai chat (#1936)
* add docs for crewai chat
* add version number
---
docs/concepts/cli.mdx | 31 ++++++++++++++++++++++++++++++-
src/crewai/crew.py | 2 +-
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/docs/concepts/cli.mdx b/docs/concepts/cli.mdx
index ad64ee938..19482e428 100644
--- a/docs/concepts/cli.mdx
+++ b/docs/concepts/cli.mdx
@@ -147,7 +147,36 @@ Some commands may require additional configuration or setup within your project
-### 9. API Keys
+### 9. Chat
+
+Starting in version `0.98.0`, when you run the `crewai chat` command, you start an interactive session with your crew. The AI assistant will guide you by asking for necessary inputs to execute the crew. Once all inputs are provided, the crew will execute its tasks.
+
+After receiving the results, you can continue interacting with the assistant for further instructions or questions.
+
+```shell
+crewai chat
+```
+
+Ensure you execute these commands from your CrewAI project's root directory.
+
+
+IMPORTANT: Set the `chat_llm` property in your `crew.py` file to enable this command.
+
+```python
+@crew
+def crew(self) -> Crew:
+ return Crew(
+ agents=self.agents,
+ tasks=self.tasks,
+ process=Process.sequential,
+ verbose=True,
+ chat_llm="gpt-4o", # LLM for chat orchestration
+ )
+```
+
+
+
+### 10. API Keys
When running ```crewai create crew``` command, the CLI will first show you the top 5 most common LLM providers and ask you to select one.
diff --git a/src/crewai/crew.py b/src/crewai/crew.py
index 38b96a0e0..5d4b9ff79 100644
--- a/src/crewai/crew.py
+++ b/src/crewai/crew.py
@@ -37,7 +37,6 @@ from crewai.tasks.task_output import TaskOutput
from crewai.telemetry import Telemetry
from crewai.tools.agent_tools.agent_tools import AgentTools
from crewai.tools.base_tool import Tool
-from crewai.types.crew_chat import ChatInputs
from crewai.types.usage_metrics import UsageMetrics
from crewai.utilities import I18N, FileHandler, Logger, RPMController
from crewai.utilities.constants import TRAINING_DATA_FILE
@@ -84,6 +83,7 @@ class Crew(BaseModel):
step_callback: Callback to be executed after each step for every agents execution.
share_crew: Whether you want to share the complete crew information and execution with crewAI to make the library better, and allow us to train models.
planning: Plan the crew execution and add the plan to the crew.
+ chat_llm: The language model used for orchestrating chat interactions with the crew.
"""
__hash__ = object.__hash__ # type: ignore