Troubleshooting of Google Vertex AI Search: Difference between revisions

Jump to navigation Jump to search
Line 151: Line 151:
</pre>
</pre>


Solution:
'''Solution:'''


1. Verify the correct APP ID (Engine ID):
1. Verify the correct APP ID (Engine ID):
Line 169: Line 169:
-d '{"query":"<QUERY>","pageSize":10,"queryExpansionSpec":{"condition":"AUTO"},"spellCorrectionSpec":{"mode":"AUTO"},"languageCode":"zh-TW","userInfo":{"timeZone":"Asia/Taipei"}}'
-d '{"query":"<QUERY>","pageSize":10,"queryExpansionSpec":{"condition":"AUTO"},"spellCorrectionSpec":{"mode":"AUTO"},"languageCode":"zh-TW","userInfo":{"timeZone":"Asia/Taipei"}}'
</pre>
</pre>
=== Troubleshooting: Vertex AI Search: Path Format Error When Enabling Grounding ===
Error encountered when enabling "Grounding with Vertex AI Search":
'''Error message:'''
<pre>
Path must follow this format: projects/{project_id}/locations/{location}/collections/{collection_name}/dataStores/{datastore_name}
</pre>
'''Solution:''' How to find the correct path parameters:
# Navigate to https://console.cloud.google.com/gen-app-builder/engines
# Select your datastore
# Click the "Integration" tab
# Look for the example command under "Run sample request in Cloud Shell"
Example curl command:
<pre>
curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://discoveryengine.googleapis.com/v1alpha/projects/987654321000/locations/global/collections/default_collection/engines/vertex-search_123/servingConfigs/default_search:search" \
-d '{"query":"<QUERY>","pageSize":10,"queryExpansionSpec":{"condition":"AUTO"},"spellCorrectionSpec":{"mode":"AUTO"},"languageCode":"zh-TW","userInfo":{"timeZone":"Asia/Taipei"}}'
</pre>
Parameter extraction from the URL:
From the URL path
{{kbd | key=<nowiki>/projects/987654321000/locations/global/collections/default_collection/engines/vertex-search_123/</nowiki>}}
# {project_id}: `987654321000` (the number after `/projects/`)
# {location}: `global` (the string after `/locations/`)
# {collection_name}: `default_collection` (the string after `/collections/`)
# {datastore_name}: Found on the datastore overview page as "Datastore ID" (e.g., `XXX_1234567890123`) {{exclaim}} Note: The datastore_name is not visible in the engine URL - you need to check the datastore overview page to find the "Datastore ID".


== Related Pages ==
== Related Pages ==

Navigation menu