ChatEnums.sys.mjs (1206B)
1 /* 2 This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ 5 6 /** 7 * @typedef ConversationStatus 8 * @property {number} ACTIVE - An active conversation 9 * @property {number} ARCHIVE - An archived conversation 10 * @property {number} DELETED - A deleted conversation 11 */ 12 13 /** 14 * @type {ConversationStatus} 15 */ 16 export const CONVERSATION_STATUS = Object.freeze({ 17 ACTIVE: 0, 18 ARCHIVED: 1, 19 DELETED: 2, 20 }); 21 22 /** 23 * @typedef {0 | 1 | 2 | 3} MessageRole 24 */ 25 26 /** 27 * @enum {MessageRole} 28 */ 29 export const MESSAGE_ROLE = Object.freeze({ 30 USER: 0, 31 ASSISTANT: 1, 32 SYSTEM: 2, 33 TOOL: 3, 34 }); 35 36 /** 37 * @typedef {0 | 1 | 2} InsightsFlagSource 38 */ 39 40 /** 41 * @type {InsightsFlagSource} 42 */ 43 export const INSIGHTS_FLAG_SOURCE = Object.freeze({ 44 GLOBAL: 0, 45 CONVERSATION: 1, 46 MESSAGE_ONCE: 2, 47 }); 48 49 /** 50 * @typedef { "text" | "injected_insights" | "injected_real_time_info" } SystemPromptType 51 */ 52 53 /** 54 * @type {SystemPromptType} 55 */ 56 export const SYSTEM_PROMPT_TYPE = Object.freeze({ 57 TEXT: "text", 58 INSIGHTS: "injected_insights", 59 REAL_TIME: "injected_real_time_info", 60 });