Skip to content

Commit fa1651d

Browse files
Update search grounding
1 parent 12c25ff commit fa1651d

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

tests/test_content.py

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -434,31 +434,44 @@ def test_code_execution(self, tools):
434434
self.assertIsInstance(t.code_execution, protos.CodeExecution)
435435

436436
@parameterized.named_parameters(
437-
["string", "unspecified"],
437+
["string", "google_search_retrieval"],
438438
[
439-
"dictionary",
439+
"dictionary_with_dynamic_retrieval_config",
440+
{
441+
"google_search_retrieval": {
442+
"dynamic_retrieval_config": {"mode": "unspecified", "dynamic_threshold": 0.5}
443+
}
444+
},
445+
],
446+
[
447+
"dictionary_without_dynamic_retrieval_config",
440448
{"google_search_retrieval": {"mode": "unspecified", "dynamic_threshold": 0.5}},
441449
],
442-
["tuple", ("unspecified", 0.5)],
443450
[
444451
"proto_object",
445452
protos.GoogleSearchRetrieval(
446-
protos.DynamicRetrievalConfig(mode="MODE_UNSPECIFIED", dynamic_threshold=0.5)
453+
dynamic_retrieval_config=protos.DynamicRetrievalConfig(
454+
mode="MODE_UNSPECIFIED", dynamic_threshold=0.5
455+
)
447456
),
448457
],
449458
[
450459
"proto_passed_in",
451460
protos.Tool(
452461
google_search_retrieval=protos.GoogleSearchRetrieval(
453-
protos.DynamicRetrievalConfig(mode="MODE_UNSPECIFIED", dynamic_threshold=0.5)
462+
dynamic_retrieval_config=protos.DynamicRetrievalConfig(
463+
mode="MODE_UNSPECIFIED", dynamic_threshold=0.5
464+
)
454465
)
455466
),
456467
],
457468
[
458469
"proto_object_list",
459470
[
460471
protos.GoogleSearchRetrieval(
461-
protos.DynamicRetrievalConfig(mode="MODE_UNSPECIFIED", dynamic_threshold=0.5)
472+
dynamic_retrieval_config=protos.DynamicRetrievalConfig(
473+
mode="MODE_UNSPECIFIED", dynamic_threshold=0.5
474+
)
462475
)
463476
],
464477
],
@@ -467,7 +480,7 @@ def test_code_execution(self, tools):
467480
[
468481
protos.Tool(
469482
google_search_retrieval=protos.GoogleSearchRetrieval(
470-
protos.DynamicRetrievalConfig(
483+
dynamic_retrieval_config=protos.DynamicRetrievalConfig(
471484
mode="MODE_UNSPECIFIED", dynamic_threshold=0.5
472485
)
473486
)

0 commit comments

Comments
 (0)