ValidationError: 1 validation error for Crew
verbose
Input should be a valid boolean, unable to interpret input [type=bool_parsing, input_value=2, input_type=int]
For further information visit Redirecting...
The code that I used is
class OpenAIManager():
“”"
A class that manages the OpenAI instance for the LLM system.
“”"
def init(self):
super().init()
self.llm_instance = AzureChatOpenAI(
deployment_name=os.getenv(“DEP_NAME”),
http_client=httpx.Client(verify=False),
temperature=0,
)
def get_llm_instance(self):
return self.llm_instance
def get_completion(self, prompt: str)->str:
"""
Generate completion for the given prompt.
Args:
prompt (str): The prompt for which completion is to be generated.
Returns:
str: The completion generated by the LLM.
"""
return self.llm_instance.invoke(prompt)
openai_api_key = OpenAIManager()
os.environ[“OPENAI_MODEL_NAME”] = ‘gpt-4o’
crew = Crew(
agents=[planner, writer, editor],
tasks=[plan, write, edit],
verbose=2
)