public static class ContentMaker.ContentMakerForRoleHelper class to create content for a given role. Instantiated by ContentMaker.forRole("role").
Methods
fromMultiModalData(Object[] multiModalData)
public Content fromMultiModalData(Object[] multiModalData)Creates a content from an array of Objects.
| Parameter | |
|---|---|
| Name | Description |
multiModalData |
Object[]an array which contains the actual payload of each part. The element could be either a single String or a Part. When it's a single string, it's converted to a com.google.cloud.vertexai.api.Part that has the Text field set. |
| Returns | |
|---|---|
| Type | Description |
Content |
|
fromString(String text)
public Content fromString(String text)Creates a content from a string.
| Parameter | |
|---|---|
| Name | Description |
text |
Stringa string which will be converted to a com.google.cloud.vertexai.api.Part with its text field set. |
| Returns | |
|---|---|
| Type | Description |
Content |
|