llamaContentFromJson function

Object llamaContentFromJson(
  1. Object? content
)

Implementation

Object llamaContentFromJson(Object? content) {
  if (content == null) {
    return '';
  }
  if (content is String) {
    return content;
  }
  if (content is List) {
    return [for (final item in content) _contentPartFromJson(item)];
  }
  throw ArgumentError.value(content, 'content', 'Unsupported message content');
}