Complete Phase 12 grammar module
This commit is contained in:
@@ -54,6 +54,7 @@ type Request struct {
|
||||
Config *config.Config `json:"-"`
|
||||
Messages []contracts.LLMMessage `json:"messages"`
|
||||
Model string `json:"model,omitempty"`
|
||||
StageName string `json:"stage_name,omitempty"`
|
||||
StartIndex int `json:"start_index"`
|
||||
LLMClient contracts.StructuredLLMClient
|
||||
Scheduler contracts.LLMScheduler
|
||||
@@ -87,7 +88,10 @@ func GenerateCandidates(ctx context.Context, req Request) (Result, error) {
|
||||
return Result{}, fmt.Errorf("messages must not be empty")
|
||||
}
|
||||
|
||||
stage := buildStageName(req.ModuleInstance, req.Section)
|
||||
stage := strings.TrimSpace(req.StageName)
|
||||
if stage == "" {
|
||||
stage = buildStageName(req.ModuleInstance, req.Section)
|
||||
}
|
||||
model := resolveModel(req.Config, req.Model)
|
||||
messages := append([]contracts.LLMMessage(nil), req.Messages...)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user