diff --git a/tools/server/public_simplechat/readme.md b/tools/server/public_simplechat/readme.md index 7f4df25e60..e506837450 100644 --- a/tools/server/public_simplechat/readme.md +++ b/tools/server/public_simplechat/readme.md @@ -531,6 +531,10 @@ The default Chat UI theme/look changed to help differentiate between different m history as well as the parts of each message in a slightly better manner. Change the theme slightly between normal and print views (beyond previous infinite height) for better printed chat history. +Initial skeletons of a builtin data store related tool calls, built on browser's indexedDB, without +needing any proxy / additional helper to handle the store. One could use the ai assistant to store +ones (ie end users) own data or data of ai model. + #### ToDo Is the tool call promise land trap deep enough, need to think through and explore around this once later. @@ -539,7 +543,7 @@ Trap error responses. Handle multimodal handshaking with ai models. -Add fetch_rss and documents|data_store tool calling, through the simpleproxy.py if and where needed. +Add fetch_rss and documents|data_store [wip] tool calling, through the simpleproxy.py if and where needed. Save used config entries along with the auto saved chat sessions and inturn give option to reload the same when saved chat is loaded. diff --git a/tools/server/public_simplechat/tools.mjs b/tools/server/public_simplechat/tools.mjs index 256754f5ab..b63e94ab34 100644 --- a/tools/server/public_simplechat/tools.mjs +++ b/tools/server/public_simplechat/tools.mjs @@ -64,7 +64,7 @@ export function setup(cb) { cb(ev.data.cid, ev.data.tcid, ev.data.name, ev.data.data) } gToolsDBWorker.onmessage = function (ev) { - cb(ev.data.cid, ev.data.tcid, ev.data.name, ev.data.data) + cb(ev.data.cid, ev.data.tcid, ev.data.name, JSON.stringify(ev.data.data)) } } diff --git a/tools/server/public_simplechat/toolsdbworker.mjs b/tools/server/public_simplechat/toolsdbworker.mjs index 698f281ade..c64c85cc68 100644 --- a/tools/server/public_simplechat/toolsdbworker.mjs +++ b/tools/server/public_simplechat/toolsdbworker.mjs @@ -42,7 +42,7 @@ self.onmessage = async function (ev) { let db = await db_open(); let dbTrans = db.transaction('theDB', 'readwrite'); let dbOS = dbTrans.objectStore('theDB'); - let args = JSON.parse(ev.data.args); + let args = ev.data.args; switch (ev.data.name) { case 'data_store_get': let reqGet = dbOS.get(args['key'])