You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const{ active=true, botId, itemId, message, role, threadId, shadowId, title,}=ctx.request.body// necessary to flip active bot, or just presume to use the creator of the shadow?
Copy file name to clipboardExpand all lines: inc/js/mylife-avatar.mjs
+35-29Lines changed: 35 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -81,32 +81,40 @@ class Avatar extends EventEmitter {
81
81
}
82
82
/**
83
83
* Processes and executes incoming chat request.
84
-
* @todo - cleanup/streamline frontend communication as it really gets limited to Q&A... other events would fire API calls on the same same session, so don't need to be in chat or conversation streams
85
84
* @public
85
+
* @param {string} message - The chat message content.
86
86
* @param {string} activeBotId - The active bot id.
87
87
* @param {string} threadId - The openai thread id.
88
-
* @param {string} chatMessage - The chat message content.
88
+
* @param {Guid} itemId - The active collection-item id (optional).
89
+
* @param {Guid} shadowId - The active Shadow Id (optional).
89
90
* @param {Conversation} conversation - The conversation object.
90
91
* @param {number} processStartTime - The start time of the process.
91
92
* @returns {object} - The response(s) to the chat request.
thrownewError('No conversation found for thread id and could not be created.')
108
108
conversation.bot_id=activeBot.bot_id// pass in via quickly mutating conversation (or independently if preferred in end), versus llmServices which are global
// @stub - one weakness in teh chain might also be the fact that I am not including in instructions how to create integrated summary and left it primarily to the JSON description of function
* @todo - cleanup/streamline frontend communication as it really gets limited to Q&A... other events would fire API calls on the same same session, so don't need to be in chat or conversation streams
1154
1155
* @public
1156
+
* @param {string} message - The chat message content.
1155
1157
* @param {string} activeBotId - The active bot id.
1156
1158
* @param {string} threadId - The openai thread id.
1157
-
* @param {string} chatMessage - The chat message content.
1158
-
* @param {number} processStartTime - The process start time.
1159
+
* @param {Guid} itemId - The active collection-item id (optional).
1160
+
* @param {Guid} shadowId - The active Shadow Id (optional).
1161
+
* @param {Conversation} conversation - The conversation object.
1162
+
* @param {number} processStartTime - The start time of the process.
1159
1163
* @returns {object} - The response(s) to the chat request.
// @todo - parse environment variables in Globals and then have them available via as values
18
+
constversion='0.0.18'
18
19
constapp=newKoa()
19
20
constport=JSON.parse(process.env.PORT??'3000')
20
21
const__filename=fileURLToPath(import.meta.url)
21
22
const__dirname=path.dirname(__filename)
22
23
const_Maht=awaitMyLife// Mylife is the pre-instantiated exported version of organization with very unique properties. MyLife class can protect fields that others cannot, #factory as first refactor will request
0 commit comments