Fixed the null pointer exception.

Comment From: tzolov

@mudabirhussain is this issue related to ToolCall or multimodality support?

Comment From: mudabirhussain

@mudabirhussain is this issue related to ToolCall or multimodality support?

ToolCall.

Comment From: tzolov

ToolCall. Then i'm not sure the issue name streaming image 1459 should mean?

Currently Ollama doesn't support streaming ToolCalls: https://github.com/ollama/ollama/issues/5796

Can you provide some ITs to reproduce the problem this PR resolves?

Comment From: mudabirhussain

ToolCall. Then i'm not sure the issue name streaming image 1459 should mean?

Currently Ollama doesn't support streaming ToolCalls: ollama/ollama#5796

Can you provide some ITs to reproduce the problem this PR resolves?

go to this link for more details regarding the issue: https://github.com/spring-projects/spring-ai/issues/1459

Comment From: tzolov

I see, thank you @mudabirhussain

Comment From: markpollack

merged in 209082665637bef45691f3c0390f08cd405a22ba

Comment From: markpollack

thanks @mudabirhussain