Check where in your code the 'AI Message' object is being used with square brackets. Look for lines that are trying to access elements like ai_message[some_index] or ai_message["some_key"]
How to resolve - 'AIMessage' object is not subscriptable error
Annie George
0
Reputation points
Tried to run azure chat openai via langchain but we got this error.