diff --git a/memos/commands.py b/memos/commands.py index 665d9a3..9173231 100644 --- a/memos/commands.py +++ b/memos/commands.py @@ -1,5 +1,6 @@ # Standard library imports import os +import time import logging from pathlib import Path from datetime import datetime, timedelta diff --git a/memos/embedding.py b/memos/embedding.py index 267bb6e..2326a0b 100644 --- a/memos/embedding.py +++ b/memos/embedding.py @@ -74,7 +74,7 @@ def get_embeddings(texts: List[str]) -> List[List[float]]: def get_remote_embeddings(texts: List[str]) -> List[List[float]]: payload = {"model": settings.embedding.model, "input": texts} - with httpx.Client() as client: + with httpx.Client(timeout=60) as client: try: response = client.post(settings.embedding.endpoint, json=payload) response.raise_for_status()