ChunkingStrategy.fromJson constructor
Creates a ChunkingStrategy from JSON.
Implementation
factory ChunkingStrategy.fromJson(Map<String, dynamic> json) {
final type = json['type'] as String;
return switch (type) {
'auto' => const AutoChunkingStrategy(),
'static' => StaticChunkingStrategy.fromJson(json),
_ => throw FormatException('Unknown chunking strategy: $type'),
};
}