Skip to content

Commit

Permalink
Merge pull request #137 from tjmlabs/logger
Browse files Browse the repository at this point in the history
solve embedding service json response issue
  • Loading branch information
HalemoGPA authored Feb 5, 2025
2 parents 3e0cac7 + d19e0ac commit 9802e5a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions web/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
from django_stubs_ext.db.models import TypedModelMeta
from pdf2image import convert_from_bytes
from pgvector.django import HalfVectorField
from tenacity import (retry, retry_if_exception_type, stop_after_attempt,
wait_fixed)
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_fixed

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -257,9 +256,7 @@ async def send_batch(
raise ValidationError(
f"Failed to get embeddings from the embeddings service. Repsonse: {out}"
)
logger.info(
f"Got embeddings for batch of {len(images)} images. delayTime: {out['delayTime']}, executionTime: {out['executionTime']}"
)
logger.info(f"Got embeddings for batch of {len(images)} images.")
return out["output"]["data"]

base64_images = await self._prep_document(use_proxy=use_proxy)
Expand Down

0 comments on commit 9802e5a

Please sign in to comment.