# GCPGenApi

## chat

Perform a chat operation using parameters.

```
GCPGenApi.chat(params: Dict[str, Union[str, int]]) -> object
```

Parameters

```
params: A dictionary containing parameters for the chat operation.
```

Returns

```
An object representing the chat result.
```

## summarizeText

Summarize the given text.

```
GCPGenApi.summarizeText(text: str) -> 'Result'
```

Parameters

```
text: The text to be summarized.
```

Returns

```
A 'Result' object representing the summarized text.
```

## classifyText

Classify the given text based on input classes.

```
GCPGenApi.classifyText(inputClasses: List[str], text: str) -> 'Result'
```

Parameters

```
inputClasses: List of classes for classification.
text: The text to be classified.
```

Returns

```
A 'Result' object representing the classification result.
```

## ams

Perform AMS (Answer Matching System) operation on the given text.

```
GCPGenApi.ams(text: str) -> 'Result'
```

Parameters

```
text: The text for AMS operation.
```

Returns

```
A 'Result' object representing the AMS result.
```

## generateEmbedding

Generate embedding for the given text.

```
GCPGenApi.generateEmbedding(text: str) -> 'Result'
```

Parameters

```
text: The text for which embedding needs to be generated.
```

Returns

```
A 'Result' object representing the embedding.
```

## generateImageInBucket

Generate image in a GCS bucket based on the prompt.

```
GCPGenApi.generateImageInBucket(prompt: str, imageCount: int, outputGcsUriFolder: str) -> 'Result'
```

Parameters

```
prompt: The prompt for image generation.
imageCount: The number of images to generate.
outputGcsUriFolder: The output folder URI in GCS.
```

Returns

```
A 'Result' object representing the image generation result.
```

## generateImageAsByte

Generate image as bytes based on the prompt.

```
GCPGenApi.generateImageAsByte(prompt: str, imageCount: int) -> 'Result'
```

Parameters

```
prompt: The prompt for image generation.
imageCount: The number of images to generate.
```

Returns

```
A 'Result' object representing the image generation result.
```

## generateCode

Generate code based on the prompt.

```
GCPGenApi.generateCode(prompt: str) -> 'Result'
```

Parameters

```
prompt: The prompt for code generation.
```

Returns

```
A 'Result' object representing the code generation result.
```

## text

Generate text based on the prompt.

```
GCPGenApi.text(prompt: str) -> 'Result'
```

Parameters

```
prompt: The prompt for text generation.
```

Returns

```
A 'Result' object representing the text generation result.
```

## extractEntitiesFromTextList

Extract entities from a list of texts based on the prompt.

```
GCPGenApi.extractEntitiesFromTextList(prompt: str, texts: List[str]) -> 'Result'
```

Parameters

```
prompt: The prompt for entity extraction.
texts: List of texts from which entities need to be extracted.
```

Returns

```
A 'Result' object representing the entity extraction result.
```

## extractEntitiesFromText

Extract entities from a single text based on the prompt.

```
GCPGenApi.extractEntitiesFromText(prompt: str, text: str) -> 'Result'
```

Parameters

```
prompt: The prompt for entity extraction.
text: The text from which entities need to be extracted.
```

Returns

```
A 'Result' object representing the entity extraction result.
```

## vertexAiGetAnswer

Get an answer from Vertex AI based on the question and datastore ID.

```
GCPGenApi.vertexAiGetAnswer(question: str, datastoreId: str) -> 'Object'
```

Parameters

```
question: The question for which an answer is needed.
datastoreId: The ID of the datastore.
```

Returns

```
An object representing the answer from Vertex AI.
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillo.gitbook.io/trillo-workbench-python-sdk/gcpgenapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
