Skip to content

Commit

Permalink
Merge pull request #13 from matlab-deep-learning/dev-fix-streaming-bug
Browse files Browse the repository at this point in the history
Improved error message
  • Loading branch information
debymf committed Mar 18, 2024
2 parents c00241a + 3c42bc9 commit c7b2129
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions +llms/+stream/responseStreamer.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c7b2129

Please sign in to comment.