diff --git a/docs/how-to/agentops-observability.mdx b/docs/how-to/agentops-observability.mdx index ce50d1fc5..b6ade320e 100644 --- a/docs/how-to/agentops-observability.mdx +++ b/docs/how-to/agentops-observability.mdx @@ -57,7 +57,7 @@ This feature is useful for debugging and understanding how agents interact with Install AgentOps with: ```bash - pip install crewai[agentops] + pip install 'crewai[agentops]' ``` or ```bash diff --git a/src/crewai/agents/crew_agent_executor.py b/src/crewai/agents/crew_agent_executor.py index 00545e760..649360e30 100644 --- a/src/crewai/agents/crew_agent_executor.py +++ b/src/crewai/agents/crew_agent_executor.py @@ -299,7 +299,7 @@ class CrewAgentExecutor(CrewAgentExecutorMixin): self._i18n.slice("summarizer_system_message"), role="system" ), self._format_msg( - self._i18n.slice("sumamrize_instruction").format(group=group), + self._i18n.slice("summarize_instruction").format(group=group), ), ], callbacks=self.callbacks, diff --git a/src/crewai/cli/templates/crew/config/tasks.yaml b/src/crewai/cli/templates/crew/config/tasks.yaml index f30820855..e6c0870a2 100644 --- a/src/crewai/cli/templates/crew/config/tasks.yaml +++ b/src/crewai/cli/templates/crew/config/tasks.yaml @@ -12,6 +12,6 @@ reporting_task: Review the context you got and expand each topic into a full section for a report. Make sure the report is detailed and contains any and all relevant information. expected_output: > - A fully fledge reports with the mains topics, each with a full section of information. + A fully fledged report with the main topics, each with a full section of information. Formatted as markdown without '```' agent: reporting_analyst diff --git a/src/crewai/memory/user/user_memory.py b/src/crewai/memory/user/user_memory.py index 25e36617c..24e5fe035 100644 --- a/src/crewai/memory/user/user_memory.py +++ b/src/crewai/memory/user/user_memory.py @@ -37,7 +37,7 @@ class UserMemory(Memory): limit: int = 3, score_threshold: float = 0.35, ): - results = super().search( + results = self.storage.search( query=query, limit=limit, score_threshold=score_threshold, diff --git a/src/crewai/task.py b/src/crewai/task.py index af5b34c54..cedb73c09 100644 --- a/src/crewai/task.py +++ b/src/crewai/task.py @@ -1,6 +1,6 @@ import datetime import json -import os +from pathlib import Path import threading import uuid from concurrent.futures import Future @@ -393,12 +393,13 @@ class Task(BaseModel): if self.output_file is None: raise ValueError("output_file is not set.") - directory = os.path.dirname(self.output_file) # type: ignore # Value of type variable "AnyOrLiteralStr" of "dirname" cannot be "str | None" + resolved_path = Path(self.output_file).expanduser().resolve() + directory = resolved_path.parent - if directory and not os.path.exists(directory): - os.makedirs(directory) + if not directory.exists(): + directory.mkdir(parents=True, exist_ok=True) - with open(self.output_file, "w", encoding="utf-8") as file: + with resolved_path.open("w", encoding="utf-8") as file: if isinstance(result, dict): import json diff --git a/src/crewai/translations/en.json b/src/crewai/translations/en.json index d30606dc0..7353cfc33 100644 --- a/src/crewai/translations/en.json +++ b/src/crewai/translations/en.json @@ -19,7 +19,7 @@ "human_feedback": "You got human feedback on your work, re-evaluate it and give a new Final Answer when ready.\n {human_feedback}", "getting_input": "This is the agent's final answer: {final_answer}\n\n", "summarizer_system_message": "You are a helpful assistant that summarizes text.", - "sumamrize_instruction": "Summarize the following text, make sure to include all the important information: {group}", + "summarize_instruction": "Summarize the following text, make sure to include all the important information: {group}", "summary": "This is a summary of our conversation so far:\n{merged_summary}", "manager_request": "Your best answer to your coworker asking you this, accounting for the context shared.", "formatted_task_instructions": "Ensure your final answer contains only the content in the following format: {output_format}\n\nEnsure the final output does not include any code block markers like ```json or ```python.",