Toolbox For Using Gemini Agents SDK
Project description
SDK For Simplified usage of Gemini Agents. Give Gemini Ability to use your custom functions in seveal code lines:
import vertexai
from vertexai.generative_models import (
GenerativeModel,
)
from gemini_toolbox import declarations
from gemini_toolbox import client
def get_current_time():
"""returns current time"""
return "6pm PST"
def say_to_duck(say):
"""say something to a duck"""
return f"duck answer is: duck duck {say} duck duck duck"
all_functions_tools = declarations.generate_tool_from_functions([get_current_time, say_to_duck])
vertexai.init(project="model-registry-v2", location="us-west1")
model = GenerativeModel(model_name="gemini-1.5-pro", tools=[all_functions_tools])
client = client.GeminiChatClient([get_current_time, say_to_duck], model, debug=True)
print(client.send_message("say to the duck message: I am hungry"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gemini_toolbox-0.1.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for gemini_toolbox-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55a12e6094bbdd0925a35694d41516f8b788db6827fc61c6437dd65c8266bda2 |
|
MD5 | d19ddd969631490ad1297f8aa76043c8 |
|
BLAKE2b-256 | c6abfcd268d5a599b5e2aa6e4b8794c2dfb3c869f553ce418b7208b5d10a4a49 |