gpt4-structured-reporting
gpt4-structured-reporting copied to clipboard
Empty JSON response when testing
I cloned the repo and then started it up as a Docker container on my dev system. I used a docker-compose.yml also, but I don't think that is related to an issue. I do have a valid API key for OpenAI. I am assuming that is the correct key. If I just put in "test" for the report, I get back the expected:
{
"test": "yes"
}
However, on both your demo site and my local build I get back am empty response after quite a long wait. I'll look into it a bit further and see if I can find the reason for that. It is quite easy to install though. My api_key is getting posted in the request.
Also, just curious about the "Structured Report" terminology. Are the reports "SR" instance types as in DICOM, or are they simply 'structured' in that they follow a set format.
Do you have GPT-4 API access or GPT-3.5? The latter does not follow instructions as nicely, so this might be an issue. Please also check the terminal output, if you have connection errors. It should print something like: Retrying after 10 seconds...
Regarding the terminology. The structured reports are templates we provided (you can find them in reports/structured_reports.json. The structure is based on literature recommendations, so it's clinically applicable. But they are not DICOM structured reports but just JSON files.
Pretty sure I have ChatGPT Plus account access. I already use it for "Whisper" to develop audio -> text transcription so it at least works for that, and it is quite fast actually for that application, sk-xxxxx, 51 characters total. I tried via the online 'demo' and it either times out and/or just returns an empty response. I can try with my local build again also. I don't know if you are familiar with the SIIM Hackathon, but it would be interesting to use your package there as a demonstration.
On the online demo, the request is:
-----------------------------240006687314977563591168978389
Content-Disposition: form-data; name="api_key"
sk-mykey
-----------------------------240006687314977563591168978389
Content-Disposition: form-data; name="report"
Submitted Text
-----------------------------240006687314977563591168978389--
and the response is:
""
status code 200 though, after quite a bit of processing time.
Nice to know regarding 'SR'. Seems like it would not be that difficult to make those into true DICOM Structured reports as well at some point ?
it might be that I need a different API Key to access v.4 ?
Yes. You need to apply for GPT4 API. Might be that you just use GPT-3.5-turbo, which is a bit harder to steer.