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:
Eduardo Chiarotti
2024-08-14 18:54:53 -03:00
committed by GitHub
parent 7306414de7
commit 9f9b52dd26
6 changed files with 72 additions and 40 deletions

View File

@@ -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: