process method

Future<Map<String, dynamic>> process()

Internal method used by dash_agent to convert the shared Commmand to json formated cofiguration that is deployable.

Note: Ideally, this method is not supposed to be overriden by the child objects and should not be altered. It is called automatically by the framework.

Implementation

Future<Map<String, dynamic>> process() async {
  final dataSources = this.dataSources;
  final Map<String, dynamic> processedJson = {
    'system_prompt': systemPrompt,
    'data_sources': dataSources != null
        ? [for (final dataSource in dataSources) '$dataSource']
        : null,
    'version': version
  };
  return processedJson;
}