Message.fromJson constructor

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

Creates a Message instance from a JSON map.

Implementation

factory Message.fromJson(Map<String, dynamic> json) => Message(
      content: json["content"],
      role: json["role"],
      toolCalls: json["tool_calls"],
      functionCall: json["function_call"],
    );