Fix user_id functionality (#2548)
This commit is contained in:
@@ -6,9 +6,12 @@ from pydantic import BaseModel, Field
|
||||
from mem0.embeddings.configs import EmbedderConfig
|
||||
from mem0.graphs.configs import GraphStoreConfig
|
||||
from mem0.llms.configs import LlmConfig
|
||||
from mem0.memory.setup import mem0_dir
|
||||
from mem0.vector_stores.configs import VectorStoreConfig
|
||||
|
||||
# Set up the directory path
|
||||
home_dir = os.path.expanduser("~")
|
||||
mem0_dir = os.environ.get("MEM0_DIR") or os.path.join(home_dir, ".mem0")
|
||||
|
||||
|
||||
class MemoryItem(BaseModel):
|
||||
id: str = Field(..., description="The unique identifier for the text data")
|
||||
|
||||
@@ -7,7 +7,7 @@ class AzureAISearchConfig(BaseModel):
|
||||
collection_name: str = Field("mem0", description="Name of the collection")
|
||||
service_name: str = Field(None, description="Azure AI Search service name")
|
||||
api_key: str = Field(None, description="API key for the Azure AI Search service")
|
||||
embedding_model_dims: int = Field(None, description="Dimension of the embedding vector")
|
||||
embedding_model_dims: int = Field(1536, description="Dimension of the embedding vector")
|
||||
compression_type: Optional[str] = Field(
|
||||
None, description="Type of vector compression to use. Options: 'scalar', 'binary', or None"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,9 @@ class LangchainConfig(BaseModel):
|
||||
try:
|
||||
from langchain_community.vectorstores import VectorStore
|
||||
except ImportError:
|
||||
raise ImportError("The 'langchain_community' library is required. Please install it using 'pip install langchain_community'.")
|
||||
raise ImportError(
|
||||
"The 'langchain_community' library is required. Please install it using 'pip install langchain_community'."
|
||||
)
|
||||
VectorStore: ClassVar[type] = VectorStore
|
||||
|
||||
client: VectorStore = Field(description="Existing VectorStore instance")
|
||||
|
||||
Reference in New Issue
Block a user