Skip to content

v0.7.0

Compare
Choose a tag to compare
@release-please release-please released this 28 Jan 22:40
7ad2a01

0.7.0 (2025-01-28)

⚠ BREAKING CHANGES

  • Remove skip_project_and_location_in_path from async models.list
  • remove "tuning.distill"
  • Change asynchronous streaming output to an awaitable async iterator for client.aio.models.generate_content_stream and client.aio.chat.send_message_stream
  • Remove pillow as a required dependency
  • rename batches.list method signature.
  • make Part, FunctionDeclaration, Image, and GenerateContentResponse classmethods argument keyword only
  • Remove skip_project_and_location_in_path from HttpOption
  • Renamed FunctionDeclaration class functions to reflect the fact that they work off of the Callable type not just functions.
  • Moved the HttpOptions class into types.py, by making it autogenerated. This causes the following breaking change:
  • rename generate_image() to generate_images(), rename GenerateImageConfig to GenerateImagesConfig, rename GenerateImageResponse to GenerateImagesResponse, rename GenerateImageParameters to GenerateImagesParameters

Features

  • [genai-modules][models] Add HttpOptions to all method configs for models. (76fdde7)
  • Add support for enhance_prompt to model.generate_image (d09e14e)
  • Added support for the new HttpOptions class in the per request options overrides. (ad57025)
  • Change asynchronous streaming output to an awaitable async iterator for client.aio.models.generate_content_stream and client.aio.chat.send_message_stream (0c124eb)
  • Enable enum support in the GenerateContentConfig.response_schema (fe82e10)
  • Handle a wider variety of response_schemas - primitives and nested lists. (24fffea)
  • Images - Added Image.mime_type (71a8f1d)
  • Make Part, FunctionDeclaration, Image, and GenerateContentResponse classmethods argument keyword only (b58f4e0)
  • Remove skip_project_and_location_in_path from async models.list (d788626)
  • Remove skip_project_and_location_in_path from HttpOption (a1c0435)
  • Support GenerateContentResponse.parsed to return Enum (e214211)
  • Validate enum value for different backend endpoint. (97bb958)

Bug Fixes

  • Add required key to nested fields in function declaration schemas (c7dba47)
  • Fix pydantic list support in Python 3.9 and 3.10 (fixes #52) (81150b3)
  • Handle nullable types in pydantic classes (fixes #62) (773e1c0)
  • Support parameterized generics Union type in automatic function calling parameters (fixes #22) (04475ab)

Documentation

  • Add examples & tests for thinking model (59e2763)
  • Correct usage (0c546de)
  • Document experimental state of the live module. (115ac47)
  • Fix Blob type docstring. (7f38e55)
  • Remove repeated docstring for interrupted in docs (230cfbc)
  • Remove the word "class" in docstring and sync Live types docstring up-to-date (7fa3ef3)
  • Update supported model parameter format for generate_content (a5c3a1c)

Code Refactoring

  • Moved the HttpOptions class into types.py, by making it autogenerated. This causes the following breaking change: (ad57025)
  • Remove "tuning.distill" (ca8cd5e)
  • Remove pillow as a required dependency (8ccdf2e)
  • Rename batches.list method signature. (aa7c071)
  • Rename generate_image() to generate_images(), rename GenerateImageConfig to GenerateImagesConfig, rename GenerateImageResponse to GenerateImagesResponse, rename GenerateImageParameters to GenerateImagesParameters (65d7bf5)
  • Renamed FunctionDeclaration class functions to reflect the fact that they work off of the Callable type not just functions. (0e4a003)