mirror of
https://github.com/nomic-ai/gpt4all
synced 2024-11-08 07:10:32 +00:00
8e89ceb54b
* added optional support for .NET logging * bump version and add missing alpha suffix * avoid creating additional namespace for extensions * prefer NullLogger/NullLoggerFactory over null-conditional ILogger to avoid errors --------- Signed-off-by: mvenditto <venditto.matteo@gmail.com>
26 lines
776 B
C#
26 lines
776 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,
|
|
PastNum = opts.PastConversationTokensNum,
|
|
RepeatPenalty = opts.RepeatPenalty,
|
|
Temperature = opts.Temperature,
|
|
RepeatLastN = opts.RepeatLastN,
|
|
Batches = opts.Batches,
|
|
ContextErase = opts.ContextErase,
|
|
ContextSize = opts.ContextSize,
|
|
TokensToPredict = opts.TokensToPredict
|
|
};
|
|
}
|
|
}
|