Skip to content

Commit

Permalink
Improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
toshiakit committed Mar 8, 2024
1 parent 0b4b546 commit 3c42bc9
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 3c42bc9

Please sign in to comment.