Lee will lead the way by present ongoing work
bring your own work to the hands-on discussion, several of you are approaching this from difference angles.
...
...
[Jonas] - in-browser ai -
https://developer.chrome.com/docs/extensions/ai/prompt-api#prompt_the_model,
https://github.com/webmachinelearning/prompt-api
a) get the data
txt = await(await fetch('https://raw.githubusercontent.com/episphere/gemini/main/doc/Electronic%20path%20data%20example(Sheet1).csv')).text()
rows=txt.split(/\r\n/).slice(0,-1) // blank tail removed
rows=rows.map(function(row){return {txt:row,report_id:row.match(/[\w]+/)[0]}})
b) Schema --> get "generated schema" from
schema = https://github.com/episphere/gemini/wiki/Nico
c) start session, apply schema to any of the 75 reports
session = await LanguageModel.create()
res = await session.prompt(rows[9].txt,{responseConstraint: schema})
res = JSON.parse(res)
d) Extract parameter values
extracted={
"Chronic cervicitis":res["Chronic cervicitis"],
"HPV 18":res["HPV 18"],
"Transformation Zone/Endocervical Glands":res["Transformation Zone/Endocervical Glands"]
}
e) pack it in a single function
extractNico = (await import('https://episphere.github.io/gemini/extractNico.mjs')).extractNico
https://github.com/episphere/gemini/blob/main/extractNico.mjs