Skip to content

Commit 2d12f54

Browse files
yyyu-googlecopybara-github
authored andcommitted
docs: log warning to users that Part.from_video_metadata will be deprecated.
PiperOrigin-RevId: 738977752
1 parent 3a65fb0 commit 2d12f54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

google/genai/types.py

+5
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,11 @@ def from_function_response(
623623

624624
@classmethod
625625
def from_video_metadata(cls, *, start_offset: str, end_offset: str) -> 'Part':
626+
logger.warning("""Part.from_video_metadata will be deprecated soon.
627+
Because a Part instance needs to include at least one of the fields:
628+
text, file_data, inline_data, function_call, function_response, executable_code or code_execution_result.
629+
A Part instance contains only video_metadata is not a valid Part.
630+
""")
626631
video_metadata = VideoMetadata(
627632
end_offset=end_offset, start_offset=start_offset
628633
)

0 commit comments

Comments
 (0)