completion method

Future<Map<Object?, dynamic>?> completion(
  1. double contextId, {
  2. required String prompt,
  3. List<List<double>>? logitBias,
  4. String grammar = "",
  5. double temperature = 0.7,
  6. int nThreads = 0,
  7. int nPredict = -1,
  8. int nProbs = 0,
  9. int penaltyLastN = 64,
  10. double penaltyRepeat = 1.0,
  11. double penaltyFreq = 0.0,
  12. double penaltyPresent = 0.0,
  13. double mirostat = 0.0,
  14. double mirostatTau = 5.0,
  15. double mirostatEta = 0.1,
  16. bool penalizeNl = false,
  17. int topK = 40,
  18. double topP = 0.95,
  19. double minP = 0.05,
  20. double typicalP = 1.0,
  21. int seed = -1,
  22. List<String>? stop,
  23. bool ignoreEos = false,
  24. bool emitRealtimeCompletion = false,
})

Implementation

Future<Map<Object?, dynamic>?> completion(double contextId,
    {required String prompt,
    List<List<double>>? logitBias,
    String grammar = "",
    double temperature = 0.7,
    int nThreads = 0,
    int nPredict = -1,
    int nProbs = 0,
    int penaltyLastN = 64,
    double penaltyRepeat = 1.0,
    double penaltyFreq = 0.0,
    double penaltyPresent = 0.0,
    double mirostat = 0.0,
    double mirostatTau = 5.0,
    double mirostatEta = 0.1,
    bool penalizeNl = false,
    int topK = 40,
    double topP = 0.95,
    double minP = 0.05,
    double typicalP = 1.0,
    int seed = -1,
    List<String>? stop,
    bool ignoreEos = false,
    bool emitRealtimeCompletion = false}) {
  return FCllamaPlatform.instance.completion(contextId,
      prompt: prompt,
      logitBias: logitBias,
      grammar: grammar,
      temperature: temperature,
      nThreads: nThreads,
      nPredict: nPredict,
      nProbs: nProbs,
      penaltyLastN: penaltyLastN,
      penaltyRepeat: penaltyRepeat,
      penaltyFreq: penaltyFreq,
      penaltyPresent: penaltyPresent,
      mirostat: mirostat,
      mirostatTau: mirostatTau,
      mirostatEta: mirostatEta,
      penalizeNl: penalizeNl,
      topK: topK,
      topP: topP,
      minP: minP,
      typicalP: typicalP,
      seed: seed,
      stop: stop,
      ignoreEos: ignoreEos,
      emitRealtimeCompletion: emitRealtimeCompletion);
}