forked from davidmigloz/langchain_dart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for Ollama version and model info (davidmigloz#488)
Co-authored-by: David Miguel <me@davidmiguel.com>
- Loading branch information
1 parent
8f78e7c
commit 5b75bb5
Showing
14 changed files
with
748 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
packages/ollama_dart/lib/src/generated/schema/model_information.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
// ignore_for_file: type=lint | ||
// ignore_for_file: invalid_annotation_target | ||
part of ollama_schema; | ||
|
||
// ========================================== | ||
// CLASS: ModelInformation | ||
// ========================================== | ||
|
||
/// Details about a model. | ||
@freezed | ||
class ModelInformation with _$ModelInformation { | ||
const ModelInformation._(); | ||
|
||
/// Factory constructor for ModelInformation | ||
const factory ModelInformation({ | ||
/// The architecture of the model. | ||
@JsonKey(name: 'general.architecture', includeIfNull: false) | ||
String? generalArchitecture, | ||
|
||
/// The file type of the model. | ||
@JsonKey(name: 'general.file_type', includeIfNull: false) | ||
int? generalFileType, | ||
|
||
/// The number of parameters in the model. | ||
@JsonKey(name: 'general.parameter_count', includeIfNull: false) | ||
int? generalParameterCount, | ||
|
||
/// The number of parameters in the model. | ||
@JsonKey(name: 'general.quantization_version', includeIfNull: false) | ||
int? generalQuantizationVersion, | ||
}) = _ModelInformation; | ||
|
||
/// Object construction from a JSON representation | ||
factory ModelInformation.fromJson(Map<String, dynamic> json) => | ||
_$ModelInformationFromJson(json); | ||
|
||
/// List of all property names of schema | ||
static const List<String> propertyNames = [ | ||
'general.architecture', | ||
'general.file_type', | ||
'general.parameter_count', | ||
'general.quantization_version' | ||
]; | ||
|
||
/// Perform validations on the schema property values | ||
String? validateSchema() { | ||
return null; | ||
} | ||
|
||
/// Map representation of object (not serialized) | ||
Map<String, dynamic> toMap() { | ||
return { | ||
'general.architecture': generalArchitecture, | ||
'general.file_type': generalFileType, | ||
'general.parameter_count': generalParameterCount, | ||
'general.quantization_version': generalQuantizationVersion, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.