runOutputKey property

String get runOutputKey

Output key from where the run method needs to take the return value.

Implementation

String get runOutputKey {
  if (outputKeys.length != 1) {
    throw LangChainException(
      message: '`chain.run` method can only be used with chains that return '
          'a single string output. $chainType chain returns '
          '${outputKeys.length} output: $outputKeys. '
          'Use `chain.call` method instead.',
    );
  }
  return outputKeys.first;
}