in aidial_adapter_vertexai/chat/tools.py [0:0]
def collect_tool_ids(messages: List[Message]) -> Dict[str, str]:
ret: Dict[str, str] = {}
for message in messages:
if message.role == Role.ASSISTANT and message.tool_calls is not None:
for tool_call in message.tool_calls:
ret[tool_call.id] = tool_call.function.name
return ret