Stabilize product data export flow
This commit is contained in:
@@ -75,8 +75,11 @@ def _parse_tool_arguments(raw_arguments: Any) -> dict[str, Any]:
|
||||
try:
|
||||
parsed = json.loads(raw_arguments)
|
||||
except json.JSONDecodeError as exc:
|
||||
preview = raw_arguments[:240].replace('\n', '\\n')
|
||||
raise OpenAICompatError(
|
||||
f'Invalid tool arguments returned by model: {raw_arguments!r}'
|
||||
'Invalid tool arguments returned by model: '
|
||||
f'line {exc.lineno} column {exc.colno}: {exc.msg}; '
|
||||
f'preview={preview!r}'
|
||||
) from exc
|
||||
if not isinstance(parsed, dict):
|
||||
raise OpenAICompatError(
|
||||
|
||||
Reference in New Issue
Block a user