aiagents4pharma 1.24.1__tar.gz → 1.25.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/PKG-INFO +50 -26
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/README.md +49 -23
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/__init__.py +1 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/__init__.py +6 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/agents/__init__.py +5 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/agents/main_agent.py +68 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/configs/__init__.py +5 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/configs/agents/__init__.py +5 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/configs/agents/main_agent/default.yaml +12 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/configs/config.yaml +3 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/states/__init__.py +4 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/states/state_talk2aiagents4pharma.py +16 -0
- aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/tests/test_main_agent.py +112 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/agents/t2b_agent.py +3 -3
- aiagents4pharma-1.25.1/aiagents4pharma/talk2biomodels/tests/__init__.py +3 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_ask_question.py +1 -4
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_get_annotation.py +7 -4
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_getmodelinfo.py +6 -3
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_integration.py +1 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_param_scan.py +4 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_query_article.py +5 -3
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_search_models.py +8 -5
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_simulate_model.py +4 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_steady_state.py +5 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/agents/t2kg_agent.py +3 -3
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/agents/main_agent.py +1 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/agents/s2_agent.py +1 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/agents/zotero_agent.py +2 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_call_s2.py +3 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_call_zotero.py +3 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_main_agent.py +2 -1
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_s2_agent.py +8 -6
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_zotero_agent.py +7 -5
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma.egg-info/PKG-INFO +50 -26
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma.egg-info/SOURCES.txt +11 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma.egg-info/requires.txt +0 -2
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/pyproject.toml +3 -2
- aiagents4pharma-1.25.1/release_version.txt +1 -0
- aiagents4pharma-1.24.1/release_version.txt +0 -1
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/LICENSE +0 -0
- {aiagents4pharma-1.24.1/aiagents4pharma/talk2biomodels → aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma}/tests/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/agents/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/api/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/api/kegg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/api/ols.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/api/uniprot.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/agents/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/config.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/ask_question/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/ask_question/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/get_annotation/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/configs/tools/get_annotation/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/models/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/models/basico_model.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/models/sys_bio_model.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/states/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/states/state_talk2biomodels.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_api.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_basico_model.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_load_biomodel.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tests/test_sys_bio_model.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/ask_question.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/custom_plotter.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/get_annotation.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/get_modelinfo.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/load_arguments.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/load_biomodel.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/parameter_scan.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/query_article.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/search_models.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/simulate_model.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/steady_state.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/tools/utils.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/agents/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/agents/scp_agent.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/states/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/states/state_talk2cells.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/tests/scp_agent/test_scp_agent.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/tools/scp_agent/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/tools/scp_agent/display_studies.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2cells/tools/scp_agent/search_studies.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/agents/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/app/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/config.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/states/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/states/state_talk2knowledgegraphs.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_agents_t2kg_agent.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_biobridge_primekg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_dataset.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_primekg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_starkqa_primekg.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_tools_graphrag_reasoning.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_extraction.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_summarization.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_embeddings.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_huggingface.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_nim_molmim.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_ollama.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_sentencetransformer.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_enrichments.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ollama.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_pubchem.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_kg_utils.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_pubchem_utils.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tools/graphrag_reasoning.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tools/load_arguments.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tools/subgraph_extraction.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/tools/subgraph_summarization.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/nim_molmim.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/ollama.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/enrichments.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ollama.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/pubchem_strings.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/extractions/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/extractions/pcst.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/kg_utils.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2knowledgegraphs/utils/pubchem_utils.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/agents/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/zotero_agent/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/zotero_agent/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/app/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/app/frontend/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/app/frontend/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/config.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/retrieve_semantic_scholar_paper_id/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/search/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/search/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/zotero_read/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/configs/tools/zotero_read/default.yaml +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/state/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/state/state_talk2scholars.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_llm_main_integration.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_routing_logic.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_s2_tools.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_state.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tests/test_zotero_tool.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/display_results.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/multi_paper_rec.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/query_results.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/retrieve_semantic_scholar_paper_id.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/search.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/zotero/__init__.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2scholars/tools/zotero/zotero_read.py +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma.egg-info/dependency_links.txt +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma.egg-info/top_level.txt +0 -0
- {aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: aiagents4pharma
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.25.1
|
4
4
|
Summary: AI Agents for drug discovery, drug development, and other pharmaceutical R&D.
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -42,7 +42,6 @@ Requires-Dist: sentence_transformers==3.3.1
|
|
42
42
|
Requires-Dist: tabulate==0.9.0
|
43
43
|
Requires-Dist: torch==2.2.2
|
44
44
|
Requires-Dist: torch_geometric==2.6.1
|
45
|
-
Requires-Dist: tqdm==4.66.6
|
46
45
|
Requires-Dist: transformers==4.48.0
|
47
46
|
Requires-Dist: mkdocs==1.6.1
|
48
47
|
Requires-Dist: mkdocs-jupyter==0.25.1
|
@@ -56,7 +55,6 @@ Requires-Dist: h5py==3.13.0
|
|
56
55
|
Requires-Dist: igraph==0.11.8
|
57
56
|
Requires-Dist: ipykernel==6.29.5
|
58
57
|
Requires-Dist: ipython==8.32.0
|
59
|
-
Requires-Dist: numpy==2.1.3
|
60
58
|
Requires-Dist: nbformat==5.10.4
|
61
59
|
Requires-Dist: scipy==1.15.2
|
62
60
|
Requires-Dist: tqdm==4.67.1
|
@@ -83,6 +81,7 @@ Our toolkit currently consists of the following agents:
|
|
83
81
|
- **Talk2KnowledgeGraphs** _(v1 in progress)_: Access and explore complex biological knowledge graphs for insightful data connections.
|
84
82
|
- **Talk2Scholars** _(v1 in progress)_: Get recommendations for articles related to your choice. Download, query, and write/retrieve them to your reference manager (currently supporting Zotero).
|
85
83
|
- **Talk2Cells** _(v1 in progress)_: Query and analyze sequencing data with ease.
|
84
|
+
- **Talk2AIAgents4Pharma** _(v1 in progress)_: Converse with all the agents above (currently supports T2B and T2KG)
|
86
85
|
|
87
86
|

|
88
87
|
|
@@ -104,49 +103,47 @@ Check out the tutorials on each agent for detailed instrcutions.
|
|
104
103
|
|
105
104
|
_Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
|
106
105
|
|
107
|
-
|
106
|
+
1. **Pull the Docker images**
|
108
107
|
|
109
|
-
1. **Pull the Docker image**
|
110
108
|
```bash
|
111
109
|
docker pull virtualpatientengine/talk2biomodels
|
112
110
|
```
|
113
|
-
|
111
|
+
|
112
|
+
```bash
|
113
|
+
docker pull virtualpatientengine/talk2scholars
|
114
|
+
```
|
115
|
+
|
116
|
+
2. **Run the containers**
|
117
|
+
|
114
118
|
```bash
|
115
119
|
docker run -d \
|
120
|
+
--name talk2biomodels \
|
116
121
|
-e OPENAI_API_KEY=<your_openai_api_key> \
|
117
122
|
-e NVIDIA_API_KEY=<your_nvidia_api_key> \
|
118
123
|
-p 8501:8501 \
|
119
124
|
virtualpatientengine/talk2biomodels
|
120
125
|
```
|
121
|
-
3. **Access the Web App**
|
122
|
-
Open your browser and go to:
|
123
|
-
```
|
124
|
-
http://localhost:8501
|
125
|
-
```
|
126
|
-
_You can create a free account at NVIDIA and apply for their
|
127
|
-
free credits [here](https://build.nvidia.com/explore/discover)._
|
128
126
|
|
129
|
-
#### **Running Talk2Scholars**
|
130
|
-
|
131
|
-
1. **Pull the Docker image**
|
132
|
-
```bash
|
133
|
-
docker pull virtualpatientengine/talk2scholars
|
134
|
-
```
|
135
|
-
2. **Run the container**
|
136
127
|
```bash
|
137
128
|
docker run -d \
|
129
|
+
--name talk2scholars \
|
138
130
|
-e OPENAI_API_KEY=<your_openai_api_key> \
|
139
131
|
-e ZOTERO_API_KEY=<your_zotero_api_key> \
|
140
132
|
-e ZOTERO_USER_ID=<your_zotero_user_id> \
|
141
133
|
-p 8501:8501 \
|
142
134
|
virtualpatientengine/talk2scholars
|
143
135
|
```
|
144
|
-
|
145
|
-
|
136
|
+
|
137
|
+
3. **Access the Web App**
|
138
|
+
Open your browser and go to:
|
139
|
+
|
146
140
|
```
|
147
141
|
http://localhost:8501
|
148
142
|
```
|
149
143
|
|
144
|
+
_You can create a free account at NVIDIA and apply for their
|
145
|
+
free credits [here](https://build.nvidia.com/explore/discover)._
|
146
|
+
|
150
147
|
#### **Notes**
|
151
148
|
|
152
149
|
- Ensure you **replace `<your_openai_api_key>`, `<your_nvidia_api_key>`, `<your_zotero_api_key>`, and `<your_zotero_user_id>`** with your actual credentials.
|
@@ -167,6 +164,33 @@ _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
|
|
167
164
|
```bash
|
168
165
|
pip install -r requirements.txt
|
169
166
|
```
|
167
|
+
The current version of T2KG requires additional Ollama library to be installed.
|
168
|
+
|
169
|
+
Ollama can be easily downloaded and installed from the following link: [https://ollama.com/download](https://ollama.com/download)
|
170
|
+
|
171
|
+
As an alternative, use the following commands to install the library using terminal and to pull necessary model:
|
172
|
+
|
173
|
+
- Ubuntu:
|
174
|
+
```
|
175
|
+
curl -fsSL https://ollama.com/install.sh | sh
|
176
|
+
ollama pull nomic-embed-text
|
177
|
+
```
|
178
|
+
- Windows:
|
179
|
+
```
|
180
|
+
curl -L https://ollama.com/download/ollama-windows-amd64.zip -o ollama-windows-amd64.zip
|
181
|
+
tar -xzf .\ollama-windows-amd64.zip
|
182
|
+
start ollama serve
|
183
|
+
ollama pull nomic-embed-text
|
184
|
+
```
|
185
|
+
- macOS:
|
186
|
+
```
|
187
|
+
brew install ollama
|
188
|
+
ollama pull nomic-embed-text
|
189
|
+
```
|
190
|
+
A list of pulled Ollama models can be checked using the following command:
|
191
|
+
```
|
192
|
+
ollama list
|
193
|
+
```
|
170
194
|
3. **Initialize OPENAI_API_KEY and NVIDIA_API_KEY**
|
171
195
|
|
172
196
|
```bash
|
@@ -192,10 +216,10 @@ _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
|
|
192
216
|
```
|
193
217
|
|
194
218
|
_Please note that this will create a new tracing project in your Langsmith
|
195
|
-
account with the name `T2X-xxxx`, where `X` can be `
|
196
|
-
`KG` (KnowledgeGraphs), or `C` (Cells).
|
197
|
-
|
198
|
-
session._
|
219
|
+
account with the name `T2X-xxxx`, where `X` can be `AA4P` (Main Agent),
|
220
|
+
`B` (Biomodels), `S` (Scholars), `KG` (KnowledgeGraphs), or `C` (Cells).
|
221
|
+
If you skip the previous step, it will default to the name `default`.
|
222
|
+
`xxxx` will be the 4-digit ID created for the session._
|
199
223
|
|
200
224
|
6. **Launch the app:**
|
201
225
|
```bash
|
@@ -16,6 +16,7 @@ Our toolkit currently consists of the following agents:
|
|
16
16
|
- **Talk2KnowledgeGraphs** _(v1 in progress)_: Access and explore complex biological knowledge graphs for insightful data connections.
|
17
17
|
- **Talk2Scholars** _(v1 in progress)_: Get recommendations for articles related to your choice. Download, query, and write/retrieve them to your reference manager (currently supporting Zotero).
|
18
18
|
- **Talk2Cells** _(v1 in progress)_: Query and analyze sequencing data with ease.
|
19
|
+
- **Talk2AIAgents4Pharma** _(v1 in progress)_: Converse with all the agents above (currently supports T2B and T2KG)
|
19
20
|
|
20
21
|

|
21
22
|
|
@@ -37,49 +38,47 @@ Check out the tutorials on each agent for detailed instrcutions.
|
|
37
38
|
|
38
39
|
_Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
|
39
40
|
|
40
|
-
|
41
|
+
1. **Pull the Docker images**
|
41
42
|
|
42
|
-
1. **Pull the Docker image**
|
43
43
|
```bash
|
44
44
|
docker pull virtualpatientengine/talk2biomodels
|
45
45
|
```
|
46
|
-
|
46
|
+
|
47
|
+
```bash
|
48
|
+
docker pull virtualpatientengine/talk2scholars
|
49
|
+
```
|
50
|
+
|
51
|
+
2. **Run the containers**
|
52
|
+
|
47
53
|
```bash
|
48
54
|
docker run -d \
|
55
|
+
--name talk2biomodels \
|
49
56
|
-e OPENAI_API_KEY=<your_openai_api_key> \
|
50
57
|
-e NVIDIA_API_KEY=<your_nvidia_api_key> \
|
51
58
|
-p 8501:8501 \
|
52
59
|
virtualpatientengine/talk2biomodels
|
53
60
|
```
|
54
|
-
3. **Access the Web App**
|
55
|
-
Open your browser and go to:
|
56
|
-
```
|
57
|
-
http://localhost:8501
|
58
|
-
```
|
59
|
-
_You can create a free account at NVIDIA and apply for their
|
60
|
-
free credits [here](https://build.nvidia.com/explore/discover)._
|
61
61
|
|
62
|
-
#### **Running Talk2Scholars**
|
63
|
-
|
64
|
-
1. **Pull the Docker image**
|
65
|
-
```bash
|
66
|
-
docker pull virtualpatientengine/talk2scholars
|
67
|
-
```
|
68
|
-
2. **Run the container**
|
69
62
|
```bash
|
70
63
|
docker run -d \
|
64
|
+
--name talk2scholars \
|
71
65
|
-e OPENAI_API_KEY=<your_openai_api_key> \
|
72
66
|
-e ZOTERO_API_KEY=<your_zotero_api_key> \
|
73
67
|
-e ZOTERO_USER_ID=<your_zotero_user_id> \
|
74
68
|
-p 8501:8501 \
|
75
69
|
virtualpatientengine/talk2scholars
|
76
70
|
```
|
77
|
-
|
78
|
-
|
71
|
+
|
72
|
+
3. **Access the Web App**
|
73
|
+
Open your browser and go to:
|
74
|
+
|
79
75
|
```
|
80
76
|
http://localhost:8501
|
81
77
|
```
|
82
78
|
|
79
|
+
_You can create a free account at NVIDIA and apply for their
|
80
|
+
free credits [here](https://build.nvidia.com/explore/discover)._
|
81
|
+
|
83
82
|
#### **Notes**
|
84
83
|
|
85
84
|
- Ensure you **replace `<your_openai_api_key>`, `<your_nvidia_api_key>`, `<your_zotero_api_key>`, and `<your_zotero_user_id>`** with your actual credentials.
|
@@ -100,6 +99,33 @@ _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
|
|
100
99
|
```bash
|
101
100
|
pip install -r requirements.txt
|
102
101
|
```
|
102
|
+
The current version of T2KG requires additional Ollama library to be installed.
|
103
|
+
|
104
|
+
Ollama can be easily downloaded and installed from the following link: [https://ollama.com/download](https://ollama.com/download)
|
105
|
+
|
106
|
+
As an alternative, use the following commands to install the library using terminal and to pull necessary model:
|
107
|
+
|
108
|
+
- Ubuntu:
|
109
|
+
```
|
110
|
+
curl -fsSL https://ollama.com/install.sh | sh
|
111
|
+
ollama pull nomic-embed-text
|
112
|
+
```
|
113
|
+
- Windows:
|
114
|
+
```
|
115
|
+
curl -L https://ollama.com/download/ollama-windows-amd64.zip -o ollama-windows-amd64.zip
|
116
|
+
tar -xzf .\ollama-windows-amd64.zip
|
117
|
+
start ollama serve
|
118
|
+
ollama pull nomic-embed-text
|
119
|
+
```
|
120
|
+
- macOS:
|
121
|
+
```
|
122
|
+
brew install ollama
|
123
|
+
ollama pull nomic-embed-text
|
124
|
+
```
|
125
|
+
A list of pulled Ollama models can be checked using the following command:
|
126
|
+
```
|
127
|
+
ollama list
|
128
|
+
```
|
103
129
|
3. **Initialize OPENAI_API_KEY and NVIDIA_API_KEY**
|
104
130
|
|
105
131
|
```bash
|
@@ -125,10 +151,10 @@ _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
|
|
125
151
|
```
|
126
152
|
|
127
153
|
_Please note that this will create a new tracing project in your Langsmith
|
128
|
-
account with the name `T2X-xxxx`, where `X` can be `
|
129
|
-
`KG` (KnowledgeGraphs), or `C` (Cells).
|
130
|
-
|
131
|
-
session._
|
154
|
+
account with the name `T2X-xxxx`, where `X` can be `AA4P` (Main Agent),
|
155
|
+
`B` (Biomodels), `S` (Scholars), `KG` (KnowledgeGraphs), or `C` (Cells).
|
156
|
+
If you skip the previous step, it will default to the name `default`.
|
157
|
+
`xxxx` will be the 4-digit ID created for the session._
|
132
158
|
|
133
159
|
6. **Launch the app:**
|
134
160
|
```bash
|
@@ -0,0 +1,68 @@
|
|
1
|
+
#/usr/bin/env python3
|
2
|
+
|
3
|
+
'''
|
4
|
+
This is the main agent file for the AIAgents4Pharma.
|
5
|
+
'''
|
6
|
+
|
7
|
+
import logging
|
8
|
+
import hydra
|
9
|
+
from langgraph_supervisor import create_supervisor
|
10
|
+
from langchain_openai import ChatOpenAI
|
11
|
+
from langchain_core.language_models.chat_models import BaseChatModel
|
12
|
+
from langgraph.checkpoint.memory import MemorySaver
|
13
|
+
from ...talk2biomodels.agents.t2b_agent import get_app as get_app_t2b
|
14
|
+
from ...talk2knowledgegraphs.agents.t2kg_agent import get_app as get_app_t2kg
|
15
|
+
from ..states.state_talk2aiagents4pharma import Talk2AIAgents4Pharma
|
16
|
+
|
17
|
+
# Initialize logger
|
18
|
+
logging.basicConfig(level=logging.INFO)
|
19
|
+
logger = logging.getLogger(__name__)
|
20
|
+
|
21
|
+
def get_app(uniq_id, llm_model: BaseChatModel):
|
22
|
+
'''
|
23
|
+
This function returns the langraph app.
|
24
|
+
'''
|
25
|
+
if llm_model.model_name == 'gpt-4o-mini':
|
26
|
+
llm_model = ChatOpenAI(model='gpt-4o-mini',
|
27
|
+
temperature=0,
|
28
|
+
model_kwargs={"parallel_tool_calls": False})
|
29
|
+
# Load hydra configuration
|
30
|
+
logger.log(logging.INFO, "Launching AIAgents4Pharma_Agent with thread_id %s", uniq_id)
|
31
|
+
with hydra.initialize(version_base=None, config_path="../configs"):
|
32
|
+
cfg = hydra.compose(config_name='config',
|
33
|
+
overrides=['agents/main_agent=default'])
|
34
|
+
cfg = cfg.agents.main_agent
|
35
|
+
logger.log(logging.INFO, "System_prompt of T2AA4P: %s", cfg.system_prompt)
|
36
|
+
with hydra.initialize(version_base=None, config_path="../../talk2biomodels/configs"):
|
37
|
+
cfg_t2b = hydra.compose(config_name='config',
|
38
|
+
overrides=['agents/t2b_agent=default'])
|
39
|
+
cfg_t2b = cfg_t2b.agents.t2b_agent
|
40
|
+
with hydra.initialize(version_base=None, config_path="../../talk2knowledgegraphs/configs"):
|
41
|
+
cfg_t2kg = hydra.compose(config_name='config',
|
42
|
+
overrides=['agents/t2kg_agent=default'])
|
43
|
+
cfg_t2kg = cfg_t2kg.agents.t2kg_agent
|
44
|
+
system_prompt = cfg.system_prompt
|
45
|
+
system_prompt += "\n\nHere is the system prompt of T2B agent\n"
|
46
|
+
system_prompt += cfg_t2b.state_modifier
|
47
|
+
system_prompt += "\n\nHere is the system prompt of T2KG agent\n"
|
48
|
+
system_prompt += cfg_t2kg.state_modifier
|
49
|
+
# Create supervisor workflow
|
50
|
+
workflow = create_supervisor(
|
51
|
+
[
|
52
|
+
get_app_t2b(uniq_id, llm_model), # Talk2BioModels
|
53
|
+
get_app_t2kg(uniq_id, llm_model) # Talk2KnowledgeGraphs
|
54
|
+
],
|
55
|
+
model=llm_model,
|
56
|
+
state_schema=Talk2AIAgents4Pharma,
|
57
|
+
# Full history is needed to extract
|
58
|
+
# the tool artifacts
|
59
|
+
output_mode="full_history",
|
60
|
+
add_handoff_back_messages=False,
|
61
|
+
prompt=system_prompt
|
62
|
+
)
|
63
|
+
|
64
|
+
# Compile and run
|
65
|
+
app = workflow.compile(checkpointer=MemorySaver(),
|
66
|
+
name="AIAgents4Pharma_Agent")
|
67
|
+
|
68
|
+
return app
|
aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/configs/agents/main_agent/default.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
_target_: agents.main_agent.get_app
|
2
|
+
system_prompt: >
|
3
|
+
You are Talk2AIAgents4Pharma agent.
|
4
|
+
You are managing a team of the following 2 agents:
|
5
|
+
|
6
|
+
1. Talk2Biomodels (T2B) agent: This agent can operate
|
7
|
+
on mathematical models of biological systems. This
|
8
|
+
agent can also query an uploaded document/pdf/article.
|
9
|
+
|
10
|
+
2. Talk2KnowledgeGraphs (T2KG) agent: This agent can
|
11
|
+
reason over a knowledge graph of biological entities
|
12
|
+
and their relationships.
|
aiagents4pharma-1.25.1/aiagents4pharma/talk2aiagents4pharma/states/state_talk2aiagents4pharma.py
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
"""
|
2
|
+
This is the state file for the Talk2AIAgents4Pharma agent.
|
3
|
+
"""
|
4
|
+
|
5
|
+
from ...talk2biomodels.states.state_talk2biomodels import Talk2Biomodels
|
6
|
+
from ...talk2knowledgegraphs.states.state_talk2knowledgegraphs import Talk2KnowledgeGraphs
|
7
|
+
|
8
|
+
class Talk2AIAgents4Pharma(Talk2Biomodels,
|
9
|
+
Talk2KnowledgeGraphs):
|
10
|
+
"""
|
11
|
+
The state for the Talk2AIAgents4Pharma agent.
|
12
|
+
|
13
|
+
This class inherits from the classes:
|
14
|
+
1. Talk2Biomodels
|
15
|
+
2. Talk2KnowledgeGraphs
|
16
|
+
"""
|
@@ -0,0 +1,112 @@
|
|
1
|
+
'''
|
2
|
+
Test Talk2AIAgents4Pharma supervisor agent.
|
3
|
+
'''
|
4
|
+
|
5
|
+
import pytest
|
6
|
+
from langchain_core.messages import HumanMessage
|
7
|
+
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
|
8
|
+
from ..agents.main_agent import get_app
|
9
|
+
|
10
|
+
# Define the data path for the test files of Talk2KnowledgeGraphs agent
|
11
|
+
DATA_PATH = "aiagents4pharma/talk2knowledgegraphs/tests/files"
|
12
|
+
LLM_MODEL = ChatOpenAI(model="gpt-4o-mini", temperature=0.0)
|
13
|
+
|
14
|
+
@pytest.fixture(name="input_dict")
|
15
|
+
def input_dict_fixture():
|
16
|
+
"""
|
17
|
+
Input dictionary fixture for Talk2AIAgents4Pharma agent,
|
18
|
+
which is partly inherited from the Talk2KnowledgeGraphs agent.
|
19
|
+
"""
|
20
|
+
input_dict = {
|
21
|
+
"topk_nodes": 3,
|
22
|
+
"topk_edges": 3,
|
23
|
+
"uploaded_files": [],
|
24
|
+
"dic_source_graph": [
|
25
|
+
{
|
26
|
+
"name": "PrimeKG",
|
27
|
+
"kg_pyg_path": f"{DATA_PATH}/primekg_ibd_pyg_graph.pkl",
|
28
|
+
"kg_text_path": f"{DATA_PATH}/primekg_ibd_text_graph.pkl",
|
29
|
+
}
|
30
|
+
],
|
31
|
+
"dic_extracted_graph": []
|
32
|
+
}
|
33
|
+
|
34
|
+
return input_dict
|
35
|
+
|
36
|
+
def test_main_agent_invokes_t2kg(input_dict):
|
37
|
+
"""
|
38
|
+
In the following test, we will ask the main agent (supervisor)
|
39
|
+
to list drugs that target the gene Interleukin-6. We will check
|
40
|
+
if the Talk2KnowledgeGraphs agent is invoked. We will do so by
|
41
|
+
checking the state of the Talk2AIAgents4Pharma agent, which is
|
42
|
+
partly inherited from the Talk2KnowledgeGraphs agent
|
43
|
+
|
44
|
+
Args:
|
45
|
+
input_dict: Input dictionary
|
46
|
+
"""
|
47
|
+
# Prepare LLM and embedding model
|
48
|
+
input_dict["llm_model"] = LLM_MODEL
|
49
|
+
input_dict["embedding_model"] = OpenAIEmbeddings(model="text-embedding-3-small")
|
50
|
+
|
51
|
+
# Setup the app
|
52
|
+
unique_id = 12345
|
53
|
+
app = get_app(unique_id, llm_model=input_dict["llm_model"])
|
54
|
+
config = {"configurable": {"thread_id": unique_id}}
|
55
|
+
# Update state
|
56
|
+
app.update_state(
|
57
|
+
config,
|
58
|
+
input_dict,
|
59
|
+
)
|
60
|
+
prompt = "List drugs that target the gene Interleukin-6"
|
61
|
+
|
62
|
+
# Invoke the agent
|
63
|
+
response = app.invoke({"messages": [HumanMessage(content=prompt)]}, config=config)
|
64
|
+
|
65
|
+
# Check assistant message
|
66
|
+
assistant_msg = response["messages"][-1].content
|
67
|
+
assert isinstance(assistant_msg, str)
|
68
|
+
|
69
|
+
# Check extracted subgraph dictionary
|
70
|
+
current_state = app.get_state(config)
|
71
|
+
dic_extracted_graph = current_state.values["dic_extracted_graph"][0]
|
72
|
+
assert isinstance(dic_extracted_graph, dict)
|
73
|
+
assert dic_extracted_graph["graph_source"] == "PrimeKG"
|
74
|
+
assert dic_extracted_graph["topk_nodes"] == 3
|
75
|
+
assert dic_extracted_graph["topk_edges"] == 3
|
76
|
+
assert isinstance(dic_extracted_graph["graph_dict"], dict)
|
77
|
+
assert len(dic_extracted_graph["graph_dict"]["nodes"]) > 0
|
78
|
+
assert len(dic_extracted_graph["graph_dict"]["edges"]) > 0
|
79
|
+
assert isinstance(dic_extracted_graph["graph_text"], str)
|
80
|
+
# Check summarized subgraph
|
81
|
+
assert isinstance(dic_extracted_graph["graph_summary"], str)
|
82
|
+
|
83
|
+
def test_main_agent_invokes_t2b():
|
84
|
+
'''
|
85
|
+
In the following test, we will ask the main agent (supervisor)
|
86
|
+
to simulate a model. And we will check if the Talk2BioModels
|
87
|
+
agent is invoked. We will do so by checking the state of the
|
88
|
+
Talk2AIAgents4Pharma agent, which is partly inherited from the
|
89
|
+
Talk2BioModels agent.
|
90
|
+
'''
|
91
|
+
unique_id = 123
|
92
|
+
app = get_app(unique_id, llm_model=LLM_MODEL)
|
93
|
+
config = {"configurable": {"thread_id": unique_id}}
|
94
|
+
prompt = "Simulate model 64"
|
95
|
+
# Invoke the agent
|
96
|
+
app.invoke(
|
97
|
+
{"messages": [HumanMessage(content=prompt)]},
|
98
|
+
config=config
|
99
|
+
)
|
100
|
+
# Get the state of the Talk2AIAgents4Pharma agent
|
101
|
+
current_state = app.get_state(config)
|
102
|
+
# Check if the dic_simulated_data is in the state
|
103
|
+
dic_simulated_data = current_state.values["dic_simulated_data"]
|
104
|
+
# Check if the dic_simulated_data is a list
|
105
|
+
assert isinstance(dic_simulated_data, list)
|
106
|
+
# Check if the length of the dic_simulated_data is 1
|
107
|
+
assert len(dic_simulated_data) == 1
|
108
|
+
# Check if the source of the model is 64
|
109
|
+
assert dic_simulated_data[0]['source'] == 64
|
110
|
+
# Check if the data of the model contains
|
111
|
+
# '1,3-bisphosphoglycerate'
|
112
|
+
assert '1,3-bisphosphoglycerate' in dic_simulated_data[0]['data']
|
{aiagents4pharma-1.24.1 → aiagents4pharma-1.25.1}/aiagents4pharma/talk2biomodels/agents/t2b_agent.py
RENAMED
@@ -7,7 +7,6 @@ This is the agent file for the Talk2BioModels agent.
|
|
7
7
|
import logging
|
8
8
|
from typing import Annotated
|
9
9
|
import hydra
|
10
|
-
from langchain_openai import ChatOpenAI
|
11
10
|
from langchain_core.language_models.chat_models import BaseChatModel
|
12
11
|
from langgraph.checkpoint.memory import MemorySaver
|
13
12
|
from langgraph.graph import START, StateGraph
|
@@ -28,7 +27,7 @@ logging.basicConfig(level=logging.INFO)
|
|
28
27
|
logger = logging.getLogger(__name__)
|
29
28
|
|
30
29
|
def get_app(uniq_id,
|
31
|
-
llm_model: BaseChatModel
|
30
|
+
llm_model: BaseChatModel):
|
32
31
|
'''
|
33
32
|
This function returns the langraph app.
|
34
33
|
'''
|
@@ -65,7 +64,8 @@ def get_app(uniq_id,
|
|
65
64
|
llm_model,
|
66
65
|
tools=tools,
|
67
66
|
state_schema=Talk2Biomodels,
|
68
|
-
|
67
|
+
prompt=cfg.state_modifier,
|
68
|
+
version='v2',
|
69
69
|
checkpointer=MemorySaver()
|
70
70
|
)
|
71
71
|
|
@@ -11,7 +11,7 @@ def test_ask_question_tool():
|
|
11
11
|
Test the ask_question tool without the simulation results.
|
12
12
|
'''
|
13
13
|
unique_id = 12345
|
14
|
-
app = get_app(unique_id)
|
14
|
+
app = get_app(unique_id, llm_model=ChatOpenAI(model='gpt-4o-mini', temperature=0))
|
15
15
|
config = {"configurable": {"thread_id": unique_id}}
|
16
16
|
|
17
17
|
##########################################
|
@@ -20,9 +20,6 @@ def test_ask_question_tool():
|
|
20
20
|
# simulation has not been run. In this
|
21
21
|
# case, the tool should return an error
|
22
22
|
##########################################
|
23
|
-
# Update state
|
24
|
-
app.update_state(config,
|
25
|
-
{"llm_model": ChatOpenAI(model='gpt-4o-mini', temperature=0)})
|
26
23
|
# Define the prompt
|
27
24
|
prompt = "Call the ask_question tool to answer the "
|
28
25
|
prompt += "question: What is the concentration of CRP "
|
@@ -9,17 +9,20 @@ from langchain_openai import ChatOpenAI
|
|
9
9
|
from ..agents.t2b_agent import get_app
|
10
10
|
from ..tools.get_annotation import prepare_content_msg
|
11
11
|
|
12
|
+
LLM_MODEL = ChatOpenAI(model='gpt-4o-mini', temperature=0)
|
13
|
+
|
12
14
|
@pytest.fixture(name="make_graph")
|
13
15
|
def make_graph_fixture():
|
14
16
|
'''
|
15
17
|
Create an instance of the talk2biomodels agent.
|
16
18
|
'''
|
17
19
|
unique_id = random.randint(1000, 9999)
|
18
|
-
graph = get_app(unique_id)
|
20
|
+
graph = get_app(unique_id, llm_model=LLM_MODEL)
|
19
21
|
config = {"configurable": {"thread_id": unique_id}}
|
20
|
-
graph.update_state(
|
21
|
-
|
22
|
-
|
22
|
+
graph.update_state(
|
23
|
+
config,
|
24
|
+
{"llm_model": LLM_MODEL}
|
25
|
+
)
|
23
26
|
return graph, config
|
24
27
|
|
25
28
|
def test_no_model_provided(make_graph):
|
@@ -3,14 +3,17 @@ Test cases for Talk2Biomodels get_modelinfo tool.
|
|
3
3
|
'''
|
4
4
|
|
5
5
|
from langchain_core.messages import HumanMessage, ToolMessage
|
6
|
+
from langchain_openai import ChatOpenAI
|
6
7
|
from ..agents.t2b_agent import get_app
|
7
8
|
|
9
|
+
LLM_MODEL = ChatOpenAI(model='gpt-4o-mini',temperature=0)
|
10
|
+
|
8
11
|
def test_get_modelinfo_tool():
|
9
12
|
'''
|
10
13
|
Test the get_modelinfo tool.
|
11
14
|
'''
|
12
15
|
unique_id = 12345
|
13
|
-
app = get_app(unique_id)
|
16
|
+
app = get_app(unique_id, LLM_MODEL)
|
14
17
|
config = {"configurable": {"thread_id": unique_id}}
|
15
18
|
# Update state
|
16
19
|
app.update_state(config,
|
@@ -33,7 +36,7 @@ def test_model_with_no_species():
|
|
33
36
|
This should raise a tool error.
|
34
37
|
'''
|
35
38
|
unique_id = 12345
|
36
|
-
app = get_app(unique_id)
|
39
|
+
app = get_app(unique_id, LLM_MODEL)
|
37
40
|
config = {"configurable": {"thread_id": unique_id}}
|
38
41
|
prompt = "Extract all species from model 20"
|
39
42
|
# Test the tool get_modelinfo
|
@@ -64,7 +67,7 @@ def test_model_with_no_parameters():
|
|
64
67
|
This should raise a tool error.
|
65
68
|
'''
|
66
69
|
unique_id = 12345
|
67
|
-
app = get_app(unique_id)
|
70
|
+
app = get_app(unique_id, LLM_MODEL)
|
68
71
|
config = {"configurable": {"thread_id": unique_id}}
|
69
72
|
prompt = "Extract all parameters from model 10"
|
70
73
|
# Test the tool get_modelinfo
|
@@ -14,9 +14,8 @@ def test_integration():
|
|
14
14
|
Test the integration of the tools.
|
15
15
|
'''
|
16
16
|
unique_id = 1234567
|
17
|
-
app = get_app(unique_id)
|
17
|
+
app = get_app(unique_id, llm_model=LLM_MODEL)
|
18
18
|
config = {"configurable": {"thread_id": unique_id}}
|
19
|
-
app.update_state(config, {"llm_model": LLM_MODEL})
|
20
19
|
# ##########################################
|
21
20
|
# ## Test simulate_model tool
|
22
21
|
# ##########################################
|