Google Vertex AI
API actions for the Google Vertex AI integration.
Google Vertex AI
Use Google Vertex AI for text generation, embeddings, translation, and classification.
Chat message
Send a chat message to a Vertex AI conversational model.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
messages | array | Yes | List of message strings for the chat conversation |
model | string | No | The model to use (default: gemini-1.5-flash) |
Response
{
"message_count": 1,
"response_text": "Hello! How can I help you today?"
}Classify text
Classify text into categories using a Vertex AI model.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to classify |
model | string | No | The model to use (default: gemini-1.5-flash) |
Response
{
"categories": [
{
"confidence": 0.95,
"name": "Technology"
},
{
"confidence": 0.72,
"name": "Business"
}
],
"model_used": "gemini-1.5-flash"
}Embed text
Generate text embeddings using a Vertex AI embedding model.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to embed |
model | string | No | The embedding model to use (default: text-embedding-004) |
Response
{
"dimension": 5,
"embedding": [
0.1,
0.2,
0.3,
0.4,
0.5
]
}Generate text
Generate text using a Vertex AI language model.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The prompt text for generation |
model | string | No | The model to use (default: gemini-1.5-pro) |
temperature | number | No | Sampling temperature between 0 and 2 (default: 0.2) |
Response
{
"model_used": "gemini-1.5-pro",
"response_text": "This is a sample generated text response."
}Summarize text
Summarize a document using a Vertex AI model.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
document | string | Yes | The document text to summarize |
model | string | No | The model to use (default: gemini-1.5-pro) |
Response
{
"model_used": "gemini-1.5-pro",
"summary": "This is a concise summary of the document."
}Translate text
Translate text to a target language using a Vertex AI model.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The text to translate |
target_language | string | Yes | The target language code (e.g., 'en', 'es', 'fr') |
model | string | No | The model to use (default: gemini-1.5-flash) |
Response
{
"model_used": "gemini-1.5-flash",
"translated_text": "Hola, como estas?"
}