mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-08-12 05:12:07 +00:00
Signed-off-by: Christopher Barrera <cb@arda.tx.rr.com> Co-authored-by: Jared Van Bortel <cebtenzzre@gmail.com>
27 lines
806 B
C#
27 lines
806 B
C#
using Gpt4All.Bindings;
|
|
|
|
namespace Gpt4All;
|
|
|
|
public static class PredictRequestOptionsExtensions
|
|
{
|
|
public static LLModelPromptContext ToPromptContext(this PredictRequestOptions opts)
|
|
{
|
|
return new LLModelPromptContext
|
|
{
|
|
LogitsSize = opts.LogitsSize,
|
|
TokensSize = opts.TokensSize,
|
|
TopK = opts.TopK,
|
|
TopP = opts.TopP,
|
|
MinP = opts.MinP,
|
|
PastNum = opts.PastConversationTokensNum,
|
|
RepeatPenalty = opts.RepeatPenalty,
|
|
Temperature = opts.Temperature,
|
|
RepeatLastN = opts.RepeatLastN,
|
|
Batches = opts.Batches,
|
|
ContextErase = opts.ContextErase,
|
|
ContextSize = opts.ContextSize,
|
|
TokensToPredict = opts.TokensToPredict
|
|
};
|
|
}
|
|
}
|