Description: Response from our language model that has been generated so far.
Example:
{
event: "llm_response",
id: "your_conversation_id",
text: "Yes, cancer can be transmissible however, ..."
}
Description: Articles that are referenced in the response of MediSearch. Arrives after the llm_response is done generating.
Example:
{
event: "articles",
id: "your_conversation_id",
articles: [
{
"title":"A review of the evaluation and management of cartilage defects in the knee.",
"url":"https://pubmed.ncbi.nlm.nih.gov/21378492/",
"authors":[
"Henn",
"Gomoll"
],
"year":"2013",
},
]
}
The citations in the llm_response correspond to the 1-indexed articles in the returned articles list. For example, if the response from articles was
articles_response = {...
articles: [
{...
"title":"Cancer is not transmissible",
},
{
"title":"Transmissible cancer can actually happen",
},
]
}
and the response from llm_response was
{...
text: "No, cancer is not transmissible [1]. Except for some rare cases [2]."
}
then the [1] corresponds to “Cancer is not transmissible” and the [2] corresponds to "Transmissible cancer can actually happen" . In other words [1] corresponds to articles_response.articles[0] and [2] corresponds to articles_response.articles[1]. In general: the i-th citation in the response coming from llm_response corresponds to the (i-1)st index of the articles list coming from articles. Phew—sorry for this, but not sure if there’s an easier way.