Skip to content

Commit b24ed73

Browse files
committed
formatter
1 parent 10e76ee commit b24ed73

File tree

2 files changed

+11
-7
lines changed
  • datapizza-ai-clients/datapizza-ai-clients-google/datapizza/clients/google
  • datapizza-ai-core/datapizza/core/embedder

2 files changed

+11
-7
lines changed

datapizza-ai-clients/datapizza-ai-clients-google/datapizza/clients/google/google_client.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,11 @@ def _response_to_client_response(
592592
)
593593
)
594594
else:
595-
if hasattr(response, "candidates") and response.candidates and response.candidates[0].content.parts:
595+
if (
596+
hasattr(response, "candidates")
597+
and response.candidates
598+
and response.candidates[0].content.parts
599+
):
596600
for part in response.candidates[0].content.parts:
597601
# Handle inline_data (images from generation or code execution)
598602
if hasattr(part, "inline_data") and part.inline_data is not None:
@@ -602,8 +606,8 @@ def _response_to_client_response(
602606
source=base64.b64encode(part.inline_data.data).decode(
603607
"utf-8"
604608
),
605-
extension=(part.inline_data.mime_type.split("/")[-1])
606-
if part.inline_data.mime_type
609+
extension=(part.inline_data.mime_type.split("/")[-1])
610+
if part.inline_data.mime_type
607611
else "png",
608612
)
609613
blocks.append(MediaBlock(media=media))

datapizza-ai-core/datapizza/core/embedder/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from abc import abstractmethod
2+
from typing import Generic, TypeVar
23

34
from datapizza.core.models import PipelineComponent
4-
from datapizza.type import SparseEmbedding
5-
from typing import TypeVar, Generic
65

7-
T = TypeVar('T')
6+
T = TypeVar("T")
87

9-
class BaseEmbedder(PipelineComponent,Generic[T]):
8+
9+
class BaseEmbedder(PipelineComponent, Generic[T]):
1010
client: object
1111
a_client: object
1212

0 commit comments

Comments
 (0)