Closed easis closed 1 month ago
Ah that's a good catch, the sampling pipeline changes are very new (just the latest version) and so the readme is out of date. A PR to fix it would be very welcome! Of your two options, the first one is the better fix imo.
Ah that's a good catch, the sampling pipeline changes are very new (just the latest version) and so the readme is out of date. A PR to fix it would be very welcome! Of your two options, the first one is the better fix imo.
Done!
Description
Hey! The example in the README isn't working. I copied the whole code into a new console project, and I got an "Object reference is not set to an instance of an object" error. After debugging, I found the issue:
https://github.com/SciSharp/LLamaSharp/blob/624c8704ddd8d75224f63cb499dace07cddc165e/LLama/LLamaInteractExecutor.cs#L309
It seems that
inferenceParams.SamplingPipeline
is null.This could be fixed by either setting an instance of
DefaultSamplingPipeline
toinferenceParams
in the example, or by setting an instance ofSamplingPipeline
if it is null inside theInferInternal
method, like this:I can make a PR if this sounds good to you.