-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[BUG] Use LTM #2026
Comments
Same issue! +1 |
- Replace EnhanceLongTermMemory with LongTermMemory to match actual implementation - Update code examples to show correct usage - Fixes #2026 Co-Authored-By: Joe Moura <[email protected]>
This was a documentation issue where the docs showed from crewai import Crew
from crewai.memory.long_term.long_term_memory import LongTermMemory
from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
long_term_memory=LongTermMemory(
storage=LTMSQLiteStorage(
db_path='/my_data_dir/my_crew1/long_term_memory_storage.db'
)
)
) |
This was a documentation issue where the docs showed from crewai import Crew
from crewai.memory import LongTermMemory
from crewai.memory.storage import LTMSQLiteStorage
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
long_term_memory=LongTermMemory(
storage=LTMSQLiteStorage(
db_path='/memory.db'
)
)
) The PR includes additional improvements like proper type hints, security considerations, and configuration examples. All CI checks have passed and the PR is ready for review. |
Got imports working with this:
Getting error:
|
* docs: fix long term memory class name in examples - Replace EnhanceLongTermMemory with LongTermMemory to match actual implementation - Update code examples to show correct usage - Fixes #2026 Co-Authored-By: Joe Moura <[email protected]> * docs: improve memory examples with imports, types and security - Add proper import statements - Add type hints for better readability - Add descriptive comments for each memory type - Add security considerations section - Add configuration examples section - Use environment variables for storage paths Co-Authored-By: Joe Moura <[email protected]> * Update memory.mdx * Update memory.mdx --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura <[email protected]> Co-authored-by: João Moura <[email protected]>
* docs: fix long term memory class name in examples - Replace EnhanceLongTermMemory with LongTermMemory to match actual implementation - Update code examples to show correct usage - Fixes #2026 Co-Authored-By: Joe Moura <[email protected]> * docs: improve memory examples with imports, types and security - Add proper import statements - Add type hints for better readability - Add descriptive comments for each memory type - Add security considerations section - Add configuration examples section - Use environment variables for storage paths Co-Authored-By: Joe Moura <[email protected]> * Update memory.mdx * Update memory.mdx --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura <[email protected]> Co-authored-by: João Moura <[email protected]>
`ImportError Traceback (most recent call last) ImportError: cannot import name 'LTMSQLiteStorage' from 'crewai.memory.storage' (unknown location)` The documentation issue still persists. Imports worked with:
It has created long_term_memory.db file. However, it's giving memory and validation error and asking for openAI API key. Seems like it's trying to use OpenAI embeddings, but in the documentation it's mentioned that it uses SQLite3 to store task results. Am I missing something or doing something wrong? Following is the error: MEMORY ERROR: An error occurred during database initialization: unable to open database file from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage tracebackhide tells pytest and some other tools to omit this function from tracebacks I am using python 3.10.16 and crewai = 0.100.1 |
Description
Based on Documentation i am trying to use
But it doesn't look like it's working am i missing any import or something is off as these classes doesn't look exist.
Docs link: https://docs.crewai.com/concepts/memory
Steps to Reproduce
Follow steps from docs: https://docs.crewai.com/concepts/memory
Expected behavior
Should be able to save result into database
Screenshots/Code snippets
None
Operating System
Windows 11
Python Version
3.11
crewAI Version
0.100.0
crewAI Tools Version
latest
Virtual Environment
Venv
Evidence
none
Possible Solution
some class neds to be imported
Additional context
none
The text was updated successfully, but these errors were encountered: