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