A Vision Warehouse is a component you can add to your app to store model output and streaming data.
Create a streaming video warehouse
To connect other component nodes of your app graph to a warehouse you must first create a streaming video warehouse.
Console
Open the Warehouses tab of the Gemini Enterprise Agent Platform Vision dashboard.
Select Create.
Add a name for the warehouse and choose a time to live (TTL) period for assets stored in the warehouse. These values can be modified later.
After a warehouse is created you can add the warehouse to an application graph.
REST & CMD LINE
Creates a new corpus resource under the given project with the option to
specify the corpus display name, description and a TTL.
Before using any of the request data, make the following replacements:
- REGIONALIZED_ENDPOINT: Endpoint might include a prefix matching the
LOCATION_IDsuch aseurope-west4-. See more about regionalized endpoints. - PROJECT_NUMBER: Your Google Cloud project number.
- LOCATION_ID: The region where you are using
Agent Platform Vision. For example:
us-central1,europe-west4. See available regions. - DISPLAY_NAME: Display name for the warehouse.
- WAREHOUSE_DESCRIPTION: The description of the warehouse (
corpus). - TIME_TO_LIVE: The amount of time to live (TTL) for all assets under a corpus, or
the TTL of a specific asset. For example, for a corpus with assets with a TTL of 100 days,
provide the value
8640000(seconds).
HTTP method and URL:
POST https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora
Request JSON body:
{
"display_name": "DISPLAY_NAME",
"description": "WAREHOUSE_DESCRIPTION",
"type": "STREAM_VIDEO",
"default_ttl": {
"seconds": TIME_TO_LIVE
}
}
To send your request, choose one of these options:
curl
Save the request body in a file named request.json,
and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora"
PowerShell
Save the request body in a file named request.json,
and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://warehouse-visionai.googleapis.com/v1/projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{
"name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/warehouseoperations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.visionai.v1.CreateCorpusMetadata"
},
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.visionai.v1.Corpus",
"name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/corpora/CORPUS_ID",
"displayName": "DISPLAY_NAME",
"description": "