mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-08-27 13:32:34 +02:00
add env var for prompt template dir; error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user