From e540657868fb36ec7ab42e1574bb3b56865cc73c Mon Sep 17 00:00:00 2001 From: arkohut <39525455+arkohut@users.noreply.github.com> Date: Fri, 8 Nov 2024 01:33:46 +0800 Subject: [PATCH] fix: mill update --- memos/commands.py | 1 + memos/embedding.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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()