amber-laravel/app/Repositories/LLM/BaseMessage.php

31 lines
485 B
PHP
Raw Permalink Normal View History

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;
}
}