Releases: googleapis/go-genai
Releases · googleapis/go-genai
v1.0.0
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
v0.7.0
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
- release 0.7.0 (06523b4)
v0.6.0
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
- release 0.6.0 (f636767)
v0.5.0
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
- release 0.5.0 (14bdd8f)
v0.4.0
v0.3.0
v0.2.0
v0.1.0
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
- Released as 0.1.0 (e046125)
Code Refactoring
- rename GenerateImage() to GenerateImage(), rename GenerateImageConfig to GenerateImagesConfig, rename GenerateImageResponse to GenerateImagesResponse, rename GenerateImageParameters to GenerateImagesParameters (ebb231f)