mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
Add Ground data model for skill tree
The Ground data model stores evaluation information for each skill node. It includes: - The answer to be evaluated - A list of terms that should be contained in the answer - A list of terms that should not be contained in the answer - A list of associated files - A map for additional evaluation criteria
This commit is contained in:
25
frontend/lib/models/skill_tree/ground.dart
Normal file
25
frontend/lib/models/skill_tree/ground.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class Ground {
|
||||
final String answer;
|
||||
final List<String> shouldContain;
|
||||
final List<String> shouldNotContain;
|
||||
final List<String> files;
|
||||
final Map<String, dynamic> eval;
|
||||
|
||||
Ground({
|
||||
required this.answer,
|
||||
required this.shouldContain,
|
||||
required this.shouldNotContain,
|
||||
required this.files,
|
||||
required this.eval,
|
||||
});
|
||||
|
||||
factory Ground.fromJson(Map<String, dynamic> json) {
|
||||
return Ground(
|
||||
answer: json['answer'],
|
||||
shouldContain: List<String>.from(json['should_contain']),
|
||||
shouldNotContain: List<String>.from(json['should_not_contain']),
|
||||
files: List<String>.from(json['files']),
|
||||
eval: json['eval'],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user