@@ -47,25 +47,24 @@ def _format_friendy_error_message(exception: Exception):
4747 "An invalid LLM was configured for an agent. "
4848 "Ensure the 'llm' attribute of the agent in the agents.yaml file is in the format <provider>/<model>."
4949 )
50- # This happens when the user has not configured the correct agent name in
51- # the tasks.yaml file.
50+ # The user has not configured the correct agent name in the tasks.yaml file.
5251 case ('KeyError' , m , t ) if 'self.tasks_config[task_name]["agent"]' in t [- 2 ]:
5352 return (
5453 f"The agent { message } is not defined in your agents file. "
55- "Ensure the 'agent' field in your tasks in tasks .yaml corresponds to an agent in the agents.yaml file."
54+ "Ensure the 'agent' fields in your tasks.yaml correspond to an entry in the agents.yaml file."
5655 )
57- # This happens when the user does not have an agent defined in agents.yaml
58- # file, but it does exist in the entrypoint code.
56+ # The user does not have an agent defined in agents.yaml file, but it does
57+ # exist in the entrypoint code.
5958 case ('KeyError' , m , t ) if 'config=self.agents_config[' in t [- 2 ]:
6059 return (
6160 f"The agent { message } is not defined in your agents file. "
6261 "Ensure all agents referenced in your code are defined in the agents.yaml file."
6362 )
64- # This happens when the user does not have a task defined in tasks.yaml
65- # file, but it does exist in the entrypoint code.
63+ # The user does not have a task defined in tasks.yaml file, but it does
64+ # exist in the entrypoint code.
6665 case ('KeyError' , m , t ) if 'config=self.tasks_config[' in t [- 2 ]:
6766 return (
68- f"The task { message } is not defined in your tasks file . "
67+ f"The task { message } is not defined in your tasks. "
6968 "Ensure all tasks referenced in your code are defined in the tasks.yaml file."
7069 )
7170 case (_, _, _):
0 commit comments