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.0.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for gemini_toolbox-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba6e120db8624e8bd27b4dabbd03ffe014c1eeba280d6e40c227aa85f60d897 |
|
MD5 | 6b99ca683baf3633c965f8486e6bfb13 |
|
BLAKE2b-256 | e7494c10c4f334effc0366535153b2667474b2d75f20312b231846c715270527 |