L3 - last cell run error

> Entering new MultiPromptChain chain...
biology: {'input': 'Why does every cell in our body contain DNA?'}
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[33], line 1
----> 1 chain.run("Why does every cell in our body contain DNA?")

File /usr/local/lib/python3.9/site-packages/langchain/chains/base.p

i have found that the error was caused by a missing space.

3

there should be a space after ‘not’, otherwise it will become: notwell suited

4 Likes

Thank you for your sleuthing work! You helped me resolve the issue.

I made the change you suggested to “not well”, and it still threw the error regarding the default.

So, the next thing I tried was changing DEFAULT to default. That seems to have done the trick.

Not only did your answer help me try something else that happened to (!) work, but it helped me better understand the construction and thinking behind this type of chain. :slightly_smiling_face:

Kim is right about the cause of this error. The word “DEFAULT” (uppercase) appears twice in the MULTI_PROMPT_ROUTER_TEMPLATE string. Both words must be changed to “default” (lowercase). Then, re-run the that cell and the two cells after it. Then try the biology prompt again. It will correctly find ‘None’ as the type, and use a generic (default) model prompt.

Note to course maintainers: The notebook for lesson 3 should be corrected.

1 Like

The space after “not” was useful

Also, I needed to add ``` after “json”

In my case, there was no need to modify “DEFAULT” to lowecase.

Thanks

there will be many ways to solve this as outlined
here and here