forked from google-gemini/deprecated-generative-ai-python
-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] main from google:main #12
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
Open
pull
wants to merge
298
commits into
hemanth:main
Choose a base branch
from
google-gemini:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Update docstring * update docstrings * 0.3.1
async def count_tokens( self, request: Optional[Union[generative_service.CountTokensRequest, dict]] = None, *, model: Optional[str] = None, contents: Optional[MutableSequence[content.Content]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), if you don't use keyword args : model=model, contents=contents, but position args, this will lead to : TypeError: count_tokens() takes from 1 to 2 positional arguments but 3 were given
…the readme (#129) * Update links to https://github.com/google/generative-ai-docs * Update links to https://github.com/google/generative-ai-docs
* aiter, anext not exist error * Un-skip test, format with black. * Fix aiter & anext implementations. --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
* Fix: Index out out range with empty parts [] while question was blocked by api, the parts is an empty list [], so the exp: if len(parts) > 1 or "text" not in parts[0]: will raise list index out of range, but not ValueError * simplify parts length check. * Update error message. --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
* fix: handle empty string in ChatSession.send_message * refactor: move empty string handling to content_types.to_content * ValueError --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
* Update comments in class GenerativeModel * typo --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
* import typeddict from typing_extentions * Add typing-extensions * Move shim logic to one file. * typo * simpilfy * order --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
* move notebook tests * move tests so presubmits test the notebook integration
* Fix build docs. * Update comment
* fix: lock google-auth version to fix #114 Signed-off-by: yihong0618 <zouzou0208@gmail.com> * fix: corrected version number, added rationale in comment --------- Signed-off-by: yihong0618 <zouzou0208@gmail.com> Co-authored-by: Mark McDonald <macd@google.com>
…#149) * docs: Correct examples in GenerativeMode.generate_content documentation * docs: Update README.md code snippets for language specification
* More readable error message --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
Adds some aliases for the commands too: * `%%palm` still works, for backwards compat * `%%llm` as a generic magic * `%%gemini` as an analogue to `%%palm`
Updated some test references too.
* Add a more explicit error when no `parts` returned When a response has been blocked, the API will return a `Candidate` (with `finish_reason`, `safety_ratings`, etc) that does not have `Part`s. Given blocking is common enough, and we can identify this case, I've added a more explicit (and helpful?) error message to guide users if this happens. * Run latest version of `black` These appear to be new changes, unrelated to this PR, but sure why not.
* Semantic retriever Change-Id: I5c4f35238f3bc0bbc798abd72cf824ebe1103152 * Adding parameter to re.sub for create_chunk function * attempting to fix pytype error with ChunkData and CustomMetadata * Adding async to semantic retriever functions * Update _flatten to flatten Co-authored-by: Mark Daoust <markdaoust@google.com> * Update google/generativeai/types/retriever_types.py Co-authored-by: Mark Daoust <markdaoust@google.com> * Update google/generativeai/client.py Co-authored-by: Mark Daoust <markdaoust@google.com> * Update google/generativeai/models.py Co-authored-by: Mark Daoust <markdaoust@google.com> * Resolving Github precheck failures * Changed .data to .string_value * Update _flatten_update_paths to flatten_update_paths * Updating async test cases for retriever * Added in client methods in async retriever test * Added all async test cases * Fixed all test cases locally * Updated async retriever tests * Fixing names in async test cases * Fixed async method for QueryCorpus * Added await statements * Reformatted file * Added async methods to test cases * Updated regex statements and removed redundancy from elif statements * Updates to create_chunk * Async code test update, dataclass updates * Skipping format check to resolve errors * Modified gitignore * Update to delete_document * Formatting check --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
Change-Id: I998fa990bc7dfb220e78cd7f9692c8530993d7c4
* Update setup.py * Create py.typed * Update setup.py to trigger CI. --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
* remove references to 1.0-pro Change-Id: I405c87d495c73550cfbd00a13249cb1e30ab0989 * remove references to gemini-pro Change-Id: Ied2f0b7112dd5d61390da3e84457a2fb3f770665 * Update models.py * format Change-Id: Ib3a0c90bfc6ec7f8f793917b3140769e2635a8e9
* Fix GenerationConfig, this doesn't match the API Change-Id: I4e0c3b45125023e056c3d7e1549eafb47e42815a * format Change-Id: I161dd7b9b371e005b4385faeaa84f6d141e09b43
* fixes 563 Change-Id: Ifb9743822c744845aac4deea9963a0c6e6389362 * Refresh docs for v0.8.3 Change-Id: I7536e809b9a1b8f26fc970a42c83000b0d607793 * remove align-left Change-Id: I0462300f198e3de020cbfc032e575e094b88d360 * format Change-Id: If83605c320d2b7255618737c2cd985a153584343 * refresh Change-Id: I0776467ac6471b2f8f06f089a54e447d149b7d78 * remove devsite headers Change-Id: I2d10299b5cffc2e353b71dacfabb3a7e9f22a9fd * remove devsite headers Change-Id: I1b9ca5bf2d46dbd39b8cb226d153107851e2e3f0
* Move imports into samples Change-Id: I86550a09c6555a36679dad517ed4239f7ded90ff * format Change-Id: I0c72841eb2ebad0075d0024624a42fe36fef883f
* fix: Pass along model_version in GenerateContentResponse. * Revert autogenerated doc files from 94eb16e. * Fix 'argument list too long' error and add couple vision examples (#634) * Update google-ai-generativelanguage version in requirements. * Format updated generation_types and test using black. --------- Co-authored-by: Vishal Dharmadhikari <61256217+vishal-dharm@users.noreply.github.com>
https: //github.com/google-gemini/cookbook/tree/e2623e8587f3d4ae13df65f415a3337c7f7ac97e/templates Change-Id: Ic50b279a769d2fe2263b1dee41541d7c950c0cfa
* Update setup.py * Update version.py
* Add migration guide to the readme. Change-Id: I6834a1ac98f208ffad9fdedba392c25109a3d023 * add links Change-Id: I992b94277878190aed5270adbb2b65d0f73423e6 * Fixing the colab button which was displayed on the same line as the next title --------- Co-authored-by: Guillaume Vernade <Giom-V@users.noreply.github.com>
* Update README.md * Update README.md
* IDK how this test is failing, but it shouldn't be here Change-Id: Ifd983a42a18f14df3c3b5dd8d4ac098a0e2bcf76 * black Change-Id: I972cdea7e3a4bd845dd849161d452b4f16134bfb
* Update generation_types.py * IDK how this test is failing, but it shouldn't be here Change-Id: Ifd983a42a18f14df3c3b5dd8d4ac098a0e2bcf76
* Fix function_calling.sh example * Update function_calling.sh --------- Co-authored-by: Mark Daoust <markdaoust@google.com>
Fixed typo in Frequency Penalty description by changing "dificult" to "difficult".
* Update samples to use right API key name * Update chat.sh * Update code_execution.sh * Update chat.sh * Update configure_model_parameters.sh * Update controlled_generation.sh * Update count_tokens.sh * Update embed.sh * Update files.sh * Update function_calling.sh * Update models.sh * Update safety_settings.sh * Update system_instruction.sh * Update text_generation.sh * Update tuned_models.sh
A new comment on an issue with this label would get the label automatically removed.
* Pin actions to specific SHAs * Update all the other workflows
Add comment back to README, to unbreak API ref build.
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 44 to 46. - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](tj-actions/changed-files@v44...v46) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update version and fix samples for 0.8.5 release Change-Id: Ie0b0f883cbe5c8e5427c1d59c1b96bea0dd62fde * Fix samples for 0.8.5 release Change-Id: I48f3389565d68bc10f1608980298e6f1e384fc37 * format Change-Id: Ibfe397dc19d055867bb8c0e87f9ba107867e4289 * Fix shawoding caused by an empty GEMINI_API_KEY Change-Id: I1df220253baf1b2171891ba380a0a3dde8e09a8b * fix failing tests Change-Id: I0fdfc084e8c5e88bab8257eef22065ec5a6189ea * fix tests broken by pydantic 2.11 Change-Id: Ie697e2f43b2608cadebfd14d806f3898b064cc3b * format Change-Id: I51110cf338bd61d8cf40b3e73ece12b34c951d0c * sync readme with google-gemini/deprecated-generative-ai-js#462 Change-Id: I6bc43a471b5558f373f6c514a9dc56a49dd9e677 * JS -> Python Change-Id: Ib7aee25dfa0d94fc3c4abd55c28a36211126e883 * patch responder instead of deleting. Change-Id: I8f010a0ff5e45009ce9114d6bfc025e5774c2004
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )