ThreadMessageModel.fromJson constructor
ThreadMessageModel.fromJson(
- Map<String, dynamic> json
)
Implementation
factory ThreadMessageModel.fromJson(Map<String, dynamic> json) => ThreadMessageModel(
id: json["id"],
object: json["object"],
createdAt: json["created_at"],
threadId: json["thread_id"],
role: json["role"],
content: List<Content>.from(json["content"].map((x) => Content.fromJson(x))),
fileIds: List<dynamic>.from(json["file_ids"].map((x) => x)),
assistantId: json["assistant_id"],
runId: json["run_id"],
metadata: Metadata.fromJson(json["metadata"]),
);