mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-16 04:18:35 +00:00
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Joe Moura <joao@crewai.com> Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f8f9df6d1d
commit
9fc84fc1ac
@@ -60,7 +60,8 @@ my_crew = Crew(
|
|||||||
```python Code
|
```python Code
|
||||||
from crewai import Crew, Process
|
from crewai import Crew, Process
|
||||||
from crewai.memory import LongTermMemory, ShortTermMemory, EntityMemory
|
from crewai.memory import LongTermMemory, ShortTermMemory, EntityMemory
|
||||||
from crewai.memory.storage import LTMSQLiteStorage, RAGStorage
|
from crewai.memory.storage.rag_storage import RAGStorage
|
||||||
|
from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
# Assemble your crew with memory capabilities
|
# Assemble your crew with memory capabilities
|
||||||
@@ -119,7 +120,7 @@ Example using environment variables:
|
|||||||
import os
|
import os
|
||||||
from crewai import Crew
|
from crewai import Crew
|
||||||
from crewai.memory import LongTermMemory
|
from crewai.memory import LongTermMemory
|
||||||
from crewai.memory.storage import LTMSQLiteStorage
|
from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage
|
||||||
|
|
||||||
# Configure storage path using environment variable
|
# Configure storage path using environment variable
|
||||||
storage_path = os.getenv("CREWAI_STORAGE_DIR", "./storage")
|
storage_path = os.getenv("CREWAI_STORAGE_DIR", "./storage")
|
||||||
@@ -148,7 +149,7 @@ crew = Crew(memory=True) # Uses default storage locations
|
|||||||
```python
|
```python
|
||||||
from crewai import Crew
|
from crewai import Crew
|
||||||
from crewai.memory import LongTermMemory
|
from crewai.memory import LongTermMemory
|
||||||
from crewai.memory.storage import LTMSQLiteStorage
|
from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage
|
||||||
|
|
||||||
# Configure custom storage paths
|
# Configure custom storage paths
|
||||||
crew = Crew(
|
crew = Crew(
|
||||||
|
|||||||
Reference in New Issue
Block a user