-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.html
More file actions
45 lines (45 loc) · 3.09 KB
/
chat.html
File metadata and controls
45 lines (45 loc) · 3.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!--
pulling reference document from url and
assembling chat in div with id=geminiChat.
if no rarget element is provided, then
add it to bank document
-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<div id="nonGemini">
A <span style="color:maroon">div with id "geminiChat"</span> was created, below, as the target for the chat function.
In this bare bones application, the URL to the reference document will be picked up from the location search.
Note also <a href="https://github.com/episphere/gemini" target="_blank">open source code</a> and issues page for <a href="https://github.com/episphere/gemini/issues" target="_blank">your feedback</a>.
See, for example, these three pathology reports from <a href="https://pubmed.ncbi.nlm.nih.gov/38487800" target="_blank">TCGA reports</a>:
<p>
<li><a href="https://episphere.github.io/gemini/chat.html?geminiDoc=https://episphere.github.io/gemini/doc/TCGA-BP-5195.25c0b433-5557-4165-922e-2c1eac9c26f0.txt">TCGA-BP-5195.25c0b433-5557-4165-922e-2c1eac9c26f0</a>,</li>
<li><a href="https://episphere.github.io/gemini/chat.html?geminiDoc=https://episphere.github.io/gemini/doc/TCGA-D7-8573.b7306a47-697d-4ed3-bbe1-81d49674a8f8.txt">TCGA-D7-8573.b7306a47-697d-4ed3-bbe1-81d49674a8f8</a>,</li>
<li><a href="https://episphere.github.io/gemini/chat.html?geminiDoc=https://episphere.github.io/gemini/doc/TCGA-EI-7004.13591eed-30e5-47a3-91be-7a370663d2d4.txt">TCGA-EI-7004.13591eed-30e5-47a3-91be-7a370663d2d4</a>,</li>
</p>
<p>
And another two examples, from the description of DCEG Connect cohort study, and the wiki of Connect analytics group:
</p>
<p>
<li><a href="https://episphere.github.io/gemini/chat.html?geminiDoc=https://episphere.github.io/gemini/doc/connectStudy.txt">connectStudy</a></li>
<li><a href="https://episphere.github.io/gemini/chat.html?geminiDoc=https://episphere.github.io/gemini/doc/CdmSurveySubWg.txt">CdmSurveySubWg</a>, from 10-28-2024 to 02-05-2024</li>
</p>
</div>
<div id="geminiChat"><span style="color:maroon"><hr>[This is the DOM elementElement of your choice for assembling the chat interface]<hr></span></div>
<link href="https://episphere.github.io/gemini/gem.css" rel="stylesheet">
<script>
(async function() {
if (location.search.match('geminiDoc')) {
let docURL = location.search.match('geminiDoc').input.match(/[^\$]+geminiDoc=([^\$]+)/g)[0].split('=')[1];
console.log('reading ... ', docURL);
(await import("./chat.mjs")).chat("geminiChat", docURL)
}
}
)()
// try, for example, insert reference doc URL in the domain search:
// '?geminiDoc=https://episphere.github.io/gemini/doc/TCGA-BP-5195.25c0b433-5557-4165-922e-2c1eac9c26f0.txt
// '?geminiDoc=https://episphere.github.io/gemini/doc/connectStudy.txt
// etc
// 3 pathology reports from TCGA, more at https://pubmed.ncbi.nlm.nih.gov/38487800
// TCGA-BP-5195.25c0b433-5557-4165-922e-2c1eac9c26f0
// TCGA-D7-8573.b7306a47-697d-4ed3-bbe1-81d49674a8f8
// TCGA-EI-7004.13591eed-30e5-47a3-91be-7a370663d2d4
</script>