langchain icon indicating copy to clipboard operation
langchain copied to clipboard

Agents: update create_prompt to be a staticmethod

Open eyurtsev opened this issue 1 year ago • 2 comments

This PR updates create_prompt method to be a staticmethod rather than a classmethod.

It is a bit unclear on whether the classmethod was intentionally to provide the code with access to class level attributes.

If that's the case, it may be better to instead provide a way for the prompt generator to access instance level attributes rather than class level attributes.

In addition, there's a minor documentation update and type annotation fix.

I haven't tested the code locally -- relying on tests working in CI (will try to get testing to work)

eyurtsev avatar Mar 02 '23 19:03 eyurtsev

OK if it's intentional, then easiest thing is to keep as is for now. I'm going to try and convince you of a scarier change

eyurtsev avatar Mar 02 '23 19:03 eyurtsev

OK if it's intentional, then easiest thing is to keep as is for now. I'm going to try and convince you of a scarier change

but its not even halloween!

hwchase17 avatar Mar 03 '23 00:03 hwchase17