expectedparrot / edsl

Design, conduct and analyze results of AI-powered surveys and experiments. Simulate social science and market research with large numbers of AI agents and LLMs.
https://docs.expectedparrot.com
MIT License
185 stars 19 forks source link

Render error for prompts when adding optional question parameters #1220

Open rbyh opened 3 hours ago

rbyh commented 3 hours ago

When I add optional parameters to questions I am unable to call the show_prompts() method on the survey. The parameters are also not appearing in the prompts when the question is run:

https://www.expectedparrot.com/content/abfd2745-4cc0-4717-bd12-65e84f87bd97

johnjosephhorton commented 2 hours ago

Oof - great catch. The problem is that question instructions are getting passed as string not a jinja2 template, so it doesn't have that render method that prompts do. On it.