amosjyng / langchain-visualizer

Visualization and debugging tool for LangChain workflows
MIT License
718 stars 51 forks source link

Strip key that is not related to input_variable in FewShotPromptTemplate #70

Closed chrisza4 closed 1 year ago

chrisza4 commented 1 year ago

I used to have trouble running langchain_visualizer with Self-critique chain.

Turns out, in this chain some examples have more keys than of input_variables.

As I investigated more: I found that in original FewShotTemplate, they also strip unrelated key out of example but the hijacked version does not.

So I copy that into hijacked version and add test on top of it.

amosjyng commented 1 year ago

Sorry for the late response, I was out for the last two weeks!

Thanks for fixing this up, I've released v0.0.29 with this merged :D