Hello All,
I am trying to create a connector Google Vertex AI models like chat-bison and text-bison. There are connector blueprints for OpenAI, Amazon BedRock etc. Can I invoke Google Vertex AI models using the connector? I tried to create one but the conversational search fails with the following error.
“Error from remote service: {\n "error": {\n "code": 400,\n "message": "1 instance(s) is allowed per prediction. Actual: 6",\n "status": "INVALID_ARGUMENT"\n }\n}\n”
The connector payload is given below:
{
"name": "Vertex AI Chat Connector",
"description": "The connector to Google Vertex AI",
"version": 2,
"protocol": "http",
"parameters": {
"endpoint": "<ENDPOINT>",
"project": "<PROJECT>",
"location" : "<LOCATION>",
"model": "text-bison@002",
"temperature": 0.2
},
"credential": {
"VertexAI_Key": "<VERTEX_AI_KEY>"
},
"actions": [
{
"action_type": "predict",
"method": "POST",
"url": "https://${parameters.endpoint}/v1/projects/${parameters.project}/locations/${parameters.location}/publishers/google/models/${parameters.model}:predict",
"headers": {
"Authorization": "Bearer ${credential.VertexAI_Key}"
},
"request_body": "{\"instances\":${parameters.messages},\"parameters\":{\"temperature\":${parameters.temperature},\"maxOutputTokens\":256,\"topK\":40,\"topP\":0.95}}"
}
]
}
Any help would be highly appreciated.
Thanks.