gkamradt / langchain-tutorials

Overview and tutorial of the LangChain Library
6.72k stars 1.94k forks source link

ValidationError: 1 validation error for FewShotPromptTemplate example_selector instance of BaseExampleSelector expected (type=type_error.arbitrary_type; expected_arbitrary_type=BaseExampleSelector) #14

Closed retroradioryan closed 1 year ago

retroradioryan commented 1 year ago

Anyone know how I fix this error?

ValidationError: 1 validation error for FewShotPromptTemplate example_selector instance of BaseExampleSelector expected (type=type_error.arbitrary_type; expected_arbitrary_type=BaseExampleSelector)

gkamradt commented 1 year ago

Can you link to the tutorial and code this is coming from?

retroradioryan commented 1 year ago

https://github.com/gkamradt/langchain-tutorials/blob/main/LangChain%20Cookbook%20Part%201%20-%20Fundamentals.ipynb

Screenshot 2023-05-02 at 17 59 31
gkamradt commented 1 year ago

I just ran that code no problem. Can you confirm you're on the latest version of langchain?

Version: 0.0.153

retroradioryan commented 1 year ago

That was the issue... Thanks!!!