mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-08 15:48:29 +00:00
fix: update contextual_memory to use 'limit' instead of 'latest_n'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
from crewai.memory import (
|
||||
EntityMemory,
|
||||
@@ -83,7 +83,7 @@ class ContextualMemory:
|
||||
if self.ltm is None:
|
||||
return ""
|
||||
|
||||
ltm_results = self.ltm.search(task, latest_n=2)
|
||||
ltm_results = self.ltm.search(task, limit=2)
|
||||
if not ltm_results:
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user