haystack icon indicating copy to clipboard operation
haystack copied to clipboard

feat: Make system_prompt in Generators a runtime parameter as well

Open sjrl opened this issue 1 year ago • 1 comments

It'd be nice to be able to change the system prompt at run time to allow for easier experimentation when working with pipelines defined in yaml files. Otherwise it requires changing the yaml file to test changes rather than being able to change the call to the pipeline run method to insert a new system prompt at run time.

I don't think this would be a breaking change since it would just add a new optional parameter to the run method of our generators.

sjrl avatar Sep 24 '24 10:09 sjrl

Hi @sjrl - here's a draft PR: https://github.com/deepset-ai/haystack/pull/8423/files

Let me know if this is what you are after. We then need to add it to every possible generator, to make it coherent.

davidsbatista avatar Sep 30 '24 13:09 davidsbatista