From 7b9945c7aa4a5703a3c066fe82b82b458f3fa52e Mon Sep 17 00:00:00 2001 From: Alfred Nutile Date: Sat, 31 Aug 2024 14:40:03 -0400 Subject: [PATCH] fix stan --- app/Services/LlmServices/ClaudeClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/LlmServices/ClaudeClient.php b/app/Services/LlmServices/ClaudeClient.php index 61b0f51..222ca18 100644 --- a/app/Services/LlmServices/ClaudeClient.php +++ b/app/Services/LlmServices/ClaudeClient.php @@ -190,8 +190,8 @@ public function remapMessages(array $messages, bool $userLast = false): array return $item->role !== 'system'; }) - ->transform(function ($item) { - + /** @phpstan-ignore-next-line */ + ->transform(function (MessageInDto $item) { $item->content = str($item->content)->replaceEnd("\n", '')->trim()->toString(); return $item->toArray();