From eab2cc376daf38d44d5fc6674683afe8488a43a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=BE=D0=BB=D0=B0=D0=B9=20=D0=A8=D0=B0?= =?UTF-8?q?=D0=BD=D0=B3=D0=B8=D0=BD?= Date: Tue, 24 Jan 2023 21:12:39 +0800 Subject: [PATCH] Fix not imported 'validator' otherwise `@validator("input_variables")` do not work --- docs/modules/prompts/examples/custom_prompt_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/prompts/examples/custom_prompt_template.md b/docs/modules/prompts/examples/custom_prompt_template.md index c3358eb0048fe..4caa6131c1ee3 100644 --- a/docs/modules/prompts/examples/custom_prompt_template.md +++ b/docs/modules/prompts/examples/custom_prompt_template.md @@ -34,7 +34,7 @@ Next, we'll create a custom prompt template that takes in the function name as i ```python from langchain.prompts import BasePromptTemplate -from pydantic import BaseModel +from pydantic import BaseModel, validator class FunctionExplainerPromptTemplate(BasePromptTemplate, BaseModel):