ModelType Class

public final class ModelType
extends ExpandableStringEnum<ModelType>

The type of AI model.

Field Summary

Modifier and Type Field and Description
static final ModelType AUDIO_GENERATION

A text-to-audio generative model.

static final ModelType CHAT_COMPLETION

A model capable of taking chat-formatted messages and generate responses.

static final ModelType EMBEDDINGS

A model capable of generating embeddings from a text.

static final ModelType IMAGE_EMBEDDINGS

A model capable of generating embeddings from an image.

static final ModelType IMAGE_GENERATION

A model capable of generating images from an image and text description.

static final ModelType TEXT_GENERATION

A text generation model.

Constructor Summary

Constructor Description
ModelType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ModelType value.

Method Summary

Modifier and Type Method and Description
static ModelType fromString(String name)

Creates or finds a ModelType from its string representation.

static Collection<ModelType> values()

Gets known ModelType values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

AUDIO_GENERATION

public static final ModelType AUDIO_GENERATION

A text-to-audio generative model.

CHAT_COMPLETION

public static final ModelType CHAT_COMPLETION

A model capable of taking chat-formatted messages and generate responses.

EMBEDDINGS

public static final ModelType EMBEDDINGS

A model capable of generating embeddings from a text.

IMAGE_EMBEDDINGS

public static final ModelType IMAGE_EMBEDDINGS

A model capable of generating embeddings from an image.

IMAGE_GENERATION

public static final ModelType IMAGE_GENERATION

A model capable of generating images from an image and text description.

TEXT_GENERATION

public static final ModelType TEXT_GENERATION

A text generation model.

Constructor Details

ModelType

@Deprecated
public ModelType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of ModelType value.

Method Details

fromString

public static ModelType fromString(String name)

Creates or finds a ModelType from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding ModelType.

values

public static Collection<ModelType> values()

Gets known ModelType values.

Returns:

known ModelType values.

Applies to