types.php
41 lines
| 1 | <?php |
| 2 | |
| 3 | // Define streaming message types |
| 4 | define( 'MWAI_STREAM_TYPES', [ |
| 5 | // Content types |
| 6 | 'CONTENT' => 'content', // Regular assistant message content |
| 7 | 'THINKING' => 'thinking', // AI reasoning/thinking process |
| 8 | 'CODE' => 'code', // Code block content |
| 9 | |
| 10 | // Tool/Function types |
| 11 | 'TOOL_CALL' => 'tool_call', // Starting a tool/function call |
| 12 | 'TOOL_ARGS' => 'tool_args', // Tool arguments (usually hidden) |
| 13 | 'TOOL_RESULT' => 'tool_result', // Tool execution result |
| 14 | 'MCP_DISCOVERY' => 'mcp_discovery', // MCP tools being discovered |
| 15 | |
| 16 | // Search/Generation types |
| 17 | 'WEB_SEARCH' => 'web_search', // Web search in progress |
| 18 | 'FILE_SEARCH' => 'file_search', // File search in progress |
| 19 | 'IMAGE_GEN' => 'image_gen', // Image generation in progress |
| 20 | 'EMBEDDINGS' => 'embeddings', // Embeddings operation |
| 21 | |
| 22 | // System types |
| 23 | 'DEBUG' => 'debug', // Debug information |
| 24 | 'STATUS' => 'status', // Status updates (queued, processing, etc.) |
| 25 | 'ERROR' => 'error', // Error messages |
| 26 | 'WARNING' => 'warning', // Warning messages |
| 27 | 'TRANSCRIPT' => 'transcript', // Audio transcriptions |
| 28 | |
| 29 | // Control types |
| 30 | 'START' => 'start', // Stream started |
| 31 | 'END' => 'end', // Stream completed |
| 32 | 'HEARTBEAT' => 'heartbeat', // Keep-alive ping |
| 33 | ] ); |
| 34 | |
| 35 | // Message visibility settings |
| 36 | define( 'MWAI_STREAM_VISIBILITY', [ |
| 37 | 'VISIBLE' => 'visible', // Show to user |
| 38 | 'HIDDEN' => 'hidden', // Hide from user (debug only) |
| 39 | 'COLLAPSED' => 'collapsed', // Show collapsed/summary view |
| 40 | ] ); |
| 41 |