Replies: 1 comment
-
This might be your issue --> #2212 Make sure you only use "{" and "}" for input variables. For code examples use "{{" and "}}" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I developed an app where users input some values (namely Title, IV and DV) to generate an academic paper introduction. The app is made using streamlit. These input variables are then combined with the prompt to generate an output. I have been able to make the app. However, now I want to have my prompts loaded from a json file which is then combined with the user input to generate an output. The idea is that I can just change the prompt in the json file without tinkering with the code. However I am getting this error again and again:
Invalid prompt schema; check for mismatched or missing input parameters. {'Title', 'DV', 'IV'} (type=value_error)
I use this function to load the prompt
gen_intro_load = load_prompt("/Filepath/Prompt.json")
then I print it
print(gen_intro_load.format(Title="Title", IV="IV", DV="DV"))
then I saved it as a variable
get_intro = gen_intro_load.format(Title="Title", IV=IV, DV=DV)
Then when I try to use the prompt template, I hit a roadblock.
expand_prompt = PromptTemplate(input_variables=["Title","IV","DV"], template=get_intro)
Can someone please help me out? I am not developed. Just started coding recently.
Beta Was this translation helpful? Give feedback.
All reactions