mirror of
https://github.com/foss42/apidash.git
synced 2025-12-01 10:17:47 +08:00
Reorganized the genai package by removing legacy LLM-related files and introducing a new modular interface under the 'interface' directory. Added provider-specific model classes, centralized constants, and updated the example to use the new API and data structures. Updated exports in genai.dart and improved dependency management.
18 lines
438 B
Dart
18 lines
438 B
Dart
import 'dart:convert';
|
|
import 'dart:io';
|
|
|
|
void main() {
|
|
final inputFile = File('models.json');
|
|
final outputFile = File('lib/models/models_data.g.dart');
|
|
|
|
final jsonData = jsonDecode(inputFile.readAsStringSync());
|
|
final dartCode =
|
|
'''
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
const kModelsData = ${jsonEncode(jsonData)};
|
|
''';
|
|
|
|
outputFile.writeAsStringSync(dartCode);
|
|
print('✅ Generated data.g.dart from data.json');
|
|
}
|