dsdanielpark / Gemini-API

The unofficial python package that returns response of Google Gemini through cookie values.
https://pypi.org/project/python-gemini-api/
MIT License
148 stars 11 forks source link

ImportError: cannot import name 'GeminiClient' from 'gemini' #6

Closed gskreddy1981 closed 4 months ago

gskreddy1981 commented 4 months ago

from gemini import Gemini from gemini import GeminiClient

async def main(): cookies = {

I setup all the cookies as per the instructions in readme file

}

client = GeminiClient(cookies=cookies)
await client.async_init()

prompt = "Hello, Gemini. What's the weather like in Seoul today?"
response = client.generate_content(prompt)
print(response)
dsdanielpark commented 4 months ago

Not updated and worked, yet!

I'm experimenting with the feasibility of this package. If it's not possible, I'll document the official API usage via Google AI Studio.

Thank you for the issue. Although it's likely that it still won't work for you, you should not encounter this error in version 0.1.3.

dsdanielpark commented 4 months ago

gskreddy1981 Please, try to use 1.0.4 or above!

We are currently modifying the package with a focus on extensive code refactoring and future maintainability, so errors may occur. We are also in the process of making adjustments to the returned dictionary for easier access in the future.

We appreciate your understanding. Thank you!!!

python uninstall python-gemini-api
python install python-gemini-api==1.0.4