nsarrazin HF Staff commited on
Commit
c75addc
·
unverified ·
1 Parent(s): 642ce40

fix: error reporting in tool calling

Browse files
src/lib/server/textGeneration/tools.ts CHANGED
@@ -234,10 +234,7 @@ export async function* runTools(
234
 
235
  calls.push(...newCalls);
236
  } catch (e) {
237
- logger.warn(
238
- { rawCall: output.generated_text, error: extractJson },
239
- "Error while parsing tool calls"
240
- );
241
  // error parsing the calls
242
  yield {
243
  type: MessageUpdateType.Status,
 
234
 
235
  calls.push(...newCalls);
236
  } catch (e) {
237
+ logger.warn({ rawCall: output.generated_text, error: e }, "Error while parsing tool calls");
 
 
 
238
  // error parsing the calls
239
  yield {
240
  type: MessageUpdateType.Status,