Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
feat(tools): more detailed errors from tools
Browse files
src/lib/server/textGeneration/tools.ts
CHANGED
@@ -95,13 +95,14 @@ async function* callTool(
|
|
95 |
type: MessageUpdateType.Tool,
|
96 |
subtype: MessageToolUpdateType.Error,
|
97 |
uuid,
|
98 |
-
message: "
|
99 |
};
|
100 |
|
101 |
return {
|
102 |
call,
|
103 |
status: ToolResultStatus.Error,
|
104 |
-
message:
|
|
|
105 |
};
|
106 |
}
|
107 |
}
|
|
|
95 |
type: MessageUpdateType.Tool,
|
96 |
subtype: MessageToolUpdateType.Error,
|
97 |
uuid,
|
98 |
+
message: "An error occurred while calling the tool " + call.name,
|
99 |
};
|
100 |
|
101 |
return {
|
102 |
call,
|
103 |
status: ToolResultStatus.Error,
|
104 |
+
message:
|
105 |
+
"An error occurred while calling the tool " + call.name + ": " + stringifyError(error),
|
106 |
};
|
107 |
}
|
108 |
}
|