docs: add docs for the planning_llm new parameter

This commit is contained in:
Eduardo Chiarotti
2024-07-25 11:55:19 -03:00
parent ddcefe1364
commit d6033337e2
2 changed files with 20 additions and 0 deletions

View File

@@ -23,6 +23,25 @@ my_crew = Crew(
From this point on, your crew will have planning enabled, and the tasks will be planned before each iteration.
#### Planning LLM
Now you can define the LLM that will be used to plan the tasks. The default LLM is `gpt-4o-mini`, but you can change it to any other LLM as long as it is compatible.
```python
from crewai import Crew, Agent, Task, Process
from langchain_openai import ChatOpenAI
# Assemble your crew with planning capabilities and custom LLM
my_crew = Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
planning=True,
planning_llm=ChatOpenAI(model="gpt-4o")
)
```
### Example
When running the base case example, you will see something like the following output, which represents the output of the AgentPlanner responsible for creating the step-by-step logic to add to the Agents tasks.