in google/generativeai/responder.py [0:0]
def __init__(self, function_declarations: Iterable[FunctionDeclarationType]):
# The main path doesn't use this but is seems useful.
self._function_declarations = [_make_function_declaration(f) for f in function_declarations]
self._index = {}
for fd in self._function_declarations:
name = fd.name
if name in self._index:
raise ValueError("")
self._index[fd.name] = fd
self._proto = protos.Tool(
function_declarations=[_encode_fd(fd) for fd in self._function_declarations]
)