File tree Expand file tree Collapse 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 Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff 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 ))
Original file line number Diff line number Diff line change 11from abc import abstractmethod
2+ from typing import Generic , TypeVar
23
34from 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
You can’t perform that action at this time.
0 commit comments