Skip to content

Async and static-typed library for working with Gemini

License

Notifications You must be signed in to change notification settings

stefanlight8/gemini-async

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banner

About

Gemini-async is an async and static-typed library for working with Gemini built for asyncio and Python 3.

Installation

Warning

Gemini-async is not available on PyPI yet.

> pip install gemini-async
# or
> python3 -m pip install gemini-async

Basic usage

import asyncio

from gemini import Gemini
from gemini.structs import Content, Part

gemini = Gemini("<your api token>")

async def main() -> None:
    response = await gemini.generate_content(
        Content(parts=[Part(text="Hello, Gemini!")])
    )
    if not response:
        print("No response")
        return
    print(response.candidates[0].content.parts[0].text)


if __name__ == "__main__":
    asyncio.run(main())

Issues & Suggestions

Any feedback is welcome! If you encounter any bugs or have suggestions, feel free to submit them on our issues page.

Also, you can help with implementation of your idea through pull request, but check [#Contributing] guidelines before.

Contributing

Not available yet.

About

Async and static-typed library for working with Gemini

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages