Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: remove Part.from_video_metadata #511

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions google/genai/tests/types/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ def test_factory_method_from_function_response_part():
assert isinstance(my_part, SubPart)


def test_factory_method_from_video_metadata_part():
my_part = SubPart.from_video_metadata(start_offset='10s', end_offset='20s')
assert my_part.video_metadata.end_offset == '20s'
assert my_part.video_metadata.start_offset == '10s'
assert isinstance(my_part, SubPart)


def test_factory_method_from_executable_code_part():
my_part = SubPart.from_executable_code(
code='print("hello")', language='PYTHON'
Expand Down
7 changes: 0 additions & 7 deletions google/genai/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,13 +621,6 @@ def from_function_response(
function_response = FunctionResponse(name=name, response=response)
return cls(function_response=function_response)

@classmethod
def from_video_metadata(cls, *, start_offset: str, end_offset: str) -> 'Part':
video_metadata = VideoMetadata(
end_offset=end_offset, start_offset=start_offset
)
return cls(video_metadata=video_metadata)

@classmethod
def from_executable_code(cls, *, code: str, language: Language) -> 'Part':
executable_code = ExecutableCode(code=code, language=language)
Expand Down