CreateVectorStoreFileRequest.fromJson constructor

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

Creates a CreateVectorStoreFileRequest from JSON.

Implementation

factory CreateVectorStoreFileRequest.fromJson(Map<String, dynamic> json) {
  return CreateVectorStoreFileRequest(
    fileId: json['file_id'] as String,
    chunkingStrategy: json['chunking_strategy'] != null
        ? ChunkingStrategy.fromJson(
            json['chunking_strategy'] as Map<String, dynamic>,
          )
        : null,
  );
}