Editing
Troubleshooting of Google Vertex AI Search in Mandarin
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 疑難排解:Discovery Engine 中的「SearchLite API 被封鎖」錯誤 === '''問題描述''':當嘗試使用 Google Vertex AI API 取得搜尋結果時<ref>[https://cloud.google.com/generative-ai-app-builder/docs/preview-search-results 取得搜尋結果 | Vertex AI Agent Builder | Google Cloud]</ref>,發生以下錯誤: <pre> curl -X POST -H "Content-Type: application/json" \ "https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search:searchLite?key=API_KEY" \ -d '{ "servingConfig": "projects/PROJECT_ID/locations/global/collections/default_collection/engines/APP_ID/servingConfigs/default_search", "query": "QUERY", }' </pre> 遇到錯誤 <pre> { "code" : 403, "message" : "Requests to this API discoveryengine.googleapis.com method google.cloud.discoveryengine.v1.SearchService.SearchLite are blocked.", "status" : "PERMISSION_DENIED", "details" : [ { "@type" : "type.googleapis.com/google.rpc.ErrorInfo", "reason" : "API_KEY_SERVICE_BLOCKED", "domain" : "googleapis.com", "metadata" : { "service" : "discoveryengine.googleapis.com", "methodName" : "google.cloud.discoveryengine.v1.SearchService.SearchLite", "apiName" : "discoveryengine.googleapis.com", "consumer" : "projects/xxx" } }, { "@type" : "type.googleapis.com/google.rpc.LocalizedMessage", "locale" : "en-US", "message" : "Requests to this API discoveryengine.googleapis.com method google.cloud.discoveryengine.v1.SearchService.SearchLite are blocked." } ] } </pre> '''解決步驟''':檢查 API 金鑰限制 * 確認金鑰是否限制特定 API: *# 前往 Google Cloud Console 的 API 金鑰管理頁面。 *# 找到正在使用的 API 金鑰,並檢查是否限制特定 API。如果限制包含 discoveryengine.googleapis.com,請確保其設定正確。 *# 移除不必要的限制:如果金鑰被限制在不相關的 IP 位址或應用程式,請移除這些限制。 * 啟用 {{kbd | key=Discovery Engine API}} *# 前往 Google Cloud Console 的 API 與服務頁面。 *# 搜尋 Discovery Engine API 並確保其已啟用。
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information