Vertex AI Search untuk retail diganti namanya menjadi Vertex AI Search untuk commerce. Kami sedang memperbarui konten untuk mencerminkan branding baru ini.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Halaman ini menunjukkan cara memulai Library Klien Cloud untuk
Vertex AI Search for Commerce API. Library klien mempermudah akses
Google Cloud API dari bahasa yang didukung. Meskipun Anda dapat menggunakan
Google Cloud API secara langsung dengan membuat permintaan mentah ke server, library
klien memberikan penyederhanaan yang secara signifikan mengurangi jumlah kode
yang perlu Anda tulis.
Baca selengkapnya tentang Library Klien Cloud dan Library Klien Google API yang lebih lama di Penjelasan library klien.
Untuk mengautentikasi panggilan ke Google Cloud API, library klien mendukung
Kredensial Default Aplikasi (ADC);
library ini mencari kredensial dalam kumpulan lokasi yang ditentukan dan menggunakan kredensial tersebut
untuk mengautentikasi permintaan ke API. Dengan ADC, Anda dapat menyediakan kredensial untuk aplikasi di berbagai lingkungan, seperti produksi atau pengembangan lokal, tanpa perlu mengubah kode aplikasi.
Untuk lingkungan produksi, cara Anda menyiapkan ADC bergantung pada layanan
dan konteksnya. Untuk mengetahui informasi selengkapnya, lihat Menyiapkan Kredensial Default Aplikasi.
Untuk lingkungan pengembangan lokal, Anda dapat menyiapkan ADC dengan kredensial
yang terkait dengan Akun Google Anda:
Install the Google Cloud CLI.
After installation,
initialize the Google Cloud CLI by running the following command:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[],[],null,["# Vertex AI Search for commerce client libraries\n\nThis page shows how to get started with the Cloud Client Libraries for the\nVertex AI Search for commerce API. Client libraries make it easier to access\nGoogle Cloud APIs from a supported language. Although you can use\nGoogle Cloud APIs directly by making raw requests to the server, client\nlibraries provide simplifications that significantly reduce the amount of code\nyou need to write.\n\nRead more about the Cloud Client Libraries\nand the older Google API Client Libraries in\n[Client libraries explained](/apis/docs/client-libraries-explained).\n\nInstall the client library\n--------------------------\n\n### C++\n\nSee [Setting up a C++ development environment](/cpp/docs/setup)\nfor details about this client library's requirements and install dependencies.\n\n### C#\n\n\nSee the\n[Reference Page](/dotnet/docs/reference/Google.Cloud.Retail.V2/latest)\nfor this client library's requirements and install dependencies.\n\nFor more information, see [Setting Up a C# Development Environment](/dotnet/docs/setup).\n\n### Go\n\n\nSee the\n[GitHub `README`](https://github.com/googleapis/google-cloud-go/tree/main/retail#readme)\nfor this client library's requirements and install dependencies.\n\nFor more information, see [Setting Up a Go Development Environment](/go/docs/setup).\n\n### Java\n\n\nSee the\n[GitHub `README`](https://github.com/googleapis/google-cloud-java/blob/main/java-retail/README.md)\nfor this client library's requirements and install dependencies.\n\nFor more information, see [Setting Up a Java Development Environment](/java/docs/setup).\n\n### Node.js\n\n\nSee the\n[GitHub `README`](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/README.md)\nfor this client library's requirements and install dependencies.\n\nFor more information, see [Setting Up a Node.js Development Environment](/nodejs/docs/setup).\n\n### PHP\n\n\nSee the\n[GitHub `README`](https://github.com/googleapis/google-cloud-php/blob/main/Retail/README.md)\nfor this client library's requirements and install dependencies.\n\nFor more information, see [Using PHP on Google Cloud](/php/docs).\n\n### Python\n\n\nSee the\n[PyPI `README`](https://pypi.org/project/google-cloud-retail/) for details about this client library's\nrequirements and install dependencies.\n\nFor more information, see [Setting Up a Python Development Environment](/python/docs/setup).\n\n### Ruby\n\n\nSee the\n[RubyDoc `README`](https://github.com/googleapis/google-cloud-ruby/blob/main/google-cloud-retail/README.md) for details about this client library's\nrequirements and install dependencies.\n\nFor more information, see [Setting Up a Ruby Development Environment](/ruby/docs/setup).\n\n\u003cbr /\u003e\n\nSet up authentication\n---------------------\n\nTo authenticate calls to Google Cloud APIs, client libraries support [Application Default Credentials (ADC)](/docs/authentication/application-default-credentials); the libraries look for credentials in a set of defined locations and use those credentials to authenticate requests to the API. With ADC, you can make credentials available to your application in a variety of environments, such as local development or production, without needing to modify your application code.\n\nFor production environments, the way you set up ADC depends on the service\nand context. For more information, see [Set up Application Default Credentials](/docs/authentication/provide-credentials-adc).\n\nFor a local development environment, you can set up ADC with the credentials\nthat are associated with your Google Account:\n\n1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n2.\n\n If you're using a local shell, then create local authentication credentials for your user\n account:\n\n ```bash\n gcloud auth application-default login\n ```\n\n You don't need to do this if you're using Cloud Shell.\n\n\n If an authentication error is returned, and you are using an external identity provider\n (IdP), confirm that you have\n [signed in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\n A sign-in screen appears. After you sign in, your credentials are stored in the\n [local credential file used by ADC](/docs/authentication/application-default-credentials#personal).\n\nAdditional resources\n--------------------\n\n### C++\n\nThe following list contains links to more resources related to the\nclient library for C++:\n\n- [API reference](https://cloud.google.com/cpp/docs/reference/retail/latest)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-cpp/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D%5Bc%2B%2B%5D)\n- [Source code](https://github.com/googleapis/google-cloud-cpp)\n\n### C#\n\nThe following list contains links to more resources related to the\nclient library for C#:\n\n- [API reference](/dotnet/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-dotnet/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bc%23%5D)\n- [Source code](https://github.com/googleapis/google-cloud-dotnet)\n\n### Go\n\nThe following list contains links to more resources related to the\nclient library for Go:\n\n- [API reference](/go/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-go/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bgo%5D)\n- [Source code](https://github.com/googleapis/google-cloud-go)\n\n### Java\n\nThe following list contains links to more resources related to the\nclient library for Java:\n\n- [API reference](/java/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-java/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bjava%5D)\n- [Source code](https://github.com/googleapis/google-cloud-java)\n\n### Node.js\n\nThe following list contains links to more resources related to the\nclient library for Node.js:\n\n- [API reference](/nodejs/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-node/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bnode.js%5D)\n- [Source code](https://github.com/googleapis/google-cloud-node)\n\n### PHP\n\nThe following list contains links to more resources related to the\nclient library for PHP:\n\n- [API reference](/php/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-php/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bphp%5D)\n- [Source code](https://github.com/googleapis/google-cloud-php)\n\n### Python\n\nThe following list contains links to more resources related to the\nclient library for Python:\n\n- [API reference](/python/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-python/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bpython%5D)\n- [Source code](https://github.com/googleapis/google-cloud-python)\n\n### Ruby\n\nThe following list contains links to more resources related to the\nclient library for Ruby:\n\n- [API reference](/ruby/docs/reference)\n- [Client libraries best practices](/apis/docs/client-libraries-best-practices)\n- [Issue tracker](https://github.com/googleapis/google-cloud-ruby/issues)\n- [`tbd` on Stack Overflow](https://stackoverflow.com/search?q=%5Btbd%5D+%5Bruby%5D)\n- [Source code](https://github.com/googleapis/google-cloud-ruby)\n\n\u003cbr /\u003e"]]