VectorStoreConfig.fromJson constructor

VectorStoreConfig.fromJson(
  1. Map<String, dynamic> json
)

Creates a VectorStoreConfig from JSON.

Implementation

factory VectorStoreConfig.fromJson(Map<String, dynamic> json) {
  return VectorStoreConfig(
    fileIds: (json['file_ids'] as List<dynamic>?)?.cast<String>(),
    chunkingStrategy: json['chunking_strategy'] != null
        ? ChunkingStrategy.fromJson(
            json['chunking_strategy'] as Map<String, dynamic>,
          )
        : null,
    metadata: (json['metadata'] as Map<String, dynamic>?)
        ?.cast<String, String>(),
  );
}