샘플코드

You can now execute queries using the command line interface(CLI).
  1. 1. Make sure you have the Google Cloud SDK Installed.
  2. 2. Run the following command to authenticate with your Google account.
    $ gcloud auth application-default login
  3. 3. Create environment variables to hold the parameters.
    $ ENDPOINT_ID=”8619405901670907904”
    PROJECT_ID=”bright-velocity-331201”
  4. 4. Execute the request.
    $ cur1 \
    -X POST \
    -H “Authorization: Bearer $(gcloud auth print-access-
    - H ”Content-Type: application/json” \
    htts://us-centrall-aiplatform.googleapis.com/ui/proj
    “instances” : {
    “mimeType”: “text/plain”,
    “content”: “YOUR_TEXT_CONTENT”
    }
    }’
tab2_content