Class ModelDescription
java.lang.Object
dev.langchain4j.model.catalog.ModelDescription
Represents metadata about an available model from a provider.
This class provides a unified view of model information across different providers.
Only name and provider are required fields.
All other fields are optional and may be null depending on what information
the provider makes available.
- Since:
- 1.10.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ModelDescription.Builderbuilder()Timestamp when the model was created or released by the provider.Optional textual description of the model's characteristics and intended use cases.Human-readable display name for the model.booleaninthashCode()Maximum number of input tokens the model can accept in a single request.Maximum number of tokens the model can generate in a single response.name()Unique identifier for the model as defined by the provider.owner()Organization or entity that created or owns the model.provider()toString()type()
-
Method Details
-
builder
-
name
Unique identifier for the model as defined by the provider. For example: "gpt-4", "claude-3-opus-20240229", "llama2". -
displayName
-
description
Optional textual description of the model's characteristics and intended use cases. -
provider
-
type
Type of the model (e.g.,ModelType.CHAT,ModelType.EMBEDDING,ModelType.IMAGE_GENERATION). May benullif the provider doesn't categorize models or the type is unknown. -
maxInputTokens
Maximum number of input tokens the model can accept in a single request. This represents the limit on the size of the prompt/input that can be sent to the model. May benullif this information is not provided by the provider. -
maxOutputTokens
Maximum number of tokens the model can generate in a single response. This is typically smaller than the context window. May benullif this information is not provided by the provider. -
createdAt
Timestamp when the model was created or released by the provider. May benullif this information is not available. -
owner
Organization or entity that created or owns the model. For example: "openai", "anthropic", "meta". May benullif this information is not provided. -
equals
-
hashCode
-
toString
-