forked from google-gemini/generative-ai-python
-
Notifications
You must be signed in to change notification settings - Fork 0
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
develop #1
Merged
Merged
develop #1
Conversation
This file contains 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
* Add dataclass prettyprinting. * use reprlib.recursive_repr * format * Improve contractions.
* Add metadata handling. * Add and fix tests. * Resolve comments
* Add count_text_tokens, and expose operations. * Format and fix pytype errors. * use get_base_model_name in create_tuned_model * Resolve comments
Inside google, we are removing support for `from gspread import gspread`
* Allow dicts and pd.DataFrames as tuning datasets * fix type hints. * Support csv and json files, csv URLs. * docs * add TODO * Allow json-urls and streaming decoding of CSVs.
The CSV URL trick seems to support specifying tabs, so this change plumbs the tab reference (`gid`) through.
* Simplify list-models iteration - the GAPIC lib handles this. * resolve comments
GLAPI members defined in a versioned package (e.g. `v1beta3) were generating an incorrect URL for the "view on github" link. To test the regex I ran it on a suspended instance of the script: ``` diff -u <(egrep -Iir 'generativelanguage_\w+\.types' docs/api/google/ai/generativelanguage/ --include=*.md) \ <(egrep -Iir 'generativelanguage_\w+.types' docs/api/google/ai/generativelanguage/ --include=*.md) ``` Output [here](http://go/paste/6300090913259520), but it only matched `<a href />`s.
* Update stale.yml * Update labeler.yml * Update bug_report.yml * Update feature_request.yml
* Start code for generative service. This is working with v1beta. Change-Id: I96d2d4f773db8e4be621b40697016d1acbe24903 * Embedding content functionality for v1beta. Change-Id: I1bf2379b33a607b0bb2cf77066073166a6fe9f95 * Add py3.9 support, Fix roles, UsageMetadata, and more. Change-Id: I5fa91f191eb5eebb0fd160325b102bfb48ef8e27 * Add async suppoort. Fix some types. Add count_tokens. Change-Id: Ic03d9caa9996843c0ac1438f52c8b10a08fd6563 * Docstrings Change-Id: Ia2adca04a2f65bfd4ea40eec0cc18c4c98703b9f * Add missing async type to export list. Change-Id: I22e0aba1a59997fef6263105413b5626f1cc5a51 * Add async tests, kwargs, format. Change-Id: Ia2c3260efe58f48183458e997ba560cc07f4b442 * docs Change-Id: I45d2f405fb058f25fc99c30c79221f6461ebe945 * debug tests * Add GenerationConfig at the top level * test * replace __init__.py * remove -e * drop notebook tests for now * Update version. * format + pytype * Fix pytype. * Fix tests + pytype --------- Co-authored-by: Shilpa Kancharla <[email protected]> Co-authored-by: Mark McDonald <[email protected]>
* Update docstrings, add png support. * black * Improve typechecking in docs
* Update README.md * Update README.md * Updated Gemini sample code in README * Update docs/build_docs.py --------- Co-authored-by: Mark McDonald <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
Change-Id: Iff0d88eef997ba3ea3ede835b148831aee1213fc
* Expand error descriptions for #170 Change-Id: I8599dafc9e5084a43f2ce482644d0e9e16b61061 * Fix test failure cause by upgrade to protobuf>=5.0.0 Change-Id: I16a3c1964284d16efb48073662901454d4e4a6a1 * Format Change-Id: Iee130a7e58f2cfbc1001808ac892f119338626eb
* Fix default_metadata for files API. Change-Id: Ibba74ccda137fe4ac62525868e036a0a0d612348 * Pass the metadata through to the discovert URL Change-Id: If8f938a1026d46aafc617d1c0e95360c463f0ba0 * fix tests, getmembers doesn't return classmethod/staticmetnod objects. Change-Id: I9449c6f3299f820fea4128cb598f39cf359cd9ef * format Change-Id: I4133647fbea3b6b995ed6edf56bd2a243c2131af * Add notes describing interaction of the discovery URL and API endpoint. Change-Id: Ibb8740fd548cc8a8a75b32508d6d05aa6e89f633 * note abput default-metadata Change-Id: I9647c47718d7b6981692b484b9e9b2ed0f9a42cc * remove unused import Change-Id: Ie49216fef5eb13e202fd276fff62e7e20f03b062
Change-Id: Idb2f2006cdf4b37d7fc8c73112dba3a125edf175
When we run tests internally that don't invoke the test class, they pass but don't run the tests. Our GitHub environment tests them fine but this change ensures they run in both environments.
* Add rev14 parameters Change-Id: I16f2b1f5820a6cf867b9abb04ffd5c6e6d2d947b * Fix flakey repr test Change-Id: I89bcf1494cf72c6ee28f2b52d0345cbb40859862 * format Change-Id: I81cff23e9ce20cc20b4a0632d557c71f536fd485 * Use client preview Change-Id: I2d8a4ee2e9e4b6e00a16a9dac1136a2fa18d7a28 * Fix tests Change-Id: If8fbbba1966aa42601adec877e60d851d4f03b72 * Fix tuned model tests Change-Id: I5ace9222954be7d903ebbdabab9efc663fa79174 * Fix tests Change-Id: Ifa610965c5d6c38123080a7e16416ac325418285 * format Change-Id: I15fd5701dd5c4200461a32c968fa19e375403a7e * pytype Change-Id: I08f74d08c4e93bbfdf353370b5dd57d8bf86a637 * pytype Change-Id: If81b86c176008cd9a99e3b879fbd3af086ec2235 * 3.9 tests Change-Id: I13e66016327aae0b0f3274e941bc615f379e5669
* use the new generativelanguage==6.10 Change-Id: Ib65e073ad61c810e5b4d3c01bce71fc45af188d3 * Update version Change-Id: I32c344c366cfa753230435d6b4576f3309fc968f * 0.6.10 Change-Id: I265b5a3ab6ce598ce4c6383c5b4dd065842276f3
* fix: preserve quality and optimize transfer of prompt images * Move numpy-images to their own test case. Change-Id: Ie6b02c7647487c1df9d4e70e9b8eed70dc8b8fe3 * Format with black Change-Id: I04550a89eed9bb21c0a8f6f9b6ab76b8b0f41270 --------- Co-authored-by: Mark Daoust <[email protected]>
* Updated tests and current progress on adding search grounding. * Update google/generativeai/types/content_types.py Co-authored-by: Mark Daoust <[email protected]> * Update tests/test_content.py Co-authored-by: Mark Daoust <[email protected]> * Update search grounding * update content_types * Update and add aditional test cases * update test case on empty_dictionary_with_dynamic_retrieval_config * Update test cases and _make_search_grounding * fix tests Change-Id: Ib9e19d78861da180f713e09ec93d366d5d7b5762 * Remove print statement * Fix tuned model tests Change-Id: I5ace9222954be7d903ebbdabab9efc663fa79174 * Fix tests Change-Id: Ifa610965c5d6c38123080a7e16416ac325418285 * format Change-Id: Iab48a9400d53f3cbdc5ca49c73df4f6a186a867b * fix typing Change-Id: If892b20ca29d1afb82c48ae1a49bef58e0421bab * Format Change-Id: I51a51150879adb3d4b6b00323e0d8eaf4c0b2515 --------- Co-authored-by: Mark Daoust <[email protected]>
Change-Id: I55f8339aea7e71e0b073c1a2ef9b3748500e09ed
* Add IOBase support to FileServiceClient.create_file * add support to upload file-like object * Give clear errors for 'unknown' mime-types Change-Id: Iea071c396c4cfe2b2c8eacae74dd8fb0acbc128f * Remove duplicate check for mime_type * Add a test uploading from a file-like IO object Change-Id: I572f02ed98b9ca45299b76e7a01695fdcf917e1e * fix type check Change-Id: I220c05eee73ae76ced25254d67332f70a4069f7e --------- Co-authored-by: Mark Daoust <[email protected]>
Change-Id: I2d8ef6d251d0128695e45df119c31d6b63e26ba7
* Removing OAuth from tuning for REST * remove key * Fix line continuation Change-Id: I639aa453699766bf31f7722a59f4157a53cf7de4 --------- Co-authored-by: Mark Daoust <[email protected]>
Change-Id: I998fa990bc7dfb220e78cd7f9692c8530993d7c4
* Update setup.py * Create py.typed * Update setup.py to trigger CI. --------- Co-authored-by: Mark Daoust <[email protected]>
* 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 <[email protected]>
https: //github.com/google-gemini/cookbook/tree/e2623e8587f3d4ae13df65f415a3337c7f7ac97e/templates Change-Id: Ic50b279a769d2fe2263b1dee41541d7c950c0cfa
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
Report is too large to display inline. Next stepsMark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
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.
Description of the change
Motivation
Type of change
Choose one: (Bug fix | Feature request | Documentation | Other)
Checklist
git pull --rebase upstream main
).