Embedding.fromJson constructor

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

Implementation

factory Embedding.fromJson(Map<String, dynamic> json) => Embedding(
      vector: (json['embedding'] as List).cast<num>().map((n) => n.toDouble()).toList(),
      index: json['index'] as int,
    );