Method: projects.locations.reasoningEngines.query

Queries using a reasoning engine.

Endpoint

post https://aiplatform.googleapis.com/v1beta1/{name}:query

Path parameters

name string

Required. The name of the ReasoningEngine resource to use. Format: projects/{project}/locations/{location}/reasoningEngines/{reasoningEngine}

Request body

The request body contains data with the following structure:

Fields
input object (Struct format)

Optional. Input content provided by users in JSON object format. Examples include text query, function calling parameters, media bytes, etc.

Example request

Python

import vertexai
from vertexai.preview import reasoning_engines

# TODO(developer): Update and un-comment below lines
# PROJECT_ID = "your-project-id"
# reasoning_engine_id = "1234567890123456"
vertexai.init(project=PROJECT_ID, location="us-central1")
reasoning_engine = reasoning_engines.ReasoningEngine(reasoning_engine_id)

# Replace with kwargs for `.query()` method.
response = reasoning_engine.query(a=1, b=2)
print(response)
# Example response:
# 1 + 2 is 3

Response body

Response message for [ReasoningEngineExecutionService.Query][]

If successful, the response body contains data with the following structure:

Fields
output value (Value format)

Response provided by users in JSON object format.

JSON representation
{
  "output": value
}