From 5e29ac5f7bdd33420291cc28624d460d4ff5ce00 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 19:53:24 +0000 Subject: [PATCH] Fix linting and type checking issues Co-Authored-By: Joe Moura --- src/crewai/memory/contextual/contextual_memory.py | 2 +- tests/memory/test_custom_storage.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/crewai/memory/contextual/contextual_memory.py b/src/crewai/memory/contextual/contextual_memory.py index cdb9cf836..1f86281fc 100644 --- a/src/crewai/memory/contextual/contextual_memory.py +++ b/src/crewai/memory/contextual/contextual_memory.py @@ -58,7 +58,7 @@ class ContextualMemory: Fetches historical data or insights from LTM that are relevant to the task's description and expected_output, formatted as bullet points. """ - ltm_results = self.ltm.search(task, latest_n=2) + ltm_results = self.ltm.search(query=task, limit=2) if not ltm_results: return None diff --git a/tests/memory/test_custom_storage.py b/tests/memory/test_custom_storage.py index dd632381d..2f80ecd4c 100644 --- a/tests/memory/test_custom_storage.py +++ b/tests/memory/test_custom_storage.py @@ -1,12 +1,13 @@ -import pytest from typing import Any, Dict, List -from crewai.crew import Crew +import pytest + from crewai.agent import Agent -from crewai.memory.storage.interface import Storage -from crewai.memory.short_term.short_term_memory import ShortTermMemory -from crewai.memory.long_term.long_term_memory import LongTermMemory +from crewai.crew import Crew from crewai.memory.entity.entity_memory import EntityMemory +from crewai.memory.long_term.long_term_memory import LongTermMemory +from crewai.memory.short_term.short_term_memory import ShortTermMemory +from crewai.memory.storage.interface import Storage from crewai.memory.user.user_memory import UserMemory