Skip to content

Releases: googleapis/go-genai

v1.0.0

09 Apr 03:57
7bbe1ea
Compare
Choose a tag to compare

1.0.0 (2025-04-09)

⚠ BREAKING CHANGES

  • Support SendClientContent/SendRealtimeInput/SendToolResponse methods in Session struct and remove Send method
  • Merge GenerationConfig to LiveConnectConfig. GenerationConfig is removed.
  • Change NewContentFrom... functions role param type from string to Role and miscs docstring improvements
  • Change some pointer to value type and value to pointer type

Features

  • Add domain to Web GroundingChunk (183ac49)
  • Add generationComplete notification to Live ServerContent (9a038b9)
  • Add session resumption to Live module (4a92461)
  • add session resumption. (507137b)
  • Add support for Chats streaming in Go SDK (9ee0523)
  • Add thinking_budget to ThinkingConfig for Gemini Thinking Models (f811ee4)
  • Add traffic type to GenerateContentResponseUsageMetadata (601add2)
  • Add types for configurable speech detection (f4e1b11)
  • Add types to support continuous sessions with a sliding window (5d4f5d7)
  • Add UsageMetadata to LiveServerMessage (4286c6b)
  • expose generation_complete, input/output_transcription & input/output_audio_transcription to SDK for Vertex Live API (0dbbc82)
  • Merge GenerationConfig to LiveConnectConfig. GenerationConfig is removed. (65b7c1c)
  • Remove experimental warnings for generate_videos and operations (2e4bb0b)
  • Support files delete, get, list, download/ (8e7b3fd)
  • Support files upload method (ce790dd)
  • support media resolution (825c81d)
  • Support SendClientContent/SendRealtimeInput/SendToolResponse methods in Session struct and remove Send method (c8ecaf4)
  • use io.Reader in Upload function and add a new convenience function UploadFromPath. fixes #222 (1c064e3)

Bug Fixes

  • Change NewContentFrom... functions role param type from string to Role and miscs docstring improvements (7810e07)
  • Change some pointer to value type and value to pointer type (0d2ba97)
  • fix Add() dead loop (afa2324)
  • Fix failing chat_test (aebbdaa)

v0.7.0

31 Mar 22:36
f557b5a
Compare
Choose a tag to compare

0.7.0 (2025-03-31)

⚠ BREAKING CHANGES

  • Add error return type to Close() function
  • consolidate NewUserContentFrom* and NewModelContentFrom* functions into NewContentFrom* to make API simpler
  • Support quota project and migrate ClientConfig.Credential from google.Credentials to auth.Credential type.
  • Change caches TTL field to duration type.
  • rename ClientError and ServerError to APIError. fixes: #159

Features

  • Add Chats module for Go SDK (non-stream only) (e7f75fd)
  • Add engine to VertexAISearch (cc2ab5d)
  • add IMAGE_SAFTY enum value to FinishReason (cc6081a)
  • add MediaModalities for ModalityTokenCount (0969afd)
  • Add Veo 2 generate_videos support in Go SDK (5321a25)
  • allow title property to be sent to Gemini API. Gemini API now supports the title property, so it's ok to pass this onto both Vertex and Gemini API. (8f27aba)
  • consolidate NewUserContentFrom* and NewModelContentFrom* functions into NewContentFrom* to make API simpler (e8608b1)
  • merge GenerationConfig into LiveConnectConfig (96232de)
  • rename ClientError and ServerError to APIError. fixes: #159 (12adbfa)
  • Save prompt safety attributes in dedicated field for generate_images (eb3cfdc)
  • support new UsageMetadata fields (3a56c63)
  • Support quota project and migrate ClientConfig.Credential from google.Credentials to auth.Credential type. (74c05fb)

Bug Fixes

  • Add error return type to Close() function (673a7f7)
  • Change caches TTL field to duration type. (11271b4)
  • fix list models API url (036c4d3)
  • fix response modality in streaming mode. fixes #163. fixes #158 (996dac3)
  • missing zero value bug in setValueByPath. fixes #196 (557c6d8)
  • schema transformer logic fix. (8017092)
  • use snake_case in embed_content request/response parsing. fixes #174 (ba644e1)

Miscellaneous Chores

v0.6.0

19 Mar 22:13
7302e65
Compare
Choose a tag to compare

0.6.0 (2025-03-19)

⚠ BREAKING CHANGES

  • support duration type and remove NewPartFromVideoMetadata function
  • Change *time.Time type to time.Time.
  • remove error from the GenerateContentResponse.Text() return values and add more samples(text embedding, tokens, models)
  • change GenerateImageConfig.NumberOfImages to value type. And add clearer error message and docstring to other APIs.
  • Remove default role to "user" for GenerateContent and GenerateContentStream.

Features

  • Add base steps to EditImageConfig (e3c8252)
  • Change *time.Time type to time.Time. (d554a08)
  • change GenerateImageConfig.NumberOfImages to value type. And add clearer error message and docstring to other APIs. (a75a9ae)
  • enable union type for Schema when calling Gemini API. (2edcc55)
  • Remove default role to "user" for GenerateContent and GenerateContentStream. (74d4647)
  • remove error from the GenerateContentResponse.Text() return values and add more samples(text embedding, tokens, models) (1dc5c1c)
  • support duration type and remove NewPartFromVideoMetadata function (b2a13ab)
  • Support global endpoint in go natively (a29b806)
  • Support returned safety attributes for generate_images (cc2bf1a)

Bug Fixes

  • Make month and day optional for PublicationDate. fixes #141 (8a61516)
  • Remove unsupported parameter negative_prompt from Gemini API generate_images (be2619d)

Miscellaneous Chores

v0.5.0

06 Mar 22:19
8d3b47d
Compare
Choose a tag to compare

0.5.0 (2025-03-06)

⚠ BREAKING CHANGES

  • change int64, float64 types to int32, unit32, float32 to prevent data loss
  • remove ClientConfig.Timeout and add HTTPOptions to ...Config structs

Features

  • Add Headers field into HTTPOption struct (5ec9ff4)
  • Add response_id and create_time to GenerateContentResponse (f46d996)
  • added Models.list() function (6c2eae4)
  • enable minItem, maxItem, nullable for Schema type when calling Gemini API. (fb6c8a5)
  • enable quick accessor of executable code and code execution result in GenerateContentResponse (21ca251)
  • remove ClientConfig.Timeout and add HTTPOptions to ...Config structs (ba6c431)
  • Support aspect ratio for edit_image (06d554f)
  • support edit image and add sample for imagen (f332cf2)
  • Support Models.EmbedContent function (a71f0a7)

Bug Fixes

  • change int64, float64 types to int32, unit32, float32 to prevent data loss (af83fa7)
  • log warning instead of throwing error for GenerateContentResponse.text() quick accessor when there are mixed types of parts. (006e3af)

Miscellaneous Chores

v0.4.0

24 Feb 20:27
9a44b19
Compare
Choose a tag to compare

0.4.0 (2025-02-24)

Features

  • Add Imagen upscale_image support for Go (8e2afe9)
  • introduce usability functions to allow quick creation of user content and model content. (12b5dee)
  • support list all caches in List and All functions (addc388)
  • support Models .Get, .Update, .Delete (e67cd8b)

Bug Fixes

  • fix the civil.Date parsing in Citation struct. fixes #106 (f530fcf)
  • missing context in request. fixes #104 (747c5ef)
  • Remove request body when it's empty. (cfc82e3)

v0.3.0

12 Feb 16:36
e6f1e4d
Compare
Choose a tag to compare

0.3.0 (2025-02-12)

Features

  • Enable Media resolution for Gemini API. (a22788b)
  • support property_ordering in response_schema (fixes #236) (ac45038)

v0.2.0

05 Feb 15:36
db84d4c
Compare
Choose a tag to compare

0.2.0 (2025-02-05)

Features

  • Add enhanced_prompt to GeneratedImage class (449f0fb)
  • Add labels for GenerateContent requests (98231e5)

Bug Fixes

  • remove unsupported parameter from Gemini API (39c8868)
  • Use camel case for Go function parameters (94765e6)

v0.1.0

29 Jan 18:47
379c6ab
Compare
Choose a tag to compare

0.1.0 (2025-01-29)

⚠ BREAKING CHANGES

  • Make some numeric fields to pointer type and bool fields to value type, and rename ControlReferenceTypeControlType* constants

Features

  • [genai-modules][models] Add HttpOptions to all method configs for models. (765c9b7)
  • Add Imagen generate_image support for Go SDK (068fe54)
  • Add support for audio_timestamp to types.GenerateContentConfig (fixes #132) (cfede62)
  • Add support for enhance_prompt to model.generate_image (a35f52a)
  • Add ThinkingConfig to generate content config. (ad73778)
  • enable Text() and FunctionCalls() quick accessor for GenerateContentResponse (3f3a450)
  • Images - Added Image.mime_type (3333511)
  • introducing HTTPOptions to Client (e3d1d8e)
  • make Part, FunctionDeclaration, Image, and GenerateContentResponse classmethods argument keyword only (f7d1043)
  • Make some numeric fields to pointer type and bool fields to value type, and rename ControlReferenceTypeControlType* constants (ee4e5a4)
  • support caches create/update/get/update in Go SDK (0620d97)
  • support usability constructor functions for Part struct (831b879)

Miscellaneous Chores

Code Refactoring

  • rename GenerateImage() to GenerateImage(), rename GenerateImageConfig to GenerateImagesConfig, rename GenerateImageResponse to GenerateImagesResponse, rename GenerateImageParameters to GenerateImagesParameters (ebb231f)

v0.0.1

10 Jan 19:29
bb8ebdc
Compare
Choose a tag to compare

0.0.1 (2025-01-10)

Features

  • enable response_logprobs and logprobs for Google AI (#17) (51f2744)
  • Go SDK Live module implementation for GoogleAI backend (f88e65a)
  • Go SDK Live module initial implementation for VertexAI. (4d82dc0)

Bug Fixes

  • change string type to numeric types (bfdc94f)
  • fix README typo (5ae8aa6)