data
1 year ago
engines
9 months ago
exceptions
1 year ago
modules
9 months ago
query
10 months ago
rest
10 months ago
services
9 months ago
admin.php
9 months ago
api.php
10 months ago
core.php
9 months ago
discussion.php
1 year ago
event.php
1 year ago
init.php
1 year ago
logging.php
1 year ago
reply.php
10 months ago
rest.php
9 months ago
discussion.php
59 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class Meow_MWAI_Discussion |
| 5 | * |
| 6 | * Represents a single discussion's data that can be passed to |
| 7 | * Meow_MWAI_Modules_Discussions::commit_discussion(). |
| 8 | */ |
| 9 | class Meow_MWAI_Discussion { |
| 10 | /** |
| 11 | * Unique chat ID (required). If found, the discussion is updated; otherwise created. |
| 12 | * @var string|null |
| 13 | */ |
| 14 | public $chatId = null; |
| 15 | |
| 16 | /** |
| 17 | * ID of the bot or UI. |
| 18 | * @var string|null |
| 19 | */ |
| 20 | public $botId = null; |
| 21 | |
| 22 | /** |
| 23 | * Array of messages (each message is typically [ 'role' => 'user'|'assistant', 'content' => '...' ]). |
| 24 | * @var array |
| 25 | */ |
| 26 | public $messages = []; |
| 27 | |
| 28 | /** |
| 29 | * Additional arbitrary data (e.g., model, temperature, etc.). |
| 30 | * @var array |
| 31 | */ |
| 32 | public $extra = []; |
| 33 | |
| 34 | /** |
| 35 | * (Optional) User ID of the discussion's owner. |
| 36 | * @var int|null |
| 37 | */ |
| 38 | public $userId = null; |
| 39 | |
| 40 | /** |
| 41 | * (Optional) IP address if you track guests or sessions by IP. |
| 42 | * @var string|null |
| 43 | */ |
| 44 | public $ip = null; |
| 45 | |
| 46 | /** |
| 47 | * (Optional) Title of the discussion. |
| 48 | * @var string|null |
| 49 | */ |
| 50 | public $title = null; |
| 51 | |
| 52 | /** |
| 53 | * Constructor if you want to initialize some defaults. |
| 54 | */ |
| 55 | public function __construct() { |
| 56 | // No defaults by default. Fill them in as needed. |
| 57 | } |
| 58 | } |
| 59 |