mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 08:38:30 +00:00
fix: Fix planning_llm issue (#1189)
* fix: Fix planning_llm issue * fix: add poetry.lock updated version * fix: type checking issues * fix: tests
This commit is contained in:
committed by
GitHub
parent
7306414de7
commit
9f9b52dd26
@@ -1,14 +1,25 @@
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from langchain_openai import ChatOpenAI
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
from crewai.agent import Agent
|
||||
from crewai.task import Task
|
||||
|
||||
|
||||
class PlanPerTask(BaseModel):
|
||||
task: str = Field(..., description="The task for which the plan is created")
|
||||
plan: str = Field(
|
||||
...,
|
||||
description="The step by step plan on how the agents can execute their tasks using the available tools with mastery",
|
||||
)
|
||||
|
||||
|
||||
class PlannerTaskPydanticOutput(BaseModel):
|
||||
list_of_plans_per_task: List[str]
|
||||
list_of_plans_per_task: List[PlanPerTask] = Field(
|
||||
...,
|
||||
description="Step by step plan on how the agents can execute their tasks using the available tools with mastery",
|
||||
)
|
||||
|
||||
|
||||
class CrewPlanner:
|
||||
|
||||
Reference in New Issue
Block a user