Queries an extension with a default controller.
HTTP request
POST https://{service-endpoint}/v1beta1/{name}:query
Where {service-endpoint}
is one of the supported service endpoints.
Path parameters
Parameters | |
---|---|
name |
Required. name (identifier) of the extension; Format: |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{
"contents": [
{
object ( |
Fields | |
---|---|
contents[] |
Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request. |
Response body
Response message for ExtensionExecutionService.QueryExtension
.
If successful, the response body contains data with the following structure:
JSON representation |
---|
{
"steps": [
{
object ( |
Fields | |
---|---|
steps[] |
Steps of extension or LLM interaction, can contain function call, function response, or text response. The last step contains the final response to the query. |
failureMessage |
Failure message if any. |
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
aiplatform.extensions.execute
For more information, see the IAM documentation.