Build Laravel 13 ticket assistant with Docker, Livewire admin, and helpdesk scraper command
This commit is contained in:
23
app/DTOs/ClassificationResultDTO.php
Normal file
23
app/DTOs/ClassificationResultDTO.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\DTOs;
|
||||
|
||||
class ClassificationResultDTO
|
||||
{
|
||||
public function __construct(
|
||||
public readonly ?int $articleId,
|
||||
public readonly float $confidence,
|
||||
public readonly string $explanation,
|
||||
public readonly array $rawResponse = []
|
||||
) {}
|
||||
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'article_id' => $this->articleId,
|
||||
'confidence' => $this->confidence,
|
||||
'explanation' => $this->explanation,
|
||||
'raw_response' => $this->rawResponse,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user