diff --git a/memos/config.py b/memos/config.py index 51f813f..9470bca 100644 --- a/memos/config.py +++ b/memos/config.py @@ -3,10 +3,14 @@ from pathlib import Path from pydantic_settings import BaseSettings, SettingsConfigDict from pydantic import BaseModel + class VLMSettings(BaseModel): - enabled: bool = False - modelname: str = "internvl-1.5" - endpoint: str = "http://localhost:11434" + enabled: bool = True + modelname: str = "moondream" + endpoint: str = "https://localhost:11434" + token: str = "" + concurrency: int = 4 + class OCRSettings(BaseModel): enabled: bool = True @@ -16,9 +20,9 @@ class OCRSettings(BaseModel): class EmbeddingSettings(BaseModel): - num_dim: int = 1536 - ollama_endpoint: str = "http://host.docker.internal:11434" - ollama_model: str = "arkohut/gte-qwen2-1.5b-instruct:q8_0" + num_dim: int = 768 + ollama_endpoint: str = "http://localhost:11434" + ollama_model: str = "jina/jina-embeddings-v2-base-en" class Settings(BaseSettings): @@ -34,8 +38,9 @@ class Settings(BaseSettings): typesense_port: str = "8108" typesense_protocol: str = "http" typesense_api_key: str = "xyz" - typesense_connection_timeout_seconds: int = 2 + typesense_connection_timeout_seconds: int = 10 typesense_collection_name: str = "entities" + # Server settings server_port: int = 8080 diff --git a/memos/indexing.py b/memos/indexing.py index 8c50013..283246f 100644 --- a/memos/indexing.py +++ b/memos/indexing.py @@ -62,7 +62,7 @@ def get_embeddings(texts: List[str]) -> List[List[float]]: for embedding in response.json()["embeddings"] ] else: - raise Exception(f"Failed to get embeddings: {response.text}") + raise Exception(f"Failed to get embeddings: {response.text} {response.status_code}") def generate_metadata_text(metadata_entries):