Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove contextual memory print statements #1566

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/crewai/memory/contextual/contextual_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def _fetch_stm_context(self, query) -> str:
formatted_results = "\n".join(
[f"- {result['context']}" for result in stm_results]
)
print("formatted_results stm", formatted_results)
return f"Recent Insights:\n{formatted_results}" if stm_results else ""

def _fetch_ltm_context(self, task) -> Optional[str]:
Expand All @@ -54,8 +53,6 @@ def _fetch_ltm_context(self, task) -> Optional[str]:
formatted_results = list(dict.fromkeys(formatted_results))
formatted_results = "\n".join([f"- {result}" for result in formatted_results]) # type: ignore # Incompatible types in assignment (expression has type "str", variable has type "list[str]")

print("formatted_results ltm", formatted_results)

return f"Historical Data:\n{formatted_results}" if ltm_results else ""

def _fetch_entity_context(self, query) -> str:
Expand All @@ -67,5 +64,4 @@ def _fetch_entity_context(self, query) -> str:
formatted_results = "\n".join(
[f"- {result['context']}" for result in em_results] # type: ignore # Invalid index type "str" for "str"; expected type "SupportsIndex | slice"
)
print("formatted_results em", formatted_results)
return f"Entities:\n{formatted_results}" if em_results else ""
Loading