Skip to content

Commit

Permalink
add docs for crewai chat (#1936)
Browse files Browse the repository at this point in the history
* add docs for crewai chat

* add version number
  • Loading branch information
bhancockio authored Jan 21, 2025
1 parent aba68da commit a21e310
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
31 changes: 30 additions & 1 deletion docs/concepts/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,36 @@ Some commands may require additional configuration or setup within your project
</Note>


### 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
```
<Note>
Ensure you execute these commands from your CrewAI project's root directory.
</Note>
<Note>
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
)
```
</Note>


### 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.

Expand Down
2 changes: 1 addition & 1 deletion src/crewai/crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a21e310

Please sign in to comment.