From ebd0c13d62b3e6737cafae2e46799b2f231b8015 Mon Sep 17 00:00:00 2001 From: Oskar Stark Date: Mon, 6 Jan 2025 13:56:26 +0100 Subject: [PATCH] Use named arguments for previous exception --- src/Chain.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Chain.php b/src/Chain.php index dbc9e2a..d116665 100644 --- a/src/Chain.php +++ b/src/Chain.php @@ -76,9 +76,9 @@ public function call(MessageBagInterface $messages, array $options = []): Respon $this->logger->debug($message, $content); - throw new InvalidArgumentException('' === $message ? 'Invalid request to model or platform' : $message, 0, $e); + throw new InvalidArgumentException('' === $message ? 'Invalid request to model or platform' : $message, previous: $e); } catch (HttpExceptionInterface $e) { - throw new RuntimeException('Failed to request model', 0, $e); + throw new RuntimeException('Failed to request model', previous: $e); } $output = new Output($llm, $response, $messages, $options);