-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
830fa2f
commit a745b39
Showing
3 changed files
with
37 additions
and
248 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<script src="index.js" type="module"></script> | ||
<style> | ||
#readyindicator.ready { | ||
color: green; | ||
} | ||
|
||
#readyindicator { | ||
color: red; | ||
} | ||
|
||
table { | ||
font-family: Arial, Helvetica, sans-serif; | ||
font-size: x-small; | ||
background-color: white; | ||
} | ||
|
||
tr:nth-child(even) { | ||
background-color: lightgray; | ||
} | ||
|
||
dd { | ||
font-family: 'Courier New', Courier, monospace; | ||
} | ||
|
||
dt { | ||
font-family: Arial, Helvetica, sans-serif; | ||
} | ||
|
||
.GPT-error { | ||
font-size: large; | ||
color: red; | ||
margin: 2px; | ||
padding: 3px; | ||
border: thin solid red; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="readyindicator">⬤</div> | ||
<hr> | ||
<h2>Asking a very simple question with a small context.</h2> | ||
<p> To keep the data VERY small, lets look at ONLY Aggravated Assualts with guns since Feb 01, 2023</p> | ||
<table id="tbl1"></table> | ||
<div id="GPTDiv_1"></div> | ||
<hr> | ||
<h2>Let's increase the context size</h2> | ||
<table id="tbl2"></table> | ||
<div id="GPTDiv_2"></div> | ||
</body> | ||
<script src="soccerFunction.mjs" type="module"></script> | ||
</head> | ||
|
||
</html> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
const soccer = { | ||
"name": "nci_soccer_v2", | ||
"description": "Occupational coding", | ||
"parameters": { | ||
"type": "object", | ||
"properties": { | ||
"title": { | ||
"type": "string", | ||
"description": "What is your Job Title" | ||
}, | ||
"task": { | ||
"type": "string", | ||
"description":"What do you do at work" | ||
}, | ||
} | ||
} | ||
}; | ||
async function soccerFunction(params){ | ||
params.n=1 | ||
params.title=params.title||'' | ||
params.task=params.task||'' | ||
console.log('params:',params) | ||
|
||
//genome=hg38&chrom=1&start=100000&end=100100 | ||
let function_params = new URLSearchParams(params) | ||
let url = 'https://soccer-myconnect.cancer.gov/soccer/code?'+function_params.toString() | ||
|
||
let res = await (await fetch(url)).json() | ||
return `SOCcer thinks the best code is ${res[0].code} ${res[0].label} with a score of ${res[0].score}` | ||
//return JSON.stringify(res) | ||
//debugger | ||
} | ||
|
||
window.soccerFunction=soccerFunction |