Open1
Vertex AI CacheConfig 設定
Generative AI on Vertex AI のキャッシュ設定
キャッシュを無効にする
PROJECT_ID=PROJECT_ID
# Setup project_id
$ gcloud config set project PROJECT_ID
# Setup project_id.
$ gcloud config set project ${PROJECT_ID}
# Opt-out of caching.
$ curl -X PATCH -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" -H "Content-Type: application/json" https://us-central1-aiplatform.googleapis.com/v1beta1/projects/PROJECT_ID/cacheConfig -d '{
"name": "projects/PROJECT_ID/cacheConfig",
"disableCache": true
}'
# Response.
{
"name": "projects/PROJECT_ID/locations/us-central1/projects/PROJECT_ID/cacheConfig/operations/${OPERATION_ID}",
"done": true,
"response": {
"@type": "type.googleapis.com/google.protobuf.Empty"
}
}
キャッシュを有効にする
PROJECT_ID=PROJECT_ID
LOCATION_ID="us-central1"
# Setup project_id
$ gcloud config set project PROJECT_ID
# Setup project_id.
$ gcloud config set project ${PROJECT_ID}
# Opt in to caching.
$ curl -X PATCH -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" -H "Content-Type: application/json" https://us-central1-aiplatform.googleapis.com/v1beta1/projects/PROJECT_ID/cacheConfig -d '{
"name": "projects/PROJECT_ID/cacheConfig",
"disableCache": false
}'
# Response.
{
"name": "projects/PROJECT_ID/locations/us-central1/projects/PROJECT_ID/cacheConfig/operations/${OPERATION_NUMBER}",
"done": true,
"response": {
"@type": "type.googleapis.com/google.protobuf.Empty"
}
}
Generative AI on Vertex AI のキャッシュ設定