Skip to content

Commit 5283c94

Browse files
committed
docs(generative_ai): Update Dynamic Retrieval for Grounding to include Mode
1 parent 64a2e92 commit 5283c94

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
google-cloud-aiplatform==1.78.0
1+
google-cloud-aiplatform==1.82.0

generative_ai/grounding/web_example.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def generate_text_with_grounding_web() -> GenerationResponse:
4040
grounding.GoogleSearchRetrieval(
4141
# Optional: For Dynamic Retrieval
4242
dynamic_retrieval_config=grounding.DynamicRetrievalConfig(
43+
mode=grounding.DynamicRetrievalConfig.Mode.MODE_DYNAMIC,
4344
dynamic_threshold=0.7,
4445
)
4546
)
@@ -54,7 +55,7 @@ def generate_text_with_grounding_web() -> GenerationResponse:
5455
),
5556
)
5657

57-
print(response.text)
58+
print(response)
5859
# Example response:
5960
# The next total solar eclipse visible from the contiguous United States will be on **August 23, 2044**.
6061

0 commit comments

Comments
 (0)