diff --git a/+llms/+stream/responseStreamer.m b/+llms/+stream/responseStreamer.m index 83f4ac9..8db9ff3 100644 --- a/+llms/+stream/responseStreamer.m +++ b/+llms/+stream/responseStreamer.m @@ -45,9 +45,8 @@ catch ME errID = 'llms:stream:responseStreamer:InvalidInput'; msg = "Input does not have the expected json format. " + str{i}; - causeException = MException(errID,msg); - ME = addCause(ME,causeException); - rethrow(ME) + ME = MException(errID,msg); + throw(ME) end if ischar(json.choices.finish_reason) && ismember(json.choices.finish_reason,["stop","tool_calls"]) stop = true;