32 lines
486 B
PHP
32 lines
486 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Repositories\LLM;
|
||
|
|
||
|
class BaseMessage
|
||
|
{
|
||
|
public string $content;
|
||
|
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;
|
||
|
}
|
||
|
|
||
|
}
|