ModelInfo constructor
const
ModelInfo({})
Information about an available model from a provider.
This class provides a standardized way to represent model metadata across different providers. Not all providers supply all fields.
Example:
final chatModel = ChatOpenAI(apiKey: '...');
final models = await chatModel.listModels();
for (final model in models) {
print('${model.id} - ${model.displayName ?? ""}');
}
Implementation
const ModelInfo({
required this.id,
this.displayName,
this.description,
this.ownedBy,
this.created,
this.inputTokenLimit,
this.outputTokenLimit,
});