Skip to content

0.0.108

@ywkim ywkim tagged this 13 Jul 02:17
* Handle function arguments parsing errors

This PR introduces error handling for function arguments parsing in the `parseOutput` function.

**Changes**:

- A try-catch block has been added around the parsing of `function_call.arguments` with `JSON.parse` in the `parseOutput` function.
- If an error occurs during parsing, an error message is thrown. This message includes the text that failed to parse and the original error message.

**Rationale**:

The previous code did not handle errors when parsing `function_call.arguments`. This could lead to unclear feedback to the user when incorrect argument formats were provided. This change addresses this issue and provides clearer feedback when an error occurs.

* Use an OutputParserException for output errors

* Update error message

---------

Co-authored-by: jacoblee93 <[email protected]>
Assets 2
Loading