Google-generativeai

Latest version: v0.8.3

Safety actively analyzes 682457 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.6.0

What's Changed

Features

* Add `genai.protos` to discourage direct use of google.ai.generativelanguage by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/354
* Add video metadata and error to File by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/348
* Restrict Harm category to the subset supported by Gemini by aertoria in https://github.com/google-gemini/generative-ai-python/pull/295
* Improve request_options by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/297
* Add GenerateContentResponse.to_dict() by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/337
* Quick safety filtering: Allow `safety_settings="block_none"` by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/347


Bugfixes

* Cleanup file data handling. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/321
* Allow count_tokens with no `contents`. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/342
* improve the no-credentials error message, fail fast for no-credentials in colab. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/352
* Make printing less verbose. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/340
* Add request options to chat. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/341
* Handle image RGBA mode by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/374

Docs

* Fix bugs, improve code clarity, and enhance overall reliability across several files. by Faisal-Alsrheed in https://github.com/google-gemini/generative-ai-python/pull/339
* Enhance functions Documentation and Improve Error Messages by Faisal-Alsrheed in https://github.com/google-gemini/generative-ai-python/pull/350
* Fix argument description. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/338
* Update __init__.py to use the latest model by logankilpatrick in https://github.com/google-gemini/generative-ai-python/pull/362


New Contributors
* Faisal-Alsrheed made their first contribution in https://github.com/google-gemini/generative-ai-python/pull/339
* logankilpatrick made their first contribution in https://github.com/google-gemini/generative-ai-python/pull/362

**Full Changelog**: https://github.com/google-gemini/generative-ai-python/compare/v0.5.4...v0.6.0

0.5.4

What's Changed

* Update version of generativelanguage to fix timeout errors. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/345

0.5.3

What's Changed

Features

* Extend permissions service support to Tuned Models by mayureshagashe2105 in https://github.com/google-gemini/generative-ai-python/pull/219
* Support improved CountTokens and usage_metadata output by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/315
* Add JSON schema support
* Add response_schema parameter by shilpakancharla in https://github.com/google-gemini/generative-ai-python/pull/302
* Improve schema support by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/309
* Upgrade file handling
* Add file state by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/316
* Add support for resumable uploads for File API by TYMichaelChen in https://github.com/google-gemini/generative-ai-python/pull/275
* Return full file details at the end of create. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/314
* Update client.py by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/325

Bugfixes

* update_time defined twice hence removing once. by PandasPirate in https://github.com/google-gemini/generative-ai-python/pull/301
* Add main async code match test by mayureshagashe2105 in https://github.com/google-gemini/generative-ai-python/pull/299
* Copy test cases over for new responder.py by shilpakancharla in https://github.com/google-gemini/generative-ai-python/pull/303

* Add f to f-string by markmcd in https://github.com/google-gemini/generative-ai-python/pull/322

Docs

* Debug docs build. by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/298
* Update issue templates to point to the Discourse forum by ymodak in https://github.com/google-gemini/generative-ai-python/pull/304
* typo by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/313

New Contributors
* PandasPirate made their first contribution in https://github.com/google-gemini/generative-ai-python/pull/301

**Full Changelog**: https://github.com/google-gemini/generative-ai-python/compare/v0.5.2...v0.5.3

0.5.2

Bug Fix

* Fix file uploads by MarkDaoust in https://github.com/google-gemini/generative-ai-python/pull/291

New Features

* Support for new `TaskTypes` and `output_dimensionality` param by mayureshagashe2105 in https://github.com/google-gemini/generative-ai-python/pull/285


**Full Changelog**: https://github.com/google-gemini/generative-ai-python/compare/v0.5.1...v0.5.2

0.5.1

New features

* Add JSON mode by shilpakancharla in https://github.com/google/generative-ai-python/pull/274

Docs and small fixes

* Fix: incorrect type checking by Yeuoly in https://github.com/google/generative-ai-python/pull/283
* Fix an internal test failure by markmcd in https://github.com/google/generative-ai-python/pull/279
* Allow incomplete GenerationConfigDict by markmcd in https://github.com/google/generative-ai-python/pull/286
* Use generativelanguage v0.6.2 for json mode + update package version. by MarkDaoust in https://github.com/google/generative-ai-python/pull/287

New Contributors
* Yeuoly made their first contribution in https://github.com/google/generative-ai-python/pull/283

**Full Changelog**: https://github.com/google/generative-ai-python/compare/v0.5.0...v0.5.1

0.5.0

What's Changed

New features

* Files API

You can now upload files to the api. Then instead of resending an image with each request, just pass a file reference in your prompt:


f = genai.upload_file(path="image.png")
m = genai.GenerativeModel(model_name=...)
response = m.generate_content(["Please describe this file:", f])

* Add initial prototype supporting the files API by MarkDaoust in https://github.com/google/generative-ai-python/pull/249
* Files API: improve error messages, add delete_file, add `.uri` property by TYMichaelChen in https://github.com/google/generative-ai-python/pull/260

* Semantic retriever

Using `answer.generate_answer`, you can now either pass "inline_passages" to include the reference material in the request:

from google.generativeai import answer
answer.generate_answer(
content=question,
inline_passages=splitter.split(document)
)

Or pass a reference to a retriever Document or Corpus:


from google.generativeai import answer
from google.generativeai import retriever
my_corpus = retriever.get_corpus('my_corpus')
genai.generate_answer(
content=question,
semantic_retreiver=my_corpus
)


* Finish Semantic Retriever. by shilpakancharla in https://github.com/google/generative-ai-python/pull/230

* System instructions

When creating a model you can pass a string (or `Content`) as `system_instructions`: `genai.GenerativeModel(system_instructions="Be good!")`
* Add basic SI and tool_config support by MarkDaoust in https://github.com/google/generative-ai-python/pull/257
* Add `system_instruction` to model repr by markmcd in https://github.com/google/generative-ai-python/pull/272

* Function Calling - Tool Config

The list of tools available for function calling during a chat session is typically constant. The new `tool_config` argument lets you switch the function calling mode between `None` (No function calls), `Auto` (The model chooses to return text or a FunctionCall), and `Any` (the model must call a function).


model = genai.GenerativeModel(tools=[my_functions])
chat = model.start_chat()
chat.send_message(tool_config={"function_calling_config": "ANY"})


In `Any` mode the model will return a function call. You may also pass `allowed_function_names` to restrict the calls to a subset of the available functions: `chat.send_message(tool_config={"function_calling_config": "ANY", "allowed_function_names": [...]})

In `Any` mode the model can use constrained decoding to more strictly follow the argument specifications in the function declarations.

* Add basic SI and tool_config support by MarkDaoust in https://github.com/google/generative-ai-python/pull/257
* Function calling mode patch by mayureshagashe2105 in https://github.com/google/generative-ai-python/pull/271

Docs, bug fixes, and minor updates.

* Update README.md by aertoria in https://github.com/google/generative-ai-python/pull/256
* Fix incorrect reference to self.candidates[0].parts, self.candidates[0].parts[0].text by Andy963 in https://github.com/google/generative-ai-python/pull/239
* Fix TypedDict usage for compatibility with PyDantic by MarkDaoust in https://github.com/google/generative-ai-python/pull/259
* Simplify the Python SDK README by random-forests in https://github.com/google/generative-ai-python/pull/267
* Sdk update to use glm 0.6.1 by mayureshagashe2105 in https://github.com/google/generative-ai-python/pull/270

New Contributors
* aertoria made their first contribution in https://github.com/google/generative-ai-python/pull/256
* TYMichaelChen made their first contribution in https://github.com/google/generative-ai-python/pull/260
* random-forests made their first contribution in https://github.com/google/generative-ai-python/pull/267

**Full Changelog**: https://github.com/google/generative-ai-python/compare/v0.4.1...v0.5.0

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.