Skip to content

Commit 710a08e

Browse files
authored
docs(samples): VAIS Answer - Add comment describing that all options are included by default (GoogleCloudPlatform#12706)
* docs(samples): VAIS Answer - Add comment describing that all options are included by default * Update answer_query_sample.py * Added links to REST References for more details
1 parent 113a8d0 commit 710a08e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

discoveryengine/answer_query_sample.py

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ def answer_query_sample(
4747
serving_config = f"projects/{project_id}/locations/{location}/collections/default_collection/engines/{engine_id}/servingConfigs/default_serving_config"
4848

4949
# Optional: Options for query phase
50+
# The `query_understanding_spec` below includes all available query phase options.
51+
# For more details, refer to https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/QueryUnderstandingSpec
5052
query_understanding_spec = discoveryengine.AnswerQueryRequest.QueryUnderstandingSpec(
5153
query_rephraser_spec=discoveryengine.AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec(
5254
disable=False, # Optional: Disable query rephraser
@@ -62,6 +64,8 @@ def answer_query_sample(
6264
)
6365

6466
# Optional: Options for answer phase
67+
# The `answer_generation_spec` below includes all available query phase options.
68+
# For more details, refer to https://cloud.google.com/generative-ai-app-builder/docs/reference/rest/v1/AnswerGenerationSpec
6569
answer_generation_spec = discoveryengine.AnswerQueryRequest.AnswerGenerationSpec(
6670
ignore_adversarial_query=False, # Optional: Ignore adversarial query
6771
ignore_non_answer_seeking_query=False, # Optional: Ignore non-answer seeking query

0 commit comments

Comments
 (0)