add env var for prompt template dir; error handling

This commit is contained in:
Adam Wilson
2025-07-19 07:59:54 -06:00
parent 41afb99622
commit 296669ac49
3 changed files with 9 additions and 2 deletions
@@ -186,6 +186,10 @@ class TextGenerationCompletionService(
prompt_template = self.prompt_template_service.get(
id=self.constants.PromptTemplateIds.PHI_3_MINI_4K_INSTRUCT_BASIC
)
if prompt_template is None:
raise ValueError(f"Prompt template not found for ID: {self.constants.PromptTemplateIds.PHI_3_MINI_4K_INSTRUCT_BASIC}")
return (
{ "question": RunnablePassthrough() }
| prompt_template