use FileNotFoundError insted of "File path not found"

This commit is contained in:
skunkworxdark 2023-07-16 16:27:01 +01:00 committed by Kent Keirsey
parent b1008af696
commit f767bf2330

View File

@ -75,7 +75,7 @@ class PromptsFromFileInvocation(BaseInvocation):
@validator("file_path")
def file_path_exists(cls, v):
if not exists(v):
raise ValueError("file path not found")
raise ValueError(FileNotFoundError)
return v
def promptsFromFile(self, file_path: str, pre_prompt: str, post_prompt: str, start_line: int, max_prompts: int):