sampler/runner: enable gpt-oss structured outputs

This commit is contained in:
ParthSareen
2025-09-03 15:04:20 -07:00
parent 40d3436cd1
commit 1fe7e07f63
3 changed files with 23 additions and 7 deletions

View File

@@ -25,6 +25,10 @@ type Sampler struct {
grammar *GrammarSampler
}
func (s *Sampler) SetGrammar(grammar *GrammarSampler) {
s.grammar = grammar
}
func (s *Sampler) Sample(logits []float32) (int32, error) {
if len(logits) == 0 {
return -1, errors.New("sample: no logits provided to sample")