├── .gitignore ├── LICENSE ├── README.md ├── main.py ├── output └── final.md ├── quentions_generation.py ├── research_agent.py └── summary_agent.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # poetry 98 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 99 | # This is especially recommended for binary packages to ensure reproducibility, and is more 100 | # commonly ignored for libraries. 101 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 102 | #poetry.lock 103 | 104 | # pdm 105 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 106 | #pdm.lock 107 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 108 | # in version control. 109 | # https://pdm.fming.dev/latest/usage/project/#working-with-version-control 110 | .pdm.toml 111 | .pdm-python 112 | .pdm-build/ 113 | 114 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 115 | __pypackages__/ 116 | 117 | # Celery stuff 118 | celerybeat-schedule 119 | celerybeat.pid 120 | 121 | # SageMath parsed files 122 | *.sage.py 123 | 124 | # Environments 125 | .env 126 | .venv 127 | env/ 128 | venv/ 129 | ENV/ 130 | env.bak/ 131 | venv.bak/ 132 | 133 | # Spyder project settings 134 | .spyderproject 135 | .spyproject 136 | 137 | # Rope project settings 138 | .ropeproject 139 | 140 | # mkdocs documentation 141 | /site 142 | 143 | # mypy 144 | .mypy_cache/ 145 | .dmypy.json 146 | dmypy.json 147 | 148 | # Pyre type checker 149 | .pyre/ 150 | 151 | # pytype static type analyzer 152 | .pytype/ 153 | 154 | # Cython debug symbols 155 | cython_debug/ 156 | 157 | # PyCharm 158 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 159 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 160 | # and can be added to the global gitignore or merged into this file. For a more nuclear 161 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 162 | #.idea/ 163 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## SummativeInfoResearcherAgents 2 | 3 | SummativeInfoResearcherAgents is an agent framework designed to aid online research and content summarization. This project is designed to facilitate the process of generating, retrieving and summarizing information based on user input. 4 | 5 | ### Features 6 | 7 | #### Question Generation Agent 8 | Takes a user's input question and generates five similar questions to expand the scope of the research. 9 | 10 | #### Research Agent 11 | Searches the internet for answers to each of the six questions (original plus five generated questions) and retrieves relevant information by filtering out redundant data. 12 | 13 | #### Summary Agent 14 | Organizes the collected information into a short, coherent blog post in Markdown format. 15 | 16 | ### Usage 17 | ``` 18 | git clone https://github.com/oztrkoguz/SummativeInfoResearcherAgents.git 19 | cd SummativeInfoResearcher 20 | python main.py 21 | ``` 22 | 23 | ### Requirements 24 | ``` 25 | Python >= 3.10 26 | openai==1.30.1 27 | serpapi==0.1.5 28 | ``` 29 | You need to get API keys from APIs like Serpapi and Deepseek. You can also use different API services 30 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | from openai import OpenAI 2 | import json 3 | from quentions_generation import generate_enhanced_questions, extract_json 4 | from research_agent import scrape_and_save, edit_answers 5 | from summary_agent import summary_blog 6 | 7 | 8 | api_key = "DeepSeek_API_KEY" 9 | research_api_key = "serpapi_API_KEY" 10 | question = "How does regular exercise impact mental health" 11 | client = OpenAI(api_key=api_key, base_url="https://api.deepseek.com") 12 | 13 | #step1 14 | questions = generate_enhanced_questions(api_key, question,client) 15 | print("generated questions") 16 | print(questions) 17 | 18 | #step2 19 | output = [] 20 | for _, enhanced_question in questions.items(): 21 | result = scrape_and_save(enhanced_question, research_api_key) 22 | output.append(result) 23 | print("research results") 24 | print(output) 25 | 26 | enhanced_answers = edit_answers(output, client) 27 | print("cleared research results") 28 | print(enhanced_answers) 29 | 30 | # step3 31 | summary = summary_blog(client,enhanced_answers) 32 | print("Summary Blog Post:") 33 | print(summary) 34 | 35 | with open("output\final.md", 'w', encoding='utf-8') as file: 36 | file.write(summary) 37 | -------------------------------------------------------------------------------- /output/final.md: -------------------------------------------------------------------------------- 1 | **Exercise: A Natural Way to Combat Depression and Anxiety** 2 | 3 | Depression and anxiety can significantly impact one's quality of life, but engaging in regular exercise can be a powerful tool in managing these conditions. Mayo Clinic, with its locations in Arizona, Florida, and Minnesota, as well as Mayo Clinic Health System sites, supports the integration of exercise into mental health treatment plans. 4 | 5 | **The Benefits of Exercise for Mental Health** 6 | 7 | Exercise is not only beneficial for physical health but also for mental well-being. It can help prevent and improve various health issues, including high blood pressure, diabetes, and arthritis. Research shows that exercise can also improve mood and reduce anxiety, although the exact mechanisms are not fully understood. 8 | 9 | **How Exercise Helps** 10 | 11 | Regular physical activity can alleviate symptoms of depression and anxiety by: 12 | - Releasing feel-good brain chemicals that may ease depression (neurotransmitters, endorphins, and endocannabinoids) 13 | - Reducing immune system chemicals that can worsen depression 14 | - Increasing body temperature, which may have calming effects 15 | 16 | Exercise also offers mental and emotional benefits, such as: 17 | - Improving sleep 18 | - Boosting self-confidence 19 | - Taking your mind off worries, allowing for a mental break 20 | 21 | **Types of Exercise** 22 | 23 | Exercise doesn't have to be intense to be beneficial. Activities like walking, gardening, or even household chores can improve mood. The key is to find activities that you enjoy and can incorporate into your daily routine. 24 | 25 | **Guidelines for Exercise** 26 | 27 | For most adults, the U.S. Department of Health and Human Services recommends at least 150 minutes of moderate aerobic activity or 75 minutes of vigorous aerobic activity per week. However, even short bursts of activity can accumulate and offer health benefits. 28 | 29 | **Getting Started and Staying Motivated** 30 | 31 | Starting an exercise routine can be challenging, but the following steps can help: 32 | 1. Consult with a healthcare professional to determine the best exercise plan for you. 33 | 2. Start with small, achievable goals. 34 | 3. Find a type of exercise that you enjoy. 35 | 4. Make exercise a regular part of your day. 36 | 5. Stay patient and persistent, as results may take time. 37 | 38 | **Conclusion** 39 | 40 | While exercise is a valuable tool in managing depression and anxiety, it is not a substitute for professional mental health treatment. If symptoms persist despite regular physical activity, it is important to seek advice from a healthcare or mental health professional. Exercise, when combined with other treatments, can be a significant part of a comprehensive approach to improving mental health.It seems like you haven't provided any text for me to correct and rephrase. Please provide the text you want assistance with, and I'll be happy to help you summarize it into a blog post.Exercise: A Key to Mental Health and Emotional Wellbeing 41 | 42 | We often associate exercise with physical health, but its benefits extend far beyond that. Research has shown that regular exercise plays a crucial role in enhancing mental health and emotional wellbeing, and can even reduce the incidence of mental illness. 43 | 44 | Physical activity has been found to decrease the likelihood of developing mental health issues. It can also aid in the treatment of conditions such as depression and anxiety. In fact, exercise can be as effective as antidepressants or cognitive behavioral therapy for mild to moderate depression. It can also complement other treatment methods, making it a versatile tool in mental health care. 45 | 46 | Exercise has a direct impact on our mood, concentration, and alertness. It can foster a positive outlook on life, making it a natural mood booster. The relationship between exercise and mental health is complex, with inactivity sometimes leading to or resulting from mental illness. However, the benefits of exercise for mental health are numerous. It improves cardiovascular health and overall physical health, which is particularly important for individuals with mental health issues who are at a higher risk of chronic physical conditions. 47 | 48 | If you're new to exercise, you might wonder how much you need to do to improve your mental health. The good news is that even low to moderate intensity exercise can positively impact your mood and cognitive functions. Guidelines recommend that adults should engage in moderate physical activity for 2.5-5 hours per week, such as brisk walking or swimming, or vigorous activity for 1.25-2.5 hours per week, like jogging or team sports. Any exercise is beneficial, including leisurely walks, stretching, yoga, or even household chores. 49 | 50 | Starting an exercise routine can be daunting, but having a plan can help you begin and maintain it. Incorporating outdoor activities can enhance feelings of vitality, enthusiasm, and self-esteem, and reduce tension, depression, and fatigue. Incorporating exercise into daily activities, such as walking or cycling instead of driving, can also be beneficial. The key is to move more and sit less each day. 51 | 52 | Remember, the information provided here is for educational purposes only and should not replace advice from a healthcare professional. The State of Victoria and the Department of Health are not liable for any reliance on the information provided herein.Summary Blog Post: 53 | 54 | As we navigate through various health challenges and seasonal changes, it's crucial to stay informed and proactive about our well-being. Here's a roundup of essential health tips to keep in mind: 55 | 56 | 1. **Salmonella is sneaky**: Be cautious with food handling and preparation to avoid this common foodborne illness. 57 | 58 | 2. **Hot weather plan**: Prepare for high temperatures with hydration and cooling strategies to prevent heat-related health issues. 59 | 60 | 3. **Strong legs for summer activities**: Strengthening your legs can enhance your enjoyment and performance in outdoor activities like hiking, biking, and swimming. 61 | 62 | 4. **Sexually transmitted infections (STIs)**: Educate teens on the importance of safe sex practices to prevent STIs. 63 | 64 | 5. **Exfoliation**: Regular exfoliation can improve skin health and appearance, promoting a fresh and vibrant complexion. 65 | 66 | 6. **Wildfire smoke**: When air quality is affected by wildfires, take measures to protect your respiratory health, such as staying indoors and using air purifiers. 67 | 68 | 7. **PTSD treatment**: Advances in treatment for post-traumatic stress disorder (PTSD) offer hope for those affected, with new approaches and therapies being developed. 69 | 70 | 8. **Virtual mental health care**: Embrace the convenience of virtual visits for mental health care, ensuring you find a system that works for your needs and comfort. 71 | 72 | 9. **Sugar alcohol**: Understand the health implications of sugar alcohols in your diet, which can be a lower-calorie alternative to sugar but may have digestive side effects. 73 | 74 | 10. **Bird flu primer**: Stay informed about avian influenza, its risks, and preventive measures to protect yourself and your community. 75 | 76 | 11. **Mind & Mood**: Remember that exercise is not just good for the body but also for the mind. It can be as effective as antidepressants for some, promoting neurotrophic growth factors that improve brain function and mood. 77 | 78 | By keeping these points in mind, you can take proactive steps to maintain your health and well-being throughout the year. Stay informed, stay active, and prioritize your health in all seasons.**Exercise for Mental Well-Being: Unveiling the Neurobiological Mechanisms in Depression Management** 79 | 80 | Depression, a widespread mental health disorder, is marked by pervasive sadness, fatigue, and a diminished interest in activities. Despite its prevalence, the therapeutic mechanisms of exercise in alleviating depression are not fully understood. This review delves into the molecular, neural, and physiological pathways that underpin the antidepressant effects of exercise, offering insights into various exercise interventions for depression management. 81 | 82 | **Molecular Insights into Exercise's Antidepressant Effect** 83 | 84 | Exercise appears to influence peripheral tryptophan metabolism, central inflammation, and the levels of brain-derived neurotrophic factors (BDNF) through the activation of peroxisome proliferator-activated receptor γ coactivator 1α (PGC-1α) in skeletal muscles. Additionally, exercise facilitates "bone-brain crosstalk" by enhancing the levels of uncarboxylated osteocalcin. 85 | 86 | **Neural and Physiological Mechanisms** 87 | 88 | Exercise therapy corrects aberrant expression of brain-gut peptides, modulates cytokine production and neurotransmitter release, and regulates inflammatory pathways and microRNA expression. These changes collectively contribute to the antidepressant effects observed with regular physical activity. 89 | 90 | **Recommended Exercise Interventions** 91 | 92 | Aerobic exercise is particularly recommended for managing depression, with frequencies of 3 to 5 times per week and medium to high intensity. This regimen is supported by research that suggests a positive correlation between exercise intensity and antidepressant outcomes. 93 | 94 | **Conclusion** 95 | 96 | This review underscores the significant potential of exercise as a therapeutic intervention for depression. By elucidating the molecular pathways and neural mechanisms involved in exercise's antidepressant effect, this study opens new avenues for developing targeted therapies for depression management. The comprehensive understanding of how exercise impacts mental health at a cellular and physiological level could lead to more effective treatment strategies for individuals suffering from depression. 97 | 98 | **Keywords:** exercise; physical activity; neurobiology; depression; antidepressant; inflammation; brain-derived neurotrophic factor; kynurenine; skeletal muscle; aerobic exercise 99 | 100 | **Reference:** 101 | Ren, J.; Xiao, H. Exercise for Mental Well-Being: Exploring Neurobiological Advances and Intervention Effects in Depression. Life 2023, 13, 1505. https://doi.org/10.3390/life13071505**Unlocking the Psychological Benefits of Exercise: A Path to Mental Well-being** 102 | 103 | Physical activity is not only crucial for maintaining a healthy body but also plays a pivotal role in enhancing mental health. Dr. Shawna Charles, a Walden University PhD in Psychology graduate, exemplifies this connection through her innovative approach to mental health support at her boxing gym in Los Angeles. This facility not only promotes physical fitness but also provides a supportive environment where individuals can access psychological support and essential social services. 104 | 105 | **The Psychological Advantages of Exercise** 106 | 107 | 1. **Alleviation of Depression and Anxiety**: Regular physical activity has been shown to reduce symptoms of depression and anxiety by releasing endorphins, which are natural mood lifters. 108 | 109 | 2. **Improved Cognitive Function**: Exercise stimulates the growth of new brain cells and helps prevent age-related decline, keeping the mind sharp and focused. 110 | 111 | 3. **Enhanced Self-Esteem**: Achieving fitness goals can boost self-confidence and self-esteem, providing a sense of accomplishment and empowerment. 112 | 113 | 4. **Better Stress Management**: Physical activity is a healthy outlet for stress, helping to manage and reduce the body's stress responses. 114 | 115 | 5. **Increased Social Interaction**: Group activities or sports can improve social skills and provide a sense of community and belonging, which is vital for mental health. 116 | 117 | **Education and Empowerment** 118 | 119 | For those interested in understanding the psychological benefits of exercise and how it can be used to help others, pursuing a bachelor’s degree in psychology can be a transformative step. Walden University offers an online BS in Psychology that is designed to fit into a busy lifestyle, providing a flexible and socially conscious learning environment. This program equips students with the knowledge and skills to make a meaningful impact in the field of psychology, potentially leading to careers where they can help others achieve mental and physical well-being. 120 | 121 | **Take the First Step Today** 122 | 123 | If you're considering furthering your education to explore how psychology and physical health intersect, Walden University is ready to support your journey. Enrollment Specialists are available to answer your questions and guide you through the application process. To start your path towards making a difference in the lives of others, call Walden University at 855-646-5286 or browse their programs to find the right fit for your educational goals. 124 | 125 | Remember, your journey towards a better understanding of mental health and its connection to physical activity begins with a single step. Take that step today and unlock the potential to transform not only your life but also the lives of those around you. -------------------------------------------------------------------------------- /quentions_generation.py: -------------------------------------------------------------------------------- 1 | import json 2 | import re 3 | 4 | 5 | def extract_json(text): 6 | json_match = re.search(r'({.*})', text, re.DOTALL) 7 | if json_match: 8 | json_str = json_match.group(1) 9 | try: 10 | return json.loads(json_str) 11 | except json.JSONDecodeError: 12 | raise ValueError("Extracted text is not a valid JSON") 13 | else: 14 | raise ValueError("No JSON object found in the text") 15 | 16 | def generate_enhanced_questions(api_key, question,client): 17 | response = client.chat.completions.create( 18 | model="deepseek-chat", 19 | messages=[ 20 | {"role": "system", "content": "You are a helpful assistant that outputs in JSON. For a given question, include the original question and provide 5 enhanced versions of that question. JSON fields should be {Question_i}: {that question}"}, 21 | {"role": "user", "content": f"{question}"}, 22 | ], 23 | stream=False 24 | ) 25 | 26 | question_json = response.choices[0].message.content 27 | question_json = extract_json(question_json) 28 | return question_json 29 | 30 | 31 | -------------------------------------------------------------------------------- /research_agent.py: -------------------------------------------------------------------------------- 1 | from serpapi import GoogleSearch 2 | import requests 3 | from bs4 import BeautifulSoup 4 | 5 | 6 | def scrape_and_save(query, api_key): 7 | output = [] 8 | params = { 9 | "engine": "google", 10 | "q": query, 11 | "api_key": api_key 12 | } 13 | 14 | search = GoogleSearch(params) 15 | results = search.get_dict() 16 | 17 | for result in results.get('organic_results', []): 18 | snippet = result.get('snippet', 'No snippet found') 19 | link = result.get('link', 'No link found') 20 | 21 | if link != 'No link found': 22 | response = requests.get(link) 23 | if response.status_code == 200: 24 | soup = BeautifulSoup(response.text, 'html.parser') 25 | paragraphs = soup.find_all('p') 26 | full_text = "\n".join([para.get_text() for para in paragraphs]) 27 | output.append(full_text) 28 | else: 29 | print(f"Failed to retrieve the page: {link}") 30 | return output 31 | 32 | 33 | def edit_answers(output, client): 34 | advanced_answers = {} 35 | for k in output: 36 | for i, text in enumerate(k): 37 | response = client.chat.completions.create( 38 | model="deepseek-chat", 39 | messages=[ 40 | {"role": "system", "content": f"Remove dates, addresses, and line breaks, then correct and rephrase the following text while retaining all specific words and names intact: {text}"}, 41 | {"role": "user", "content": ""}, 42 | ], 43 | stream=False) 44 | enhanced_answer = response.choices[0].message.content 45 | advanced_answers[f"Answers_{i+1}"] = enhanced_answer 46 | return advanced_answers 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /summary_agent.py: -------------------------------------------------------------------------------- 1 | 2 | def summary_blog(client,enhanced_questions): 3 | blog_text = "" 4 | for query_number, text in enhanced_questions.items(): 5 | response = client.chat.completions.create( 6 | model="deepseek-chat", 7 | messages=[ 8 | {"role": "system", "content": f"Take the following answers one by one and turn them into a summary blog post: {text}"}, 9 | {"role": "user", "content": ""}, 10 | ], 11 | stream=False) 12 | blog_text += response.choices[0].message.content 13 | return blog_text 14 | --------------------------------------------------------------------------------