LLamaPromptFormat constructor

LLamaPromptFormat(
  1. LLamaPromptFormatType type, {
  2. required String inputSequence,
  3. required String outputSequence,
  4. required String systemSequence,
  5. String? stopSequence,
})

General Library Documentation Undocument By General Corporation & Global Corporation & General Developer

Implementation

LLamaPromptFormat(
  this.type, {
  required this.inputSequence,
  required this.outputSequence,
  required this.systemSequence,
  this.stopSequence,
}) {
  var tempFilters = [
    LLamaSequenceFilter(inputSequence),
    LLamaSequenceFilter(outputSequence),
    LLamaSequenceFilter(systemSequence)
  ];

  if (stopSequence != null) {
    tempFilters.add(LLamaSequenceFilter(stopSequence!));
  }

  _filters = tempFilters;
}