Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

0.1.4

Compare
Choose a tag to compare
@dsdanielpark dsdanielpark released this 29 Feb 13:13
· 401 commits to main since this release

Gemini Icon Gemini API - v0.1.4

In February 2024, Bard has changed its service name to Gemini.

Bard API to Gemini API

$ pip install python-gemini-api==0.1.4
$ pip install -q -U python-gemini-api
from gemini import Gemini

cookies = {
    "key": "value"
}

GeminiClient = Gemini(cookies=cookies)

# GeminiClient = Gemini(cookie_fp="folder/cookie_file.json") # Or use cookie file path
# GeminiClient = Gemini(auto_cookies=True) # Or use auto_cookies paprameter

# Before proceeding, ensure that the GeminiClient object is defined without any errors.

prompt = "Hello, Gemini. What's the weather like in Seoul today?"
response = GeminiClient.generate_content(prompt)
print(response)

Full Changelog: https://github.com/dsdanielpark/Gemini-API/commits/0.1.4

Release Note

  • Development is ongoing. Stay tuned. (Some features work, but it's incomplete.)
  • Use a Chrome extension to fetch cookie values, as some cookies are not yet specified.
  • Still working on parsing the response text.
  • Only part of the text generation feature works.
  • Developing logic to automatically refresh cookie values, see auto_cookies for details.