Skip to content

Commit

Permalink
Better explanation of Agents, OpenAI Tool calling in notebook 6
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomarin committed Apr 6, 2024
1 parent c4bba5d commit e5290ed
Show file tree
Hide file tree
Showing 4 changed files with 330 additions and 187 deletions.
67 changes: 39 additions & 28 deletions 03-Quering-AOpenAI.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@
{
"data": {
"text/markdown": [
"El medicamento que reduce la inflamación en los pulmones se llama corticoide inhalado. Este tipo de medicamento se usa comúnmente para tratar enfermedades respiratorias como el asma y la enfermedad pulmonar obstructiva crónica (EPOC). Los corticoides inhalados ayudan a reducir la inflamación en los pulmones y a aliviar los síntomas respiratorios. Es importante seguir las indicaciones de un médico para el uso adecuado de este medicamento."
"El medicamento que reduce la inflamación en los pulmones se llama corticoide inhalado. Este tipo de medicamento se utiliza comúnmente para tratar enfermedades respiratorias como el asma y la enfermedad pulmonar obstructiva crónica (EPOC). Los corticoides inhalados ayudan a reducir la inflamación en los pulmones y a aliviar los síntomas respiratorios. Es importante seguir las indicaciones de un médico para el uso adecuado de este medicamento."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -758,8 +758,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 45.6 ms, sys: 0 ns, total: 45.6 ms\n",
"Wall time: 1.04 s\n"
"CPU times: user 40 ms, sys: 3.71 ms, total: 43.7 ms\n",
"Wall time: 894 ms\n"
]
}
],
Expand Down Expand Up @@ -930,7 +930,7 @@
{
"data": {
"text/markdown": [
"Chloroquine is a medicine that has been shown to reduce inflammation in the lungs. It has been found to inhibit the lipopolysaccharide-induced release of TNF-α, IL-6, CCL2, and CCL3, which are all inflammatory cytokines. Additionally, the interleukin-22-binding protein (IL-22BP) has been shown to mitigate lung inflammation during influenza infection, and low doses of radiation therapy have been found to increase the immunosuppressive profile of lung macrophages, leading to reduced inflammation. Furthermore, the use of RNA interference (RNAi) in the lungs via inhalation has been suggested as a potential treatment for a range of respiratory conditions, including inflammatory and immune conditions."
"Chloroquine is a medicine that has been shown to reduce inflammation in the lungs. It has been found to inhibit the lipopolysaccharide-induced release of inflammatory cytokines such as TNF-α, IL-6, CCL2, and CCL3. This suggests that chloroquine might mitigate the cytokine storm associated with severe pneumonia caused by coronaviruses. Therefore, chloroquine is a potential medicine for reducing inflammation in the lungs."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -943,8 +943,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 20.2 ms, sys: 24 µs, total: 20.2 ms\n",
"Wall time: 1.72 s\n"
"CPU times: user 19.4 ms, sys: 569 µs, total: 19.9 ms\n",
"Wall time: 1.28 s\n"
]
}
],
Expand Down Expand Up @@ -989,33 +989,43 @@
{
"data": {
"text/markdown": [
"Based on the provided context, several medicines and therapeutic approaches have been mentioned that can reduce inflammation in the lungs:\n",
"Based on the provided context, several medicines and therapeutic strategies are mentioned that may reduce inflammation in the lungs:\n",
"\n",
"1. **Chloroquine**: It has been found to inhibit the release of inflammatory cytokines by human lung explants, potentially mitigating the cytokine storm associated with severe pneumonia caused by coronaviruses.\n",
"1. **Chloroquine**: It has been shown to inhibit the release of inflammatory cytokines by human lung explants, suggesting it might mitigate the cytokine storm associated with severe pneumonia caused by coronaviruses.\n",
"\n",
"2. **Recombinant IL-22**: Administering recombinant IL-22 in vivo has been shown to reduce inflammation and fluid leak into the lung, indicating its potential in targeting the IL-22/IL-22BP axis to reduce influenza-induced pneumonia.\n",
"2. **Recombinant IL-22**: Administering recombinant IL-22 in vivo has been shown to reduce inflammation and fluid leak into the lung, indicating its potential to reduce influenza-induced pneumonia.\n",
"\n",
"3. **Low doses of radiation therapy**: This therapy has been suggested to increase the immunosuppressive profile of lung macrophages via IL-10 production and IFNγ/IL-6 suppression, potentially countering lung inflammation.\n",
"3. **Radiation Therapy (Low doses)**: Low doses of radiation therapy have been reported to increase the immunosuppressive profile of lung macrophages via IL-10 production and IFNγ/IL-6 suppression, which could be a therapeutic strategy to counteract lung inflammation.\n",
"\n",
"4. **Glucocorticoids**: These are considered effective anti-inflammatory therapies for chronic inflammatory and immune diseases like asthma, although they may be less effective in certain populations such as asthmatic smokers and patients with chronic obstructive pulmonary disease (COPD) or cystic fibrosis (CF).\n",
"4. **Pharmacological Treatments**: Strategies include the inhibition of excessive inflammation or manipulation of the physiological derangement causing respiratory failure, potentially allowing for less injurious mechanical ventilation.\n",
"\n",
"5. **Tocilizumab**: An IL-6 blockade with tocilizumab has been reported to curb the \"cytokine storm,\" prevent ICU admission, and the requirement for mechanical ventilation in selected patients with severe COVID-19.\n",
"5. **IL6 Blockade with Tocilizumab**: In selected patients with severe COVID-19, IL6 blockade with tocilizumab could curb the cytokine storm, prevent ICU admission, and the requirement for mechanical ventilation.\n",
"\n",
"6. **Escin**: This agent has been suggested as a potential add-on therapy in acute lung injury (ALI) related to COVID-19 infection due to its anti-inflammatory and anti-viral effects.\n",
"6. **Glucocorticoids**: Considered effective anti-inflammatory therapies for chronic inflammatory and immune diseases such as asthma, although they may be relatively ineffective in certain patient groups like asthmatic smokers and those with COPD or cystic fibrosis.\n",
"\n",
"7. **Dexamethasone**: While prophylactic dexamethasone therapy cannot yet be recommended, it is mentioned in the context of early post-natal anti-inflammatory therapy that could help in preventing the development of chronic lung disease (CLD) in preterm newborns.\n",
"7. **Escin**: Suggested as a therapeutic opportunity as add-on therapy in acute lung injury (ALI) related to COVID-19 infection due to its anti-inflammatory and anti-viral effects.\n",
"\n",
"8. **Noscapine**: As a cough medicine, noscapine has been shown to inhibit bradykinin enhanced cough response in humans and may help attenuate lung inflammation associated with SARS-CoV-2.\n",
"8. **Anti-inflammatory Therapy in Neonates**: Early post-natal anti-inflammatory therapy could help in preventing the development of chronic lung disease (CLD) in preterm newborns.\n",
"\n",
"9. **Systemic corticosteroids**: They are among the key treatments for managing exacerbations of chronic obstructive pulmonary disease (COPD).\n",
"9. **Inhaled siRNA**: Potential applications of RNA interference (RNAi) in the lungs for the treatment of diseases including inflammatory conditions.\n",
"\n",
"10. **Macrolide and ketolide antibiotics**: These have been discussed for their role in the management of asthma by exerting anti-inflammatory effects on the chronically inflamed airways in addition to their anti-infective action.\n",
"10. **Biochanin A**: An anti-inflammatory agent that could be used as an influenza treatment.\n",
"\n",
"11. **Tanshinone IIA (TIIA)**: It has been shown to attenuate bleomycin-induced pulmonary fibrosis and inflammation in rat models, suggesting a protective effect on the lungs.\n",
"11. **Tanshinone IIA (TIIA)**: Displayed significant anti-pulmonary fibrosis effects in animal models and may exert protective effects through the ACE-2/ANG-(1-7) axis.\n",
"\n",
"12. **α-1 Adrenergic receptor antagonists**: These medications, which target catecholamine-associated inflammation, may prevent cytokine storm syndrome associated with COVID-19 and other diseases.\n",
"12. **Rho-associated protein kinase (ROCK) Inhibitors**: Required for both high-speed migration and straight motion of T cells, which may regulate tissue-sampling during acute lung injury.\n",
"\n",
"It is important to note that while these therapies have shown potential in reducing lung inflammation, their use and efficacy can vary based on the specific condition, patient population, and other factors. Clinical trials and medical guidance are necessary to determine their appropriate use."
"13. **Noscapine**: Suggested as a possible drug candidate for attenuation of cytokine release associated with SARS-CoV-2.\n",
"\n",
"14. **Rapid-acting bronchodilators, systemic corticosteroids, and antibiotics**: Keys to managing exacerbations of chronic obstructive pulmonary disease.\n",
"\n",
"15. **Macrolide and Ketolide Antibiotics**: May exert anti-inflammatory effects on the chronically inflamed airways in asthma, in addition to their anti-infective action.\n",
"\n",
"16. **Dexamethasone (Corticosteroid)**: Used in a porcine model for SARS, it was found to suppress innate and Th1 cytokines in the lungs, although with potential immunosuppressive effects.\n",
"\n",
"17. **α-1 Adrenergic Receptor Antagonists**: Medications that target catecholamine-associated inflammation may prevent cytokine storm syndrome.\n",
"\n",
"These medicines and treatments target various mechanisms of inflammation and are at different stages of research and clinical use. It is important to note that their effectiveness and safety may vary based on the specific disease, patient population, and clinical context."
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -1028,8 +1038,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 15.4 ms, sys: 7.76 ms, total: 23.2 ms\n",
"Wall time: 49.9 s\n"
"CPU times: user 19.3 ms, sys: 364 µs, total: 19.7 ms\n",
"Wall time: 35 s\n"
]
}
],
Expand Down Expand Up @@ -1157,7 +1167,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 32,
"id": "d7da2f31-cf5d-4f3a-aad5-67b50b56968e",
"metadata": {},
"outputs": [],
Expand All @@ -1176,16 +1186,17 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 33,
"id": "b67200e5-d3ae-4c86-9f69-bc7b964ab532",
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"Chloroquine is a medicine that has been found to reduce inflammation in the lungs. On human lung parenchymal explants, chloroquine concentration clinically achievable in the lung (100 μM) inhibited the lipopolysaccharide-induced release of TNF-α (by 76%), IL-6 (by 68%), CCL2 (by 72%) and CCL3 (by 67%)<sup><a href=\"https://doi.org/10.1093/cid/ciaa546\" target=\"_blank\">[1]</a></sup>. Additionally, chest irradiation using low doses of radiation therapy (RT) significantly increased the percentage of Nerve- and airway-associated macrophages (NAMs) producing IL-10, leading to lung protection from inflammation<sup><a href=\"https://doi.org/10.1101/2020.05.11.077651\" target=\"_blank\">[2]</a></sup>.\n",
"Chloroquine is a medicine that reduces inflammation in the lungs. It has been shown to inhibit the lipopolysaccharide-induced release of TNF-α, IL-6, CCL2, and CCL3, which are pro-inflammatory cytokines involved in lung inflammation<sup><a href=\"https://doi.org/10.1093/cid/ciaa546\" target=\"_blank\">1</a></sup>. Additionally, chest irradiation at low doses has been found to protect the lung from inflammation by increasing the percentage of NAMs (nerve- and airway-associated macrophages) producing IL-10, which is an anti-inflammatory cytokine, thus leading to lung protection from inflammation<sup><a href=\"https://doi.org/10.1101/2020.05.11.077651\" target=\"_blank\">4</a></sup>. Furthermore, RNA interference (RNAi) has been proposed as a potential treatment for lung inflammation. It is a gene regulatory mechanism that offers a unique opportunity to treat a range of respiratory conditions, including inflammatory and immune conditions<sup><a href=\"https://doi.org/10.1021/mp070048k\" target=\"_blank\">8</a></sup>. Lastly, noscapine, a medication used for the treatment of cough, has been shown to inhibit bradykinin-enhanced cough response, which may help decrease the severe symptoms due to lung damage and attenuate mortality rates<sup><a href=\"https://doi.org/10.1002/ddr.21676\" target=\"_blank\">11</a></sup>.\n",
"\n",
"These findings suggest that chloroquine and low doses of radiation therapy (RT) are potential treatments to reduce inflammation in the lungs. However, it is important to note that the use of these treatments should be carefully considered and evaluated in the context of specific medical conditions and diseases."
"In summary, chloroquine, chest irradiation at low doses, RNA interference, and noscapine are all potential treatments that reduce inflammation in the lungs.\n",
"\n"
],
"text/plain": [
"<IPython.core.display.Markdown object>"
Expand All @@ -1198,8 +1209,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 103 ms, sys: 12 ms, total: 115 ms\n",
"Wall time: 6.72 s\n"
"CPU times: user 101 ms, sys: 3.33 ms, total: 104 ms\n",
"Wall time: 7.32 s\n"
]
}
],
Expand Down
Loading

0 comments on commit e5290ed

Please sign in to comment.