File tree Expand file tree Collapse file tree
src/certamen/application/workflow/nodes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313from certamen .domain .prompts .builder import PromptBuilder
1414from certamen .domain .prompts .formatter import PromptFormatter
1515from certamen .infrastructure .config .defaults import get_defaults
16+ from certamen .infrastructure .llm import ensure_single_model_instance
1617
1718
1819def _build_prompt_builder (
@@ -97,6 +98,15 @@ async def execute(
9798 if not model_keys :
9899 return {"synthesis" : "[No model available for synthesis]" }
99100 synth_model = context .models [model_keys [0 ]]
101+ elif isinstance (synth_model , dict ):
102+ synth_model = await ensure_single_model_instance (
103+ synth_model , "synthesizer"
104+ )
105+ if synth_model is None :
106+ model_keys = list (context .models .keys ())
107+ if not model_keys :
108+ return {"synthesis" : "[No model available for synthesis]" }
109+ synth_model = context .models [model_keys [0 ]]
100110
101111 instruction = self .node_properties .get ("instruction" ) or None
102112 prompt_builder = _build_prompt_builder (instruction )
You can’t perform that action at this time.
0 commit comments