aiagents4pharma 1.17.0__tar.gz → 1.18.0__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.18.0/PKG-INFO +157 -0
- aiagents4pharma-1.18.0/README.md +107 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/__init__.py +0 -1
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/__init__.py +1 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/agents/t2b_agent.py +7 -7
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/agents/t2b_agent/default.yaml +1 -1
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/tools/ask_question/default.yaml +8 -16
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/tools/get_annotation/default.yaml +1 -1
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/states/state_talk2biomodels.py +4 -1
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_ask_question.py +4 -2
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_get_annotation.py +4 -2
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_integration.py +34 -30
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_query_article.py +7 -1
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_search_models.py +3 -1
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_steady_state.py +6 -3
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/ask_question.py +6 -6
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/custom_plotter.py +23 -10
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/get_annotation.py +14 -13
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/query_article.py +6 -2
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/search_models.py +9 -3
- aiagents4pharma-1.18.0/aiagents4pharma.egg-info/PKG-INFO +157 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma.egg-info/SOURCES.txt +9 -11
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma.egg-info/requires.txt +1 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/pyproject.toml +13 -12
- aiagents4pharma-1.18.0/release_version.txt +1 -0
- aiagents4pharma-1.17.0/PKG-INFO +0 -212
- aiagents4pharma-1.17.0/README.md +0 -163
- aiagents4pharma-1.17.0/aiagents4pharma/configs/__init__.py +0 -5
- aiagents4pharma-1.17.0/aiagents4pharma/configs/config.yaml +0 -5
- aiagents4pharma-1.17.0/aiagents4pharma.egg-info/PKG-INFO +0 -212
- aiagents4pharma-1.17.0/release_version.txt +0 -1
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/LICENSE +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/agents/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/api/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/api/kegg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/api/ols.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/api/uniprot.py +0 -0
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/__init__.py +0 -0
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/agents/__init__.py +0 -0
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/agents/t2b_agent/__init__.py +0 -0
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/tools/__init__.py +0 -0
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/tools/ask_question/__init__.py +0 -0
- {aiagents4pharma-1.17.0/aiagents4pharma/configs/talk2biomodels → aiagents4pharma-1.18.0/aiagents4pharma/talk2biomodels/configs}/tools/get_annotation/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/models/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/models/basico_model.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/models/sys_bio_model.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/states/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_api.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_basico_model.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_getmodelinfo.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_param_scan.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_simulate_model.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tests/test_sys_bio_model.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/get_modelinfo.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/load_arguments.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/load_biomodel.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/parameter_scan.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/simulate_model.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/tools/steady_state.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/agents/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/agents/scp_agent.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/states/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/states/state_talk2cells.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/tests/scp_agent/test_scp_agent.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/tools/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/tools/scp_agent/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/tools/scp_agent/display_studies.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2cells/tools/scp_agent/search_studies.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_biobridge_primekg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_dataset.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_primekg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_starkqa_primekg.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_embeddings.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_huggingface.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_sentencetransformer.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_enrichments.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ollama.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/enrichments.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ollama.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2knowledgegraphs/utils/kg_utils.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/agents/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/agents/main_agent.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/agents/s2_agent.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/agents/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/default.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/default.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/app/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/app/frontend/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/app/frontend/default.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/config.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/multi_paper_recommendation/default.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/search/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/search/default.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/configs/tools/single_paper_recommendation/default.yaml +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/state/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/state/state_talk2scholars.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tests/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tests/test_langgraph.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tools/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tools/s2/__init__.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tools/s2/display_results.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tools/s2/multi_paper_rec.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tools/s2/search.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma.egg-info/dependency_links.txt +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma.egg-info/top_level.txt +0 -0
- {aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/setup.cfg +0 -0
@@ -0,0 +1,157 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: aiagents4pharma
|
3
|
+
Version: 1.18.0
|
4
|
+
Summary: AI Agents for drug discovery, drug development, and other pharmaceutical R&D.
|
5
|
+
Classifier: Programming Language :: Python :: 3
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
7
|
+
Classifier: Operating System :: OS Independent
|
8
|
+
Requires-Python: >=3.12
|
9
|
+
Description-Content-Type: text/markdown
|
10
|
+
License-File: LICENSE
|
11
|
+
Requires-Dist: copasi_basico==0.78
|
12
|
+
Requires-Dist: coverage==7.6.4
|
13
|
+
Requires-Dist: einops==0.8.0
|
14
|
+
Requires-Dist: gdown==5.2.0
|
15
|
+
Requires-Dist: huggingface_hub==0.26.5
|
16
|
+
Requires-Dist: hydra-core==1.3.2
|
17
|
+
Requires-Dist: joblib==1.4.2
|
18
|
+
Requires-Dist: langchain==0.3.7
|
19
|
+
Requires-Dist: langchain-community==0.3.5
|
20
|
+
Requires-Dist: langchain-core==0.3.31
|
21
|
+
Requires-Dist: langchain-experimental==0.3.3
|
22
|
+
Requires-Dist: langchain-nvidia-ai-endpoints==0.3.9
|
23
|
+
Requires-Dist: langchain-openai==0.2.5
|
24
|
+
Requires-Dist: langchain_ollama==0.2.2
|
25
|
+
Requires-Dist: langgraph==0.2.66
|
26
|
+
Requires-Dist: matplotlib==3.9.2
|
27
|
+
Requires-Dist: openai==1.59.4
|
28
|
+
Requires-Dist: ollama==0.4.6
|
29
|
+
Requires-Dist: pandas==2.2.3
|
30
|
+
Requires-Dist: plotly==5.24.1
|
31
|
+
Requires-Dist: pydantic==2.9.2
|
32
|
+
Requires-Dist: pylint==3.3.1
|
33
|
+
Requires-Dist: pypdf==5.2.0
|
34
|
+
Requires-Dist: pytest==8.3.3
|
35
|
+
Requires-Dist: pytest-asyncio==0.25.2
|
36
|
+
Requires-Dist: streamlit==1.39.0
|
37
|
+
Requires-Dist: sentence_transformers==3.3.1
|
38
|
+
Requires-Dist: tabulate==0.9.0
|
39
|
+
Requires-Dist: torch==2.2.2
|
40
|
+
Requires-Dist: torch_geometric==2.6.1
|
41
|
+
Requires-Dist: tqdm==4.66.6
|
42
|
+
Requires-Dist: transformers==4.48.0
|
43
|
+
Requires-Dist: mkdocs==1.6.1
|
44
|
+
Requires-Dist: mkdocs-jupyter==0.25.1
|
45
|
+
Requires-Dist: mkdocs-material==9.5.47
|
46
|
+
Requires-Dist: mkdocstrings-python==1.12.2
|
47
|
+
Requires-Dist: mkdocs-include-markdown-plugin==7.1.2
|
48
|
+
Requires-Dist: mkdocstrings==0.27.0
|
49
|
+
Requires-Dist: streamlit-feedback
|
50
|
+
|
51
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2biomodels.yml)
|
52
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2cells.yml)
|
53
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2knowledgegraphs.yml)
|
54
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2scholars.yml)
|
55
|
+

|
56
|
+

|
57
|
+
|
58
|
+
|
59
|
+
## Introduction
|
60
|
+
|
61
|
+
Welcome to **AIAgents4Pharma** – an open-source project by [Team VPE](https://github.com/VirtualPatientEngine) that brings together AI-driven tools to help researchers and pharma interact seamlessly with complex biological data.
|
62
|
+
|
63
|
+
Our toolkit currently consists of the following agents:
|
64
|
+
|
65
|
+
- **Talk2BioModels** _(v1 released; v2 in progress)_: Engage directly with mathematical models in systems biology.
|
66
|
+
- **Talk2KnowledgeGraphs** _(v1 in progress)_: Access and explore complex biological knowledge graphs for insightful data connections.
|
67
|
+
- **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).
|
68
|
+
- **Talk2Cells** _(v1 in progress)_: Query and analyze sequencing data with ease.
|
69
|
+
|
70
|
+

|
71
|
+
|
72
|
+
## Getting Started
|
73
|
+
|
74
|
+

|
75
|
+
|
76
|
+
### Installation
|
77
|
+
|
78
|
+
#### Option 1: PyPI
|
79
|
+
|
80
|
+
```bash
|
81
|
+
pip install aiagents4pharma
|
82
|
+
```
|
83
|
+
|
84
|
+
Check out the tutorials on each agent for detailed instrcutions.
|
85
|
+
|
86
|
+
#### Option 2: git
|
87
|
+
|
88
|
+
1. **Clone the repository:**
|
89
|
+
```bash
|
90
|
+
git clone https://github.com/VirtualPatientEngine/AIAgents4Pharma
|
91
|
+
cd AIAgents4Pharma
|
92
|
+
```
|
93
|
+
2. **Install dependencies:**
|
94
|
+
```bash
|
95
|
+
pip install .
|
96
|
+
```
|
97
|
+
3. **Initialize OPENAI_API_KEY and NVIDIA_API_KEY**
|
98
|
+
```bash
|
99
|
+
export OPENAI_API_KEY=....
|
100
|
+
```
|
101
|
+
```bash
|
102
|
+
export NVIDIA_API_KEY=....
|
103
|
+
```
|
104
|
+
_You can create a free account at NVIDIA and apply for their
|
105
|
+
free credits [here](https://build.nvidia.com/explore/discover)._
|
106
|
+
|
107
|
+
4. **[Optional] Initialize LANGSMITH_API_KEY**
|
108
|
+
```bash
|
109
|
+
export LANGCHAIN_TRACING_V2=true
|
110
|
+
export LANGCHAIN_API_KEY=<your-api-key>
|
111
|
+
```
|
112
|
+
_Please note that this will create a new tracing project in your Langsmith
|
113
|
+
account with the name `T2X-xxxx`, where `X` can be `B` (Biomodels), `S` (Scholars),
|
114
|
+
`KG` (KnowledgeGraphs), or `C` (Cells). If you skip the previous step, it will
|
115
|
+
default to the name `default`. `xxxx` will be the 4-digit ID created for the
|
116
|
+
session._
|
117
|
+
|
118
|
+
5. **Launch the app:**
|
119
|
+
```bash
|
120
|
+
streamlit run app/frontend/streamlit_app_<agent>.py
|
121
|
+
```
|
122
|
+
_Replace <agent> with the agent name you are interested to launch._
|
123
|
+
|
124
|
+
For detailed instructions on each agent, please refer to their respective modules.
|
125
|
+
|
126
|
+
---
|
127
|
+
|
128
|
+
## Contributing
|
129
|
+
|
130
|
+
We welcome contributions to AIAgents4Pharma! Here’s how you can help:
|
131
|
+
|
132
|
+
1. **Fork the repository**
|
133
|
+
2. **Create a new branch** for your feature (`git checkout -b feat/feature-name`)
|
134
|
+
3. **Commit your changes** (`git commit -m 'feat: Add new feature'`)
|
135
|
+
4. **Push to the branch** (`git push origin feat/feature-name`)
|
136
|
+
5. **Open a pull request** and reach out to any one of us below via Discussions:
|
137
|
+
|
138
|
+
_Note: We welcome all contributions, not just programming-related ones. Feel free to open bug reports, suggest new features, or participate as a beta tester. Your support is greatly appreciated!_
|
139
|
+
|
140
|
+
- **Talk2Biomodels/Talk2Cells**: [@gurdeep330](https://github.com/gurdeep330) [@lilijap](https://github.com/lilijap) [@dmccloskey](https://github.com/dmccloskey)
|
141
|
+
- **Talk2KnowledgeGraphs**: [@awmulyadi](https://github.com/awmulyadi) [@dmccloskey](https://github.com/dmccloskey)
|
142
|
+
- **Talk2Scholars**: [@ansh-info](https://github.com/ansh-info) [@gurdeep330](https://github.com/gurdeep330) [@dmccloskey](https://github.com/dmccloskey)
|
143
|
+
|
144
|
+
### Current Needs
|
145
|
+
|
146
|
+
- **Beta testers** for Talk2BioModels and Talk2Scholars.
|
147
|
+
- **Developers** with experience in Python and Bioinformatics and/or knowledge graphs for contributions to AIAgents4Pharma.
|
148
|
+
|
149
|
+
Feel free to reach out to us via Discussions.
|
150
|
+
|
151
|
+
Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
152
|
+
|
153
|
+
---
|
154
|
+
|
155
|
+
## Feedback
|
156
|
+
|
157
|
+
Questions/Bug reports/Feature requests/Comments/Suggestions? We welcome all. Please use `Isssues` or `Discussions` 😀
|
@@ -0,0 +1,107 @@
|
|
1
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2biomodels.yml)
|
2
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2cells.yml)
|
3
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2knowledgegraphs.yml)
|
4
|
+
[](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2scholars.yml)
|
5
|
+

|
6
|
+

|
7
|
+
|
8
|
+
|
9
|
+
## Introduction
|
10
|
+
|
11
|
+
Welcome to **AIAgents4Pharma** – an open-source project by [Team VPE](https://github.com/VirtualPatientEngine) that brings together AI-driven tools to help researchers and pharma interact seamlessly with complex biological data.
|
12
|
+
|
13
|
+
Our toolkit currently consists of the following agents:
|
14
|
+
|
15
|
+
- **Talk2BioModels** _(v1 released; v2 in progress)_: Engage directly with mathematical models in systems biology.
|
16
|
+
- **Talk2KnowledgeGraphs** _(v1 in progress)_: Access and explore complex biological knowledge graphs for insightful data connections.
|
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
|
+
- **Talk2Cells** _(v1 in progress)_: Query and analyze sequencing data with ease.
|
19
|
+
|
20
|
+

|
21
|
+
|
22
|
+
## Getting Started
|
23
|
+
|
24
|
+

|
25
|
+
|
26
|
+
### Installation
|
27
|
+
|
28
|
+
#### Option 1: PyPI
|
29
|
+
|
30
|
+
```bash
|
31
|
+
pip install aiagents4pharma
|
32
|
+
```
|
33
|
+
|
34
|
+
Check out the tutorials on each agent for detailed instrcutions.
|
35
|
+
|
36
|
+
#### Option 2: git
|
37
|
+
|
38
|
+
1. **Clone the repository:**
|
39
|
+
```bash
|
40
|
+
git clone https://github.com/VirtualPatientEngine/AIAgents4Pharma
|
41
|
+
cd AIAgents4Pharma
|
42
|
+
```
|
43
|
+
2. **Install dependencies:**
|
44
|
+
```bash
|
45
|
+
pip install .
|
46
|
+
```
|
47
|
+
3. **Initialize OPENAI_API_KEY and NVIDIA_API_KEY**
|
48
|
+
```bash
|
49
|
+
export OPENAI_API_KEY=....
|
50
|
+
```
|
51
|
+
```bash
|
52
|
+
export NVIDIA_API_KEY=....
|
53
|
+
```
|
54
|
+
_You can create a free account at NVIDIA and apply for their
|
55
|
+
free credits [here](https://build.nvidia.com/explore/discover)._
|
56
|
+
|
57
|
+
4. **[Optional] Initialize LANGSMITH_API_KEY**
|
58
|
+
```bash
|
59
|
+
export LANGCHAIN_TRACING_V2=true
|
60
|
+
export LANGCHAIN_API_KEY=<your-api-key>
|
61
|
+
```
|
62
|
+
_Please note that this will create a new tracing project in your Langsmith
|
63
|
+
account with the name `T2X-xxxx`, where `X` can be `B` (Biomodels), `S` (Scholars),
|
64
|
+
`KG` (KnowledgeGraphs), or `C` (Cells). If you skip the previous step, it will
|
65
|
+
default to the name `default`. `xxxx` will be the 4-digit ID created for the
|
66
|
+
session._
|
67
|
+
|
68
|
+
5. **Launch the app:**
|
69
|
+
```bash
|
70
|
+
streamlit run app/frontend/streamlit_app_<agent>.py
|
71
|
+
```
|
72
|
+
_Replace <agent> with the agent name you are interested to launch._
|
73
|
+
|
74
|
+
For detailed instructions on each agent, please refer to their respective modules.
|
75
|
+
|
76
|
+
---
|
77
|
+
|
78
|
+
## Contributing
|
79
|
+
|
80
|
+
We welcome contributions to AIAgents4Pharma! Here’s how you can help:
|
81
|
+
|
82
|
+
1. **Fork the repository**
|
83
|
+
2. **Create a new branch** for your feature (`git checkout -b feat/feature-name`)
|
84
|
+
3. **Commit your changes** (`git commit -m 'feat: Add new feature'`)
|
85
|
+
4. **Push to the branch** (`git push origin feat/feature-name`)
|
86
|
+
5. **Open a pull request** and reach out to any one of us below via Discussions:
|
87
|
+
|
88
|
+
_Note: We welcome all contributions, not just programming-related ones. Feel free to open bug reports, suggest new features, or participate as a beta tester. Your support is greatly appreciated!_
|
89
|
+
|
90
|
+
- **Talk2Biomodels/Talk2Cells**: [@gurdeep330](https://github.com/gurdeep330) [@lilijap](https://github.com/lilijap) [@dmccloskey](https://github.com/dmccloskey)
|
91
|
+
- **Talk2KnowledgeGraphs**: [@awmulyadi](https://github.com/awmulyadi) [@dmccloskey](https://github.com/dmccloskey)
|
92
|
+
- **Talk2Scholars**: [@ansh-info](https://github.com/ansh-info) [@gurdeep330](https://github.com/gurdeep330) [@dmccloskey](https://github.com/dmccloskey)
|
93
|
+
|
94
|
+
### Current Needs
|
95
|
+
|
96
|
+
- **Beta testers** for Talk2BioModels and Talk2Scholars.
|
97
|
+
- **Developers** with experience in Python and Bioinformatics and/or knowledge graphs for contributions to AIAgents4Pharma.
|
98
|
+
|
99
|
+
Feel free to reach out to us via Discussions.
|
100
|
+
|
101
|
+
Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
|
102
|
+
|
103
|
+
---
|
104
|
+
|
105
|
+
## Feedback
|
106
|
+
|
107
|
+
Questions/Bug reports/Feature requests/Comments/Suggestions? We welcome all. Please use `Isssues` or `Discussions` 😀
|
{aiagents4pharma-1.17.0 → aiagents4pharma-1.18.0}/aiagents4pharma/talk2biomodels/agents/t2b_agent.py
RENAMED
@@ -8,6 +8,7 @@ import logging
|
|
8
8
|
from typing import Annotated
|
9
9
|
import hydra
|
10
10
|
from langchain_openai import ChatOpenAI
|
11
|
+
from langchain_core.language_models.chat_models import BaseChatModel
|
11
12
|
from langgraph.checkpoint.memory import MemorySaver
|
12
13
|
from langgraph.graph import START, StateGraph
|
13
14
|
from langgraph.prebuilt import create_react_agent, ToolNode, InjectedState
|
@@ -26,7 +27,8 @@ from ..states.state_talk2biomodels import Talk2Biomodels
|
|
26
27
|
logging.basicConfig(level=logging.INFO)
|
27
28
|
logger = logging.getLogger(__name__)
|
28
29
|
|
29
|
-
def get_app(uniq_id,
|
30
|
+
def get_app(uniq_id,
|
31
|
+
llm_model: BaseChatModel = ChatOpenAI(model='gpt-4o-mini', temperature=0)):
|
30
32
|
'''
|
31
33
|
This function returns the langraph app.
|
32
34
|
'''
|
@@ -51,18 +53,16 @@ def get_app(uniq_id, llm_model='gpt-4o-mini'):
|
|
51
53
|
QueryArticle()
|
52
54
|
])
|
53
55
|
|
54
|
-
# Define the model
|
55
|
-
llm = ChatOpenAI(model=llm_model, temperature=0)
|
56
56
|
# Load hydra configuration
|
57
57
|
logger.log(logging.INFO, "Load Hydra configuration for Talk2BioModels agent.")
|
58
|
-
with hydra.initialize(version_base=None, config_path="
|
58
|
+
with hydra.initialize(version_base=None, config_path="../configs"):
|
59
59
|
cfg = hydra.compose(config_name='config',
|
60
|
-
overrides=['
|
61
|
-
cfg = cfg.
|
60
|
+
overrides=['agents/t2b_agent=default'])
|
61
|
+
cfg = cfg.agents.t2b_agent
|
62
62
|
logger.log(logging.INFO, "state_modifier: %s", cfg.state_modifier)
|
63
63
|
# Create the agent
|
64
64
|
model = create_react_agent(
|
65
|
-
|
65
|
+
llm_model,
|
66
66
|
tools=tools,
|
67
67
|
state_schema=Talk2Biomodels,
|
68
68
|
state_modifier=cfg.state_modifier,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
_target_:
|
1
|
+
_target_: tools.ask_question.AskQuestionTool
|
2
2
|
steady_state_prompt: >
|
3
3
|
Following are header columns of the data:
|
4
4
|
`species_name`: Name of the species,
|
@@ -10,22 +10,14 @@ steady_state_prompt: >
|
|
10
10
|
|
11
11
|
Here are some instructions to help you answer questions:
|
12
12
|
|
13
|
-
1.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
1. If the user wants to know the time taken by the model to reach
|
14
|
+
steady state, you should look at the `steady_state_transition_time`
|
15
|
+
column of the data for the model species.
|
16
|
+
|
17
|
+
2. The highest value in the column `steady_state_transition_time`
|
18
|
+
is the time taken by the model to reach steady state.
|
18
19
|
|
19
|
-
|
20
|
-
steady state, you should look at the steady_state_transition_time
|
21
|
-
column of the data for the model species. The highest value in
|
22
|
-
this column is the time taken by the model to reach steady state.
|
23
|
-
|
24
|
-
3. To get accurate results, trim the data to the relevant columns
|
25
|
-
before performing any calculations. This will help you avoid
|
26
|
-
errors in your calculations, and ignore irrelevant data.
|
27
|
-
|
28
|
-
4. Please use the units provided below to answer the questions.
|
20
|
+
3. Please use the units provided below to answer the questions.
|
29
21
|
simulation_prompt: >
|
30
22
|
Following is the information about the data frame:
|
31
23
|
1. First column is the time column, and the rest of the columns
|
@@ -7,6 +7,8 @@ This is the state file for the Talk2BioModels agent.
|
|
7
7
|
from typing import Annotated
|
8
8
|
import operator
|
9
9
|
from langgraph.prebuilt.chat_agent_executor import AgentState
|
10
|
+
from langchain_core.language_models import BaseChatModel
|
11
|
+
from langchain_core.embeddings import Embeddings
|
10
12
|
|
11
13
|
def add_data(data1: dict, data2: dict) -> dict:
|
12
14
|
"""
|
@@ -26,7 +28,8 @@ class Talk2Biomodels(AgentState):
|
|
26
28
|
"""
|
27
29
|
The state for the Talk2BioModels agent.
|
28
30
|
"""
|
29
|
-
llm_model:
|
31
|
+
llm_model: BaseChatModel
|
32
|
+
text_embedding_model: Embeddings
|
30
33
|
pdf_file_name: str
|
31
34
|
# A StateGraph may receive a concurrent updates
|
32
35
|
# which is not supported by the StateGraph. Hence,
|
@@ -3,6 +3,7 @@ Test cases for Talk2Biomodels.
|
|
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
|
|
8
9
|
def test_ask_question_tool():
|
@@ -10,7 +11,7 @@ def test_ask_question_tool():
|
|
10
11
|
Test the ask_question tool without the simulation results.
|
11
12
|
'''
|
12
13
|
unique_id = 12345
|
13
|
-
app = get_app(unique_id
|
14
|
+
app = get_app(unique_id)
|
14
15
|
config = {"configurable": {"thread_id": unique_id}}
|
15
16
|
|
16
17
|
##########################################
|
@@ -20,7 +21,8 @@ def test_ask_question_tool():
|
|
20
21
|
# case, the tool should return an error
|
21
22
|
##########################################
|
22
23
|
# Update state
|
23
|
-
app.update_state(config,
|
24
|
+
app.update_state(config,
|
25
|
+
{"llm_model": ChatOpenAI(model='gpt-4o-mini', temperature=0)})
|
24
26
|
# Define the prompt
|
25
27
|
prompt = "Call the ask_question tool to answer the "
|
26
28
|
prompt += "question: What is the concentration of CRP "
|
@@ -5,6 +5,7 @@ Test cases for Talk2Biomodels get_annotation tool.
|
|
5
5
|
import random
|
6
6
|
import pytest
|
7
7
|
from langchain_core.messages import HumanMessage, ToolMessage
|
8
|
+
from langchain_openai import ChatOpenAI
|
8
9
|
from ..agents.t2b_agent import get_app
|
9
10
|
from ..tools.get_annotation import prepare_content_msg
|
10
11
|
|
@@ -16,7 +17,9 @@ def make_graph_fixture():
|
|
16
17
|
unique_id = random.randint(1000, 9999)
|
17
18
|
graph = get_app(unique_id)
|
18
19
|
config = {"configurable": {"thread_id": unique_id}}
|
19
|
-
graph.update_state(config, {"llm_model":
|
20
|
+
graph.update_state(config, {"llm_model": ChatOpenAI(model='gpt-4o-mini',
|
21
|
+
temperature=0)
|
22
|
+
})
|
20
23
|
return graph, config
|
21
24
|
|
22
25
|
def test_no_model_provided(make_graph):
|
@@ -85,7 +88,6 @@ def test_invalid_species_provided(make_graph):
|
|
85
88
|
# (likely due to an invalid species).
|
86
89
|
test_condition = True
|
87
90
|
break
|
88
|
-
# assert test_condition
|
89
91
|
assert test_condition
|
90
92
|
|
91
93
|
def test_invalid_and_valid_species_provided(make_graph):
|
@@ -4,8 +4,11 @@ Test cases for Talk2Biomodels.
|
|
4
4
|
|
5
5
|
import pandas as pd
|
6
6
|
from langchain_core.messages import HumanMessage, ToolMessage
|
7
|
+
from langchain_openai import ChatOpenAI
|
7
8
|
from ..agents.t2b_agent import get_app
|
8
9
|
|
10
|
+
LLM_MODEL = ChatOpenAI(model='gpt-4o-mini', temperature=0)
|
11
|
+
|
9
12
|
def test_integration():
|
10
13
|
'''
|
11
14
|
Test the integration of the tools.
|
@@ -13,7 +16,7 @@ def test_integration():
|
|
13
16
|
unique_id = 1234567
|
14
17
|
app = get_app(unique_id)
|
15
18
|
config = {"configurable": {"thread_id": unique_id}}
|
16
|
-
app.update_state(config, {"llm_model":
|
19
|
+
app.update_state(config, {"llm_model": LLM_MODEL})
|
17
20
|
# ##########################################
|
18
21
|
# ## Test simulate_model tool
|
19
22
|
# ##########################################
|
@@ -34,7 +37,7 @@ def test_integration():
|
|
34
37
|
# results are available
|
35
38
|
##########################################
|
36
39
|
# Update state
|
37
|
-
app.update_state(config, {"llm_model":
|
40
|
+
app.update_state(config, {"llm_model": LLM_MODEL})
|
38
41
|
prompt = """What is the concentration of CRP in serum after 100 hours?
|
39
42
|
Round off the value to 2 decimal places."""
|
40
43
|
# Test the tool get_modelinfo
|
@@ -49,12 +52,15 @@ def test_integration():
|
|
49
52
|
|
50
53
|
##########################################
|
51
54
|
# Test custom_plotter tool when the
|
52
|
-
# simulation results are available
|
55
|
+
# simulation results are available but
|
56
|
+
# the species is not available
|
53
57
|
##########################################
|
54
|
-
prompt = "
|
55
|
-
|
58
|
+
prompt = """Call the custom_plotter tool to make a plot
|
59
|
+
showing only species `TP53` and `Pyruvate`. Let me
|
60
|
+
know if these species were not found. Do not
|
61
|
+
invoke any other tool."""
|
56
62
|
# Update state
|
57
|
-
app.update_state(config, {"llm_model":
|
63
|
+
app.update_state(config, {"llm_model": LLM_MODEL}
|
58
64
|
)
|
59
65
|
# Test the tool get_modelinfo
|
60
66
|
response = app.invoke(
|
@@ -66,11 +72,8 @@ def test_integration():
|
|
66
72
|
# Get the messages from the current state
|
67
73
|
# and reverse the order
|
68
74
|
reversed_messages = current_state.values["messages"][::-1]
|
69
|
-
# Loop through the reversed messages
|
70
|
-
#
|
71
|
-
expected_header = ['Time', 'CRP{serum}', 'CRPExtracellular']
|
72
|
-
expected_header += ['CRP Suppression (%)', 'CRP (% of baseline)']
|
73
|
-
expected_header += ['CRP{liver}']
|
75
|
+
# Loop through the reversed messages until a
|
76
|
+
# ToolMessage is found.
|
74
77
|
predicted_artifact = []
|
75
78
|
for msg in reversed_messages:
|
76
79
|
if isinstance(msg, ToolMessage):
|
@@ -80,24 +83,17 @@ def test_integration():
|
|
80
83
|
if msg.name == "custom_plotter":
|
81
84
|
predicted_artifact = msg.artifact
|
82
85
|
break
|
83
|
-
#
|
84
|
-
|
85
|
-
|
86
|
-
# Extract the headers from the dataframe
|
87
|
-
predicted_header = df.columns.tolist()
|
88
|
-
# Check if the header is in the expected_header
|
89
|
-
# assert expected_header in predicted_artifact
|
90
|
-
assert set(expected_header).issubset(set(predicted_header))
|
86
|
+
# Check if the the predicted artifact is `None`
|
87
|
+
assert predicted_artifact is None
|
88
|
+
|
91
89
|
##########################################
|
92
90
|
# Test custom_plotter tool when the
|
93
|
-
# simulation results are available
|
94
|
-
# the species is not available
|
91
|
+
# simulation results are available
|
95
92
|
##########################################
|
96
|
-
prompt = "
|
97
|
-
|
98
|
-
time. Do not show any other species."""
|
93
|
+
prompt = "Plot only CRP related species."
|
94
|
+
|
99
95
|
# Update state
|
100
|
-
app.update_state(config, {"llm_model":
|
96
|
+
app.update_state(config, {"llm_model": LLM_MODEL}
|
101
97
|
)
|
102
98
|
# Test the tool get_modelinfo
|
103
99
|
response = app.invoke(
|
@@ -105,13 +101,15 @@ def test_integration():
|
|
105
101
|
config=config
|
106
102
|
)
|
107
103
|
assistant_msg = response["messages"][-1].content
|
108
|
-
# print (response["messages"])
|
109
104
|
current_state = app.get_state(config)
|
110
105
|
# Get the messages from the current state
|
111
106
|
# and reverse the order
|
112
107
|
reversed_messages = current_state.values["messages"][::-1]
|
113
|
-
# Loop through the reversed messages
|
114
|
-
# ToolMessage is found.
|
108
|
+
# Loop through the reversed messages
|
109
|
+
# until a ToolMessage is found.
|
110
|
+
expected_header = ['Time', 'CRP{serum}', 'CRPExtracellular']
|
111
|
+
expected_header += ['CRP Suppression (%)', 'CRP (% of baseline)']
|
112
|
+
expected_header += ['CRP{liver}']
|
115
113
|
predicted_artifact = []
|
116
114
|
for msg in reversed_messages:
|
117
115
|
if isinstance(msg, ToolMessage):
|
@@ -121,5 +119,11 @@ def test_integration():
|
|
121
119
|
if msg.name == "custom_plotter":
|
122
120
|
predicted_artifact = msg.artifact
|
123
121
|
break
|
124
|
-
#
|
125
|
-
|
122
|
+
# Convert the artifact into a pandas dataframe
|
123
|
+
# for easy comparison
|
124
|
+
df = pd.DataFrame(predicted_artifact)
|
125
|
+
# Extract the headers from the dataframe
|
126
|
+
predicted_header = df.columns.tolist()
|
127
|
+
# Check if the header is in the expected_header
|
128
|
+
# assert expected_header in predicted_artifact
|
129
|
+
assert set(expected_header).issubset(set(predicted_header))
|
@@ -5,6 +5,7 @@ Test cases for Talk2Biomodels query_article tool.
|
|
5
5
|
from pydantic import BaseModel, Field
|
6
6
|
from langchain_core.messages import HumanMessage, ToolMessage
|
7
7
|
from langchain_openai import ChatOpenAI
|
8
|
+
from langchain_nvidia_ai_endpoints import NVIDIAEmbeddings
|
8
9
|
from ..agents.t2b_agent import get_app
|
9
10
|
|
10
11
|
class Article(BaseModel):
|
@@ -21,8 +22,10 @@ def test_query_article_with_an_article():
|
|
21
22
|
app = get_app(unique_id)
|
22
23
|
config = {"configurable": {"thread_id": unique_id}}
|
23
24
|
# Update state by providing the pdf file name
|
25
|
+
# and the text embedding model
|
24
26
|
app.update_state(config,
|
25
|
-
{"pdf_file_name": "aiagents4pharma/talk2biomodels/tests/article_on_model_537.pdf"
|
27
|
+
{"pdf_file_name": "aiagents4pharma/talk2biomodels/tests/article_on_model_537.pdf",
|
28
|
+
"text_embedding_model": NVIDIAEmbeddings(model='nvidia/llama-3.2-nv-embedqa-1b-v2')})
|
26
29
|
prompt = "What is the title of the article?"
|
27
30
|
# Test the tool query_article
|
28
31
|
response = app.invoke(
|
@@ -55,6 +58,9 @@ def test_query_article_without_an_article():
|
|
55
58
|
app = get_app(unique_id)
|
56
59
|
config = {"configurable": {"thread_id": unique_id}}
|
57
60
|
prompt = "What is the title of the uploaded article?"
|
61
|
+
# Update state by providing the text embedding model
|
62
|
+
app.update_state(config,
|
63
|
+
{"text_embedding_model": NVIDIAEmbeddings(model='nvidia/llama-3.2-nv-embedqa-1b-v2')})
|
58
64
|
# Test the tool query_article
|
59
65
|
app.invoke(
|
60
66
|
{"messages": [HumanMessage(content=prompt)]},
|
@@ -3,6 +3,7 @@ Test cases for Talk2Biomodels search models tool.
|
|
3
3
|
'''
|
4
4
|
|
5
5
|
from langchain_core.messages import HumanMessage
|
6
|
+
from langchain_nvidia_ai_endpoints import ChatNVIDIA
|
6
7
|
from ..agents.t2b_agent import get_app
|
7
8
|
|
8
9
|
def test_search_models_tool():
|
@@ -13,7 +14,8 @@ def test_search_models_tool():
|
|
13
14
|
app = get_app(unique_id)
|
14
15
|
config = {"configurable": {"thread_id": unique_id}}
|
15
16
|
# Update state
|
16
|
-
app.update_state(config,
|
17
|
+
app.update_state(config,
|
18
|
+
{"llm_model": ChatNVIDIA(model="meta/llama-3.3-70b-instruct")})
|
17
19
|
prompt = "Search for models on Crohn's disease."
|
18
20
|
# Test the tool get_modelinfo
|
19
21
|
response = app.invoke(
|
@@ -3,8 +3,11 @@ Test cases for Talk2Biomodels steady state 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_steady_state_tool():
|
9
12
|
'''
|
10
13
|
Test the steady_state tool.
|
@@ -12,7 +15,7 @@ def test_steady_state_tool():
|
|
12
15
|
unique_id = 123
|
13
16
|
app = get_app(unique_id)
|
14
17
|
config = {"configurable": {"thread_id": unique_id}}
|
15
|
-
app.update_state(config, {"llm_model":
|
18
|
+
app.update_state(config, {"llm_model": LLM_MODEL})
|
16
19
|
#########################################################
|
17
20
|
# In this case, we will test if the tool returns an error
|
18
21
|
# when the model does not achieve a steady state. The tool
|
@@ -37,8 +40,8 @@ def test_steady_state_tool():
|
|
37
40
|
#########################################################
|
38
41
|
# In this case, we will test if the tool is indeed invoked
|
39
42
|
# successfully
|
40
|
-
prompt = """
|
41
|
-
|
43
|
+
prompt = """Bring model 64 to a steady state. Set the
|
44
|
+
initial concentration of `Pyruvate` to 0.2. The
|
42
45
|
concentration of `NAD` resets to 100 every 2 time units."""
|
43
46
|
# Invoke the agent
|
44
47
|
app.invoke(
|