Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: google-gemini/deprecated-generative-ai-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.3.1
Choose a base ref
...
head repository: google-gemini/deprecated-generative-ai-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.3.2
Choose a head ref
  • 15 commits
  • 17 files changed
  • 9 contributors

Commits on Dec 14, 2023

  1. Configuration menu
    Copy the full SHA
    c6688b7 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. fix TypeError in count_tokens & count_tokens_async (#123)

    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
    Andy963 authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    2bdec6a View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2023

  1. Fixup (#128)

    * Add smkoe tests for count_tokens.
    
    * fix docstring
    MarkDaoust authored Dec 18, 2023
    Configuration menu
    Copy the full SHA
    b72d107 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b97aa55 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    718d716 View commit details
    Browse the repository at this point in the history
  4. Corrected some typos (#131)

    thesanju authored Dec 18, 2023
    Configuration menu
    Copy the full SHA
    f437f24 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b12aef7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    106daab View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2023

  1. aiter, anext not exist error (#127)

    * aiter, anext not exist error
    
    * Un-skip test, format with black.
    
    * Fix aiter & anext implementations.
    
    ---------
    
    Co-authored-by: Mark Daoust <markdaoust@google.com>
    Andy963 and MarkDaoust authored Dec 19, 2023
    Configuration menu
    Copy the full SHA
    8f05227 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15bc434 View commit details
    Browse the repository at this point in the history
  3. Fix: List Index out out range with empty parts [] (#138)

    * 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>
    Andy963 and MarkDaoust authored Dec 19, 2023
    Configuration menu
    Copy the full SHA
    0a9596f View commit details
    Browse the repository at this point in the history
  4. fix: handle empty string in ChatSession.send_message (#134)

    * 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>
    Hamza-nabil and MarkDaoust authored Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b23546f View commit details
    Browse the repository at this point in the history
  5. Update tutorial comments in class GenerativeModel (#116)

    * Update comments in class GenerativeModel
    
    * typo
    
    ---------
    
    Co-authored-by: Mark Daoust <markdaoust@google.com>
    YebowenHu and MarkDaoust authored Dec 19, 2023
    Configuration menu
    Copy the full SHA
    a1e4e16 View commit details
    Browse the repository at this point in the history

Commits on Dec 20, 2023

  1. Import typeddict from typing_extentions (#104)

    * 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>
    eavanvalkenburg and MarkDaoust authored Dec 20, 2023
    Configuration menu
    Copy the full SHA
    04dbd5f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9264c68 View commit details
    Browse the repository at this point in the history
Loading