parse static method

FunctionCallResponse? parse(
  1. String text, {
  2. ModelType? modelType,
})

Parse a single function call based on model type

Implementation

static FunctionCallResponse? parse(String text, {ModelType? modelType}) {
  if (text.trim().isEmpty) return null;

  try {
    return FunctionCallFormatFactory.create(modelType).parse(text);
  } catch (e) {
    debugPrint('FunctionCallParser: Error parsing function call: $e');
    return null;
  }
}