2024-07-24 17:16:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Repositories\LLM;
|
|
|
|
|
|
|
|
class BaseMessage
|
|
|
|
{
|
|
|
|
public string $content;
|
2024-07-24 17:26:40 +00:00
|
|
|
|
2024-07-24 17:16:41 +00:00
|
|
|
public bool $processing = false;
|
|
|
|
|
|
|
|
public function __construct(string $content)
|
|
|
|
{
|
|
|
|
$this->content = $content;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function append(string $content): void
|
|
|
|
{
|
|
|
|
$this->content .= $content;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function clear(): void
|
|
|
|
{
|
|
|
|
$this->content = '';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function __toString(): string
|
|
|
|
{
|
|
|
|
return $this->content;
|
|
|
|
}
|
|
|
|
}
|