OpenAI\Exceptions\ErrorException: 1 validation error for Request
body -> thread -> messages
ensure this value has at most 32 items (type=value_error.list.max_items; limit_value=32) in file /var/www/kaemmi/vendor/openai-php/client/src/Transporters/HttpTransporter.php on line 131
`$messages = Message ::where('role', 'user') //->where('user_id', Auth::id()) ->orderBy('created_at', 'asc') ->select(['role', 'content']) ->get() ->map(function (mixed $item) { return [ 'role' => $item->role, 'content' => $item->content, ]; });
on this code I became the error
OpenAI\Exceptions\ErrorException: 1 validation error for Request body -> thread -> messages ensure this value has at most 32 items (type=value_error.list.max_items; limit_value=32) in file /var/www/kaemmi/vendor/openai-php/client/src/Transporters/HttpTransporter.php on line 131