feat: add Spanner similarity_search tool

Similarity search tool supports similarity search on Spanner data by embedding a text query to a vector and run vector search with the embedded vector.

PiperOrigin-RevId: 806502499
This commit is contained in:
Google Team Member
2025-09-12 18:49:50 -07:00
committed by Copybara-Service
parent 0c1f1fadeb
commit c29d41f0d0
4 changed files with 759 additions and 3 deletions
@@ -37,7 +37,7 @@ async def test_spanner_toolset_tools_default():
tools = await toolset.get_tools()
assert tools is not None
assert len(tools) == 6
assert len(tools) == 7
assert all([isinstance(tool, GoogleTool) for tool in tools])
expected_tool_names = set([
@@ -47,6 +47,7 @@ async def test_spanner_toolset_tools_default():
"list_named_schemas",
"get_table_schema",
"execute_sql",
"similarity_search",
])
actual_tool_names = set([tool.name for tool in tools])
assert actual_tool_names == expected_tool_names