Lesson 4 - Persistence and Streaming || Getting value error

When I try to stream the messages I get results but also with a value error which I think is because it is expecting role and content but getting only content. Please see screenshot.

can you share the complete image of the error.

At the end Value error: part of message is cut down in the image.you can take screenshots in parts and share both in case it is a lengthy one.


Hello Deepti
here is the complete screenshot
I think the message dictionary which is being traversed in event is expecting role and content.

But in video lecture the code is same as I am trying to run. Dont know why I am getting error

can 8 know if you downloaded all the files from the lesson?

Based on the error when you recalled message as messages, it is looking for kwargs assigned to it, that is role or type which your notebook is not able to find, so that’s why my first question is did you also download the utils py file with assignment lesson codes?

Hey Deepti
I think its working now. I re-created the notebook and when run the code it is working now

1 Like