fix: mill update

This commit is contained in:
arkohut 2024-11-08 01:33:46 +08:00
parent ef1ffa9468
commit e540657868
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Standard library imports # Standard library imports
import os import os
import time
import logging import logging
from pathlib import Path from pathlib import Path
from datetime import datetime, timedelta from datetime import datetime, timedelta

View File

@ -74,7 +74,7 @@ def get_embeddings(texts: List[str]) -> List[List[float]]:
def get_remote_embeddings(texts: List[str]) -> List[List[float]]: def get_remote_embeddings(texts: List[str]) -> List[List[float]]:
payload = {"model": settings.embedding.model, "input": texts} payload = {"model": settings.embedding.model, "input": texts}
with httpx.Client() as client: with httpx.Client(timeout=60) as client:
try: try:
response = client.post(settings.embedding.endpoint, json=payload) response = client.post(settings.embedding.endpoint, json=payload)
response.raise_for_status() response.raise_for_status()