feat(generation): score articles with selected relevance model (#48)
This commit is contained in:
@ -2,15 +2,19 @@ package ai
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// GenOptions permet de contrôler le comportement de génération par appel.
|
||||
type GenOptions struct {
|
||||
MaxOutputTokens int // explicit synthesis output reserve
|
||||
JSONMode bool // request structured JSON output when supported
|
||||
Think bool // active le mode raisonnement (Qwen3 /think)
|
||||
NumCtx int // taille du contexte KV (0 = valeur par défaut du provider)
|
||||
JSONSchema json.RawMessage // native constrained output; scoring only
|
||||
RequireComplete bool // reject incomplete provider responses for structured scoring
|
||||
MaxOutputTokens int // explicit synthesis output reserve
|
||||
JSONMode bool // request structured JSON output when supported
|
||||
Think bool // active le mode raisonnement (Qwen3 /think)
|
||||
NumCtx int // taille du contexte KV (0 = valeur par défaut du provider)
|
||||
}
|
||||
|
||||
type Provider interface {
|
||||
@ -35,3 +39,7 @@ func NewProvider(name, apiKey, model, endpoint string) (Provider, error) {
|
||||
return nil, fmt.Errorf("unknown provider: %s", name)
|
||||
}
|
||||
}
|
||||
|
||||
var errGenerationIncomplete = errors.New("provider response incomplete")
|
||||
|
||||
var errStructuredOutputUnsupported = errors.New("ranking structured output unsupported")
|
||||
|
||||
Reference in New Issue
Block a user