aiagents4pharma 1.43.0__py3-none-any.whl → 1.45.0__py3-none-any.whl
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/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/.dockerignore +13 -0
- aiagents4pharma/talk2aiagents4pharma/Dockerfile +105 -0
- aiagents4pharma/talk2aiagents4pharma/README.md +1 -0
- aiagents4pharma/talk2aiagents4pharma/__init__.py +4 -5
- aiagents4pharma/talk2aiagents4pharma/agents/__init__.py +3 -2
- aiagents4pharma/talk2aiagents4pharma/agents/main_agent.py +24 -23
- aiagents4pharma/talk2aiagents4pharma/configs/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/configs/agents/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/configs/agents/main_agent/default.yaml +2 -2
- aiagents4pharma/talk2aiagents4pharma/configs/config.yaml +1 -1
- aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/.env.example +23 -0
- aiagents4pharma/talk2aiagents4pharma/docker-compose/cpu/docker-compose.yml +93 -0
- aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/.env.example +23 -0
- aiagents4pharma/talk2aiagents4pharma/docker-compose/gpu/docker-compose.yml +108 -0
- aiagents4pharma/talk2aiagents4pharma/install.md +127 -0
- aiagents4pharma/talk2aiagents4pharma/states/__init__.py +3 -2
- aiagents4pharma/talk2aiagents4pharma/states/state_talk2aiagents4pharma.py +5 -3
- aiagents4pharma/talk2aiagents4pharma/tests/__init__.py +2 -2
- aiagents4pharma/talk2aiagents4pharma/tests/test_main_agent.py +72 -50
- aiagents4pharma/talk2biomodels/.dockerignore +13 -0
- aiagents4pharma/talk2biomodels/Dockerfile +104 -0
- aiagents4pharma/talk2biomodels/README.md +1 -0
- aiagents4pharma/talk2biomodels/__init__.py +4 -8
- aiagents4pharma/talk2biomodels/agents/__init__.py +3 -2
- aiagents4pharma/talk2biomodels/agents/t2b_agent.py +47 -42
- aiagents4pharma/talk2biomodels/api/__init__.py +4 -5
- aiagents4pharma/talk2biomodels/api/kegg.py +14 -10
- aiagents4pharma/talk2biomodels/api/ols.py +13 -10
- aiagents4pharma/talk2biomodels/api/uniprot.py +7 -6
- aiagents4pharma/talk2biomodels/configs/__init__.py +3 -4
- aiagents4pharma/talk2biomodels/configs/agents/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/agents/t2b_agent/default.yaml +1 -1
- aiagents4pharma/talk2biomodels/configs/config.yaml +1 -1
- aiagents4pharma/talk2biomodels/configs/tools/__init__.py +4 -5
- aiagents4pharma/talk2biomodels/configs/tools/ask_question/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/tools/ask_question/default.yaml +1 -2
- aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/tools/custom_plotter/default.yaml +1 -1
- aiagents4pharma/talk2biomodels/configs/tools/get_annotation/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/configs/tools/get_annotation/default.yaml +1 -1
- aiagents4pharma/talk2biomodels/install.md +63 -0
- aiagents4pharma/talk2biomodels/models/__init__.py +4 -4
- aiagents4pharma/talk2biomodels/models/basico_model.py +36 -28
- aiagents4pharma/talk2biomodels/models/sys_bio_model.py +13 -10
- aiagents4pharma/talk2biomodels/states/__init__.py +3 -2
- aiagents4pharma/talk2biomodels/states/state_talk2biomodels.py +12 -8
- aiagents4pharma/talk2biomodels/tests/BIOMD0000000449_url.xml +1585 -0
- aiagents4pharma/talk2biomodels/tests/__init__.py +2 -2
- aiagents4pharma/talk2biomodels/tests/article_on_model_537.pdf +0 -0
- aiagents4pharma/talk2biomodels/tests/test_api.py +18 -14
- aiagents4pharma/talk2biomodels/tests/test_ask_question.py +8 -9
- aiagents4pharma/talk2biomodels/tests/test_basico_model.py +15 -9
- aiagents4pharma/talk2biomodels/tests/test_get_annotation.py +54 -55
- aiagents4pharma/talk2biomodels/tests/test_getmodelinfo.py +28 -27
- aiagents4pharma/talk2biomodels/tests/test_integration.py +21 -33
- aiagents4pharma/talk2biomodels/tests/test_load_biomodel.py +14 -11
- aiagents4pharma/talk2biomodels/tests/test_param_scan.py +21 -20
- aiagents4pharma/talk2biomodels/tests/test_query_article.py +129 -29
- aiagents4pharma/talk2biomodels/tests/test_search_models.py +9 -13
- aiagents4pharma/talk2biomodels/tests/test_simulate_model.py +16 -15
- aiagents4pharma/talk2biomodels/tests/test_steady_state.py +12 -22
- aiagents4pharma/talk2biomodels/tests/test_sys_bio_model.py +33 -29
- aiagents4pharma/talk2biomodels/tools/__init__.py +15 -12
- aiagents4pharma/talk2biomodels/tools/ask_question.py +42 -32
- aiagents4pharma/talk2biomodels/tools/custom_plotter.py +51 -43
- aiagents4pharma/talk2biomodels/tools/get_annotation.py +99 -75
- aiagents4pharma/talk2biomodels/tools/get_modelinfo.py +57 -51
- aiagents4pharma/talk2biomodels/tools/load_arguments.py +52 -32
- aiagents4pharma/talk2biomodels/tools/load_biomodel.py +8 -2
- aiagents4pharma/talk2biomodels/tools/parameter_scan.py +107 -90
- aiagents4pharma/talk2biomodels/tools/query_article.py +14 -13
- aiagents4pharma/talk2biomodels/tools/search_models.py +37 -26
- aiagents4pharma/talk2biomodels/tools/simulate_model.py +47 -37
- aiagents4pharma/talk2biomodels/tools/steady_state.py +76 -58
- aiagents4pharma/talk2biomodels/tools/utils.py +4 -3
- aiagents4pharma/talk2cells/README.md +1 -0
- aiagents4pharma/talk2cells/__init__.py +4 -5
- aiagents4pharma/talk2cells/agents/__init__.py +3 -2
- aiagents4pharma/talk2cells/agents/scp_agent.py +21 -19
- aiagents4pharma/talk2cells/states/__init__.py +3 -2
- aiagents4pharma/talk2cells/states/state_talk2cells.py +4 -2
- aiagents4pharma/talk2cells/tests/scp_agent/test_scp_agent.py +8 -9
- aiagents4pharma/talk2cells/tools/__init__.py +3 -2
- aiagents4pharma/talk2cells/tools/scp_agent/__init__.py +4 -4
- aiagents4pharma/talk2cells/tools/scp_agent/display_studies.py +5 -3
- aiagents4pharma/talk2cells/tools/scp_agent/search_studies.py +21 -22
- aiagents4pharma/talk2knowledgegraphs/.dockerignore +13 -0
- aiagents4pharma/talk2knowledgegraphs/Dockerfile +103 -0
- aiagents4pharma/talk2knowledgegraphs/README.md +1 -0
- aiagents4pharma/talk2knowledgegraphs/__init__.py +4 -7
- aiagents4pharma/talk2knowledgegraphs/agents/__init__.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/agents/t2kg_agent.py +40 -30
- aiagents4pharma/talk2knowledgegraphs/configs/__init__.py +3 -6
- aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/agents/t2kg_agent/default.yaml +8 -8
- aiagents4pharma/talk2knowledgegraphs/configs/app/__init__.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/app/frontend/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/config.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/tools/__init__.py +4 -5
- aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/graphrag_reasoning/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/tools/multimodal_subgraph_extraction/default.yaml +17 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_extraction/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/__init__.py +2 -2
- aiagents4pharma/talk2knowledgegraphs/configs/tools/subgraph_summarization/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/enrichments/ols_terms/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/enrichments/reactome_pathways/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/enrichments/uniprot_proteins/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/configs/utils/pubchem_utils/default.yaml +1 -1
- aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py +4 -6
- aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py +115 -67
- aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py +2 -0
- aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py +35 -24
- aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py +29 -21
- aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/.env.example +23 -0
- aiagents4pharma/talk2knowledgegraphs/docker-compose/cpu/docker-compose.yml +93 -0
- aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/.env.example +23 -0
- aiagents4pharma/talk2knowledgegraphs/docker-compose/gpu/docker-compose.yml +108 -0
- aiagents4pharma/talk2knowledgegraphs/entrypoint.sh +190 -0
- aiagents4pharma/talk2knowledgegraphs/install.md +140 -0
- aiagents4pharma/talk2knowledgegraphs/milvus_data_dump.py +31 -65
- aiagents4pharma/talk2knowledgegraphs/states/__init__.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/states/state_talk2knowledgegraphs.py +1 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_agents_t2kg_agent.py +65 -40
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_biobridge_primekg.py +54 -48
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_dataset.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_primekg.py +17 -4
- aiagents4pharma/talk2knowledgegraphs/tests/test_datasets_starkqa_primekg.py +33 -24
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_graphrag_reasoning.py +116 -69
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_milvus_multimodal_subgraph_extraction.py +736 -413
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_multimodal_subgraph_extraction.py +22 -15
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_extraction.py +19 -12
- aiagents4pharma/talk2knowledgegraphs/tests/test_tools_subgraph_summarization.py +95 -48
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_embeddings.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_huggingface.py +5 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_nim_molmim.py +13 -18
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_embeddings_ollama.py +10 -3
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_enrichments.py +4 -3
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ollama.py +3 -2
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_ols.py +1 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_pubchem.py +9 -4
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_reactome.py +6 -6
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_enrichments_uniprot.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_extractions_milvus_multimodal_pcst.py +442 -42
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_kg_utils.py +3 -4
- aiagents4pharma/talk2knowledgegraphs/tests/test_utils_pubchem_utils.py +10 -6
- aiagents4pharma/talk2knowledgegraphs/tools/__init__.py +10 -7
- aiagents4pharma/talk2knowledgegraphs/tools/graphrag_reasoning.py +15 -20
- aiagents4pharma/talk2knowledgegraphs/tools/milvus_multimodal_subgraph_extraction.py +245 -205
- aiagents4pharma/talk2knowledgegraphs/tools/multimodal_subgraph_extraction.py +92 -90
- aiagents4pharma/talk2knowledgegraphs/tools/subgraph_extraction.py +25 -37
- aiagents4pharma/talk2knowledgegraphs/tools/subgraph_summarization.py +10 -13
- aiagents4pharma/talk2knowledgegraphs/utils/__init__.py +4 -7
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py +4 -7
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py +4 -0
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py +11 -14
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/nim_molmim.py +7 -7
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/ollama.py +12 -6
- aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py +8 -6
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/__init__.py +9 -6
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/enrichments.py +1 -0
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ollama.py +15 -9
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/ols_terms.py +23 -20
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/pubchem_strings.py +12 -10
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/reactome_pathways.py +16 -10
- aiagents4pharma/talk2knowledgegraphs/utils/enrichments/uniprot_proteins.py +26 -18
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/__init__.py +4 -5
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/milvus_multimodal_pcst.py +218 -81
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/multimodal_pcst.py +53 -47
- aiagents4pharma/talk2knowledgegraphs/utils/extractions/pcst.py +18 -14
- aiagents4pharma/talk2knowledgegraphs/utils/kg_utils.py +22 -23
- aiagents4pharma/talk2knowledgegraphs/utils/pubchem_utils.py +11 -10
- aiagents4pharma/talk2scholars/.dockerignore +13 -0
- aiagents4pharma/talk2scholars/Dockerfile +104 -0
- aiagents4pharma/talk2scholars/README.md +1 -0
- aiagents4pharma/talk2scholars/agents/__init__.py +1 -5
- aiagents4pharma/talk2scholars/agents/main_agent.py +6 -4
- aiagents4pharma/talk2scholars/agents/paper_download_agent.py +5 -4
- aiagents4pharma/talk2scholars/agents/pdf_agent.py +4 -2
- aiagents4pharma/talk2scholars/agents/s2_agent.py +2 -2
- aiagents4pharma/talk2scholars/agents/zotero_agent.py +10 -11
- aiagents4pharma/talk2scholars/configs/__init__.py +1 -3
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/__init__.py +1 -4
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/main_agent/default.yaml +1 -1
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/pdf_agent/default.yaml +1 -1
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/s2_agent/default.yaml +8 -8
- aiagents4pharma/talk2scholars/configs/agents/talk2scholars/zotero_agent/default.yaml +7 -7
- aiagents4pharma/talk2scholars/configs/tools/__init__.py +8 -6
- aiagents4pharma/talk2scholars/docker-compose/cpu/.env.example +21 -0
- aiagents4pharma/talk2scholars/docker-compose/cpu/docker-compose.yml +90 -0
- aiagents4pharma/talk2scholars/docker-compose/gpu/.env.example +21 -0
- aiagents4pharma/talk2scholars/docker-compose/gpu/docker-compose.yml +105 -0
- aiagents4pharma/talk2scholars/install.md +122 -0
- aiagents4pharma/talk2scholars/state/state_talk2scholars.py +8 -8
- aiagents4pharma/talk2scholars/tests/{test_main_agent.py → test_agents_main_agent.py} +41 -23
- aiagents4pharma/talk2scholars/tests/{test_paper_download_agent.py → test_agents_paper_agents_download_agent.py} +10 -16
- aiagents4pharma/talk2scholars/tests/{test_pdf_agent.py → test_agents_pdf_agent.py} +6 -10
- aiagents4pharma/talk2scholars/tests/{test_s2_agent.py → test_agents_s2_agent.py} +8 -16
- aiagents4pharma/talk2scholars/tests/{test_zotero_agent.py → test_agents_zotero_agent.py} +5 -7
- aiagents4pharma/talk2scholars/tests/{test_s2_display_dataframe.py → test_s2_tools_display_dataframe.py} +6 -7
- aiagents4pharma/talk2scholars/tests/{test_s2_query_dataframe.py → test_s2_tools_query_dataframe.py} +5 -15
- aiagents4pharma/talk2scholars/tests/{test_paper_downloader.py → test_tools_paper_downloader.py} +25 -63
- aiagents4pharma/talk2scholars/tests/{test_question_and_answer_tool.py → test_tools_question_and_answer_tool.py} +2 -6
- aiagents4pharma/talk2scholars/tests/{test_s2_multi.py → test_tools_s2_multi.py} +5 -5
- aiagents4pharma/talk2scholars/tests/{test_s2_retrieve.py → test_tools_s2_retrieve.py} +2 -1
- aiagents4pharma/talk2scholars/tests/{test_s2_search.py → test_tools_s2_search.py} +5 -5
- aiagents4pharma/talk2scholars/tests/{test_s2_single.py → test_tools_s2_single.py} +5 -5
- aiagents4pharma/talk2scholars/tests/{test_arxiv_downloader.py → test_utils_arxiv_downloader.py} +16 -25
- aiagents4pharma/talk2scholars/tests/{test_base_paper_downloader.py → test_utils_base_paper_downloader.py} +25 -47
- aiagents4pharma/talk2scholars/tests/{test_biorxiv_downloader.py → test_utils_biorxiv_downloader.py} +14 -42
- aiagents4pharma/talk2scholars/tests/{test_medrxiv_downloader.py → test_utils_medrxiv_downloader.py} +15 -49
- aiagents4pharma/talk2scholars/tests/{test_nvidia_nim_reranker.py → test_utils_nvidia_nim_reranker.py} +6 -16
- aiagents4pharma/talk2scholars/tests/{test_pdf_answer_formatter.py → test_utils_pdf_answer_formatter.py} +1 -0
- aiagents4pharma/talk2scholars/tests/{test_pdf_batch_processor.py → test_utils_pdf_batch_processor.py} +6 -15
- aiagents4pharma/talk2scholars/tests/{test_pdf_collection_manager.py → test_utils_pdf_collection_manager.py} +34 -11
- aiagents4pharma/talk2scholars/tests/{test_pdf_document_processor.py → test_utils_pdf_document_processor.py} +2 -3
- aiagents4pharma/talk2scholars/tests/{test_pdf_generate_answer.py → test_utils_pdf_generate_answer.py} +3 -6
- aiagents4pharma/talk2scholars/tests/{test_pdf_gpu_detection.py → test_utils_pdf_gpu_detection.py} +5 -16
- aiagents4pharma/talk2scholars/tests/{test_pdf_rag_pipeline.py → test_utils_pdf_rag_pipeline.py} +7 -17
- aiagents4pharma/talk2scholars/tests/{test_pdf_retrieve_chunks.py → test_utils_pdf_retrieve_chunks.py} +4 -11
- aiagents4pharma/talk2scholars/tests/{test_pdf_singleton_manager.py → test_utils_pdf_singleton_manager.py} +26 -23
- aiagents4pharma/talk2scholars/tests/{test_pdf_vector_normalization.py → test_utils_pdf_vector_normalization.py} +1 -1
- aiagents4pharma/talk2scholars/tests/{test_pdf_vector_store.py → test_utils_pdf_vector_store.py} +27 -55
- aiagents4pharma/talk2scholars/tests/{test_pubmed_downloader.py → test_utils_pubmed_downloader.py} +31 -91
- aiagents4pharma/talk2scholars/tests/{test_read_helper_utils.py → test_utils_read_helper_utils.py} +2 -6
- aiagents4pharma/talk2scholars/tests/{test_s2_utils_ext_ids.py → test_utils_s2_utils_ext_ids.py} +5 -15
- aiagents4pharma/talk2scholars/tests/{test_zotero_human_in_the_loop.py → test_utils_zotero_human_in_the_loop.py} +6 -13
- aiagents4pharma/talk2scholars/tests/{test_zotero_path.py → test_utils_zotero_path.py} +53 -45
- aiagents4pharma/talk2scholars/tests/{test_zotero_read.py → test_utils_zotero_read.py} +30 -91
- aiagents4pharma/talk2scholars/tests/{test_zotero_write.py → test_utils_zotero_write.py} +6 -16
- aiagents4pharma/talk2scholars/tools/__init__.py +1 -4
- aiagents4pharma/talk2scholars/tools/paper_download/paper_downloader.py +20 -35
- aiagents4pharma/talk2scholars/tools/paper_download/utils/__init__.py +7 -5
- aiagents4pharma/talk2scholars/tools/paper_download/utils/arxiv_downloader.py +9 -11
- aiagents4pharma/talk2scholars/tools/paper_download/utils/base_paper_downloader.py +14 -21
- aiagents4pharma/talk2scholars/tools/paper_download/utils/biorxiv_downloader.py +14 -22
- aiagents4pharma/talk2scholars/tools/paper_download/utils/medrxiv_downloader.py +11 -13
- aiagents4pharma/talk2scholars/tools/paper_download/utils/pubmed_downloader.py +14 -28
- aiagents4pharma/talk2scholars/tools/pdf/question_and_answer.py +4 -8
- aiagents4pharma/talk2scholars/tools/pdf/utils/__init__.py +16 -14
- aiagents4pharma/talk2scholars/tools/pdf/utils/answer_formatter.py +4 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/batch_processor.py +15 -17
- aiagents4pharma/talk2scholars/tools/pdf/utils/collection_manager.py +2 -2
- aiagents4pharma/talk2scholars/tools/pdf/utils/document_processor.py +5 -5
- aiagents4pharma/talk2scholars/tools/pdf/utils/generate_answer.py +4 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/get_vectorstore.py +2 -6
- aiagents4pharma/talk2scholars/tools/pdf/utils/gpu_detection.py +5 -9
- aiagents4pharma/talk2scholars/tools/pdf/utils/nvidia_nim_reranker.py +4 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/paper_loader.py +2 -2
- aiagents4pharma/talk2scholars/tools/pdf/utils/rag_pipeline.py +6 -15
- aiagents4pharma/talk2scholars/tools/pdf/utils/retrieve_chunks.py +7 -15
- aiagents4pharma/talk2scholars/tools/pdf/utils/singleton_manager.py +2 -2
- aiagents4pharma/talk2scholars/tools/pdf/utils/tool_helper.py +3 -4
- aiagents4pharma/talk2scholars/tools/pdf/utils/vector_normalization.py +8 -17
- aiagents4pharma/talk2scholars/tools/pdf/utils/vector_store.py +17 -33
- aiagents4pharma/talk2scholars/tools/s2/__init__.py +8 -6
- aiagents4pharma/talk2scholars/tools/s2/display_dataframe.py +3 -7
- aiagents4pharma/talk2scholars/tools/s2/multi_paper_rec.py +7 -6
- aiagents4pharma/talk2scholars/tools/s2/query_dataframe.py +5 -12
- aiagents4pharma/talk2scholars/tools/s2/retrieve_semantic_scholar_paper_id.py +2 -4
- aiagents4pharma/talk2scholars/tools/s2/search.py +6 -6
- aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py +5 -3
- aiagents4pharma/talk2scholars/tools/s2/utils/__init__.py +1 -3
- aiagents4pharma/talk2scholars/tools/s2/utils/multi_helper.py +12 -18
- aiagents4pharma/talk2scholars/tools/s2/utils/search_helper.py +11 -18
- aiagents4pharma/talk2scholars/tools/s2/utils/single_helper.py +11 -16
- aiagents4pharma/talk2scholars/tools/zotero/__init__.py +1 -4
- aiagents4pharma/talk2scholars/tools/zotero/utils/__init__.py +1 -4
- aiagents4pharma/talk2scholars/tools/zotero/utils/read_helper.py +21 -39
- aiagents4pharma/talk2scholars/tools/zotero/utils/review_helper.py +2 -6
- aiagents4pharma/talk2scholars/tools/zotero/utils/write_helper.py +8 -11
- aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_path.py +4 -12
- aiagents4pharma/talk2scholars/tools/zotero/utils/zotero_pdf_downloader.py +13 -27
- aiagents4pharma/talk2scholars/tools/zotero/zotero_read.py +4 -7
- aiagents4pharma/talk2scholars/tools/zotero/zotero_review.py +8 -10
- aiagents4pharma/talk2scholars/tools/zotero/zotero_write.py +3 -2
- {aiagents4pharma-1.43.0.dist-info → aiagents4pharma-1.45.0.dist-info}/METADATA +115 -50
- aiagents4pharma-1.45.0.dist-info/RECORD +324 -0
- {aiagents4pharma-1.43.0.dist-info → aiagents4pharma-1.45.0.dist-info}/WHEEL +1 -2
- aiagents4pharma-1.43.0.dist-info/RECORD +0 -293
- aiagents4pharma-1.43.0.dist-info/top_level.txt +0 -1
- /aiagents4pharma/talk2scholars/tests/{test_state.py → test_states_state.py} +0 -0
- /aiagents4pharma/talk2scholars/tests/{test_pdf_paper_loader.py → test_utils_pdf_paper_loader.py} +0 -0
- /aiagents4pharma/talk2scholars/tests/{test_tool_helper_utils.py → test_utils_tool_helper_utils.py} +0 -0
- /aiagents4pharma/talk2scholars/tests/{test_zotero_pdf_downloader_utils.py → test_utils_zotero_pdf_downloader_utils.py} +0 -0
- {aiagents4pharma-1.43.0.dist-info → aiagents4pharma-1.45.0.dist-info}/licenses/LICENSE +0 -0
@@ -5,15 +5,16 @@ Utility for zotero write tool.
|
|
5
5
|
"""
|
6
6
|
|
7
7
|
import logging
|
8
|
-
from typing import Any
|
8
|
+
from typing import Any
|
9
|
+
|
9
10
|
import hydra
|
10
11
|
from pyzotero import zotero
|
12
|
+
|
11
13
|
from .zotero_path import (
|
12
|
-
find_or_create_collection,
|
13
14
|
fetch_papers_for_save,
|
15
|
+
find_or_create_collection,
|
14
16
|
)
|
15
17
|
|
16
|
-
|
17
18
|
# Configure logging
|
18
19
|
logging.basicConfig(level=logging.INFO)
|
19
20
|
logger = logging.getLogger(__name__)
|
@@ -41,9 +42,7 @@ class ZoteroWriteData:
|
|
41
42
|
def _load_config(self) -> Any:
|
42
43
|
"""Load hydra configuration."""
|
43
44
|
with hydra.initialize(version_base=None, config_path="../../../configs"):
|
44
|
-
cfg = hydra.compose(
|
45
|
-
config_name="config", overrides=["tools/zotero_write=default"]
|
46
|
-
)
|
45
|
+
cfg = hydra.compose(config_name="config", overrides=["tools/zotero_write=default"])
|
47
46
|
logger.info("Loaded configuration for Zotero write tool")
|
48
47
|
return cfg.tools.zotero_write
|
49
48
|
|
@@ -107,9 +106,7 @@ class ZoteroWriteData:
|
|
107
106
|
if " " in name
|
108
107
|
else {"creatorType": "author", "lastName": name}
|
109
108
|
)
|
110
|
-
for name in [
|
111
|
-
author.split(" (ID: ")[0] for author in paper.get("Authors", [])
|
112
|
-
]
|
109
|
+
for name in [author.split(" (ID: ")[0] for author in paper.get("Authors", [])]
|
113
110
|
]
|
114
111
|
|
115
112
|
self.zotero_items.append(
|
@@ -152,13 +149,13 @@ class ZoteroWriteData:
|
|
152
149
|
top_papers = list(self.fetched_papers.values())[:2]
|
153
150
|
top_papers_info = "\n".join(
|
154
151
|
[
|
155
|
-
f"{i+1}. {paper.get('Title', 'N/A')} ({paper.get('URL', 'N/A')})"
|
152
|
+
f"{i + 1}. {paper.get('Title', 'N/A')} ({paper.get('URL', 'N/A')})"
|
156
153
|
for i, paper in enumerate(top_papers)
|
157
154
|
]
|
158
155
|
)
|
159
156
|
self.content += "Here are a few of these articles:\n" + top_papers_info
|
160
157
|
|
161
|
-
def process_write(self) ->
|
158
|
+
def process_write(self) -> dict[str, Any]:
|
162
159
|
"""Process the write operation and return results."""
|
163
160
|
self._validate_papers()
|
164
161
|
matched_collection_key = self._find_collection()
|
@@ -29,9 +29,7 @@ def get_item_collections(zot):
|
|
29
29
|
|
30
30
|
# Create mappings: collection key → name and collection key → parent key
|
31
31
|
collection_map = {col["key"]: col["data"]["name"] for col in collections}
|
32
|
-
parent_map = {
|
33
|
-
col["key"]: col["data"].get("parentCollection") for col in collections
|
34
|
-
}
|
32
|
+
parent_map = {col["key"]: col["data"].get("parentCollection") for col in collections}
|
35
33
|
|
36
34
|
# Build full paths for collections
|
37
35
|
def build_collection_path(col_key):
|
@@ -49,9 +47,7 @@ def get_item_collections(zot):
|
|
49
47
|
|
50
48
|
for collection in collections:
|
51
49
|
collection_key = collection["key"]
|
52
|
-
collection_items = zot.collection_items(
|
53
|
-
collection_key
|
54
|
-
) # Fetch items in the collection
|
50
|
+
collection_items = zot.collection_items(collection_key) # Fetch items in the collection
|
55
51
|
|
56
52
|
for item in collection_items:
|
57
53
|
item_key = item["data"]["key"]
|
@@ -67,9 +63,7 @@ def get_item_collections(zot):
|
|
67
63
|
|
68
64
|
def find_or_create_collection(zot, path, create_missing=False):
|
69
65
|
"""find collection or create if missing"""
|
70
|
-
logger.info(
|
71
|
-
"Finding collection for path: %s (create_missing=%s)", path, create_missing
|
72
|
-
)
|
66
|
+
logger.info("Finding collection for path: %s (create_missing=%s)", path, create_missing)
|
73
67
|
# Normalize path: remove leading/trailing slashes and convert to lowercase
|
74
68
|
normalized = path.strip("/").lower()
|
75
69
|
path_parts = normalized.split("/") if normalized else []
|
@@ -136,9 +130,7 @@ def get_all_collection_paths(zot):
|
|
136
130
|
|
137
131
|
# Create mappings: collection key → name and collection key → parent key
|
138
132
|
collection_map = {col["key"]: col["data"]["name"] for col in collections}
|
139
|
-
parent_map = {
|
140
|
-
col["key"]: col["data"].get("parentCollection") for col in collections
|
141
|
-
}
|
133
|
+
parent_map = {col["key"]: col["data"].get("parentCollection") for col in collections}
|
142
134
|
|
143
135
|
# Build full paths for collections
|
144
136
|
def build_collection_path(col_key):
|
@@ -3,10 +3,10 @@
|
|
3
3
|
Utility functions for downloading PDFs from Zotero.
|
4
4
|
"""
|
5
5
|
|
6
|
+
import concurrent.futures
|
6
7
|
import logging
|
7
8
|
import tempfile
|
8
|
-
|
9
|
-
import concurrent.futures
|
9
|
+
|
10
10
|
import requests
|
11
11
|
|
12
12
|
logger = logging.getLogger(__name__)
|
@@ -18,7 +18,7 @@ def download_zotero_pdf(
|
|
18
18
|
api_key: str,
|
19
19
|
attachment_key: str,
|
20
20
|
**kwargs,
|
21
|
-
) ->
|
21
|
+
) -> tuple[str, str] | None:
|
22
22
|
"""
|
23
23
|
Download a PDF from Zotero by attachment key.
|
24
24
|
|
@@ -40,18 +40,12 @@ def download_zotero_pdf(
|
|
40
40
|
# Log configured parameters for verification
|
41
41
|
logger.info("download_zotero_pdf params -> timeout=%s, chunk_size=%s", timeout, chunk_size)
|
42
42
|
# Log download start
|
43
|
-
logger.info(
|
44
|
-
|
45
|
-
)
|
46
|
-
zotero_pdf_url = (
|
47
|
-
f"https://api.zotero.org/users/{user_id}/items/" f"{attachment_key}/file"
|
48
|
-
)
|
43
|
+
logger.info("Downloading Zotero PDF for attachment %s from Zotero API", attachment_key)
|
44
|
+
zotero_pdf_url = f"https://api.zotero.org/users/{user_id}/items/{attachment_key}/file"
|
49
45
|
headers = {"Zotero-API-Key": api_key}
|
50
46
|
|
51
47
|
try:
|
52
|
-
response = session.get(
|
53
|
-
zotero_pdf_url, headers=headers, stream=True, timeout=timeout
|
54
|
-
)
|
48
|
+
response = session.get(zotero_pdf_url, headers=headers, stream=True, timeout=timeout)
|
55
49
|
response.raise_for_status()
|
56
50
|
|
57
51
|
# Download to a temporary file first
|
@@ -65,9 +59,7 @@ def download_zotero_pdf(
|
|
65
59
|
# Determine filename from Content-Disposition header or default
|
66
60
|
if "filename=" in response.headers.get("Content-Disposition", ""):
|
67
61
|
filename = (
|
68
|
-
response.headers.get("Content-Disposition", "")
|
69
|
-
.split("filename=")[-1]
|
70
|
-
.strip('"')
|
62
|
+
response.headers.get("Content-Disposition", "").split("filename=")[-1].strip('"')
|
71
63
|
)
|
72
64
|
else:
|
73
65
|
filename = "downloaded.pdf"
|
@@ -75,9 +67,7 @@ def download_zotero_pdf(
|
|
75
67
|
return temp_file_path, filename
|
76
68
|
|
77
69
|
except (requests.exceptions.RequestException, OSError) as e:
|
78
|
-
logger.error(
|
79
|
-
"Failed to download Zotero PDF for attachment %s: %s", attachment_key, e
|
80
|
-
)
|
70
|
+
logger.error("Failed to download Zotero PDF for attachment %s: %s", attachment_key, e)
|
81
71
|
return None
|
82
72
|
|
83
73
|
|
@@ -85,9 +75,9 @@ def download_pdfs_in_parallel(
|
|
85
75
|
session: requests.Session,
|
86
76
|
user_id: str,
|
87
77
|
api_key: str,
|
88
|
-
attachment_item_map:
|
78
|
+
attachment_item_map: dict[str, str],
|
89
79
|
**kwargs,
|
90
|
-
) ->
|
80
|
+
) -> dict[str, tuple[str, str, str]]:
|
91
81
|
"""
|
92
82
|
Download multiple PDFs in parallel using ThreadPoolExecutor.
|
93
83
|
|
@@ -108,20 +98,16 @@ def download_pdfs_in_parallel(
|
|
108
98
|
chunk_size = kwargs.get("chunk_size")
|
109
99
|
# Log configured parameters for verification
|
110
100
|
logger.info(
|
111
|
-
"download_pdfs_in_parallel params -> max_workers=%s, chunk_size=%s",
|
101
|
+
"download_pdfs_in_parallel params -> max_workers=%s, chunk_size=%s",
|
112
102
|
max_workers,
|
113
103
|
chunk_size,
|
114
104
|
)
|
115
|
-
results:
|
105
|
+
results: dict[str, tuple[str, str, str]] = {}
|
116
106
|
if not attachment_item_map:
|
117
107
|
return results
|
118
108
|
|
119
109
|
with concurrent.futures.ThreadPoolExecutor(
|
120
|
-
max_workers=(
|
121
|
-
max_workers
|
122
|
-
if max_workers is not None
|
123
|
-
else min(10, len(attachment_item_map))
|
124
|
-
)
|
110
|
+
max_workers=(max_workers if max_workers is not None else min(10, len(attachment_item_map)))
|
125
111
|
) as executor:
|
126
112
|
future_to_keys = {
|
127
113
|
executor.submit(
|
@@ -10,13 +10,14 @@ for each found item and makes the results available as an artifact.
|
|
10
10
|
|
11
11
|
import logging
|
12
12
|
from typing import Annotated, Any
|
13
|
+
|
13
14
|
from langchain_core.messages import ToolMessage
|
14
15
|
from langchain_core.tools import tool
|
15
16
|
from langchain_core.tools.base import InjectedToolCallId
|
16
17
|
from langgraph.types import Command
|
17
18
|
from pydantic import BaseModel, Field
|
18
|
-
from .utils.read_helper import ZoteroSearchData
|
19
19
|
|
20
|
+
from .utils.read_helper import ZoteroSearchData
|
20
21
|
|
21
22
|
# Configure logging
|
22
23
|
logging.basicConfig(level=logging.INFO)
|
@@ -34,16 +35,12 @@ class ZoteroSearchInput(BaseModel):
|
|
34
35
|
tool_call_id (str): Internal identifier for this tool invocation.
|
35
36
|
"""
|
36
37
|
|
37
|
-
query: str = Field(
|
38
|
-
description="Search query string to find papers in Zotero library."
|
39
|
-
)
|
38
|
+
query: str = Field(description="Search query string to find papers in Zotero library.")
|
40
39
|
only_articles: bool = Field(
|
41
40
|
default=True,
|
42
41
|
description="Whether to only search for journal articles/conference papers.",
|
43
42
|
)
|
44
|
-
limit: int = Field(
|
45
|
-
default=2, description="Maximum number of results to return", ge=1, le=100
|
46
|
-
)
|
43
|
+
limit: int = Field(default=2, description="Maximum number of results to return", ge=1, le=100)
|
47
44
|
download_pdfs: bool = Field(
|
48
45
|
default=False,
|
49
46
|
description="Whether to download PDF attachments immediately (default True).",
|
@@ -5,15 +5,17 @@ This tool implements human-in-the-loop review for Zotero write operations.
|
|
5
5
|
"""
|
6
6
|
|
7
7
|
import logging
|
8
|
-
from typing import Annotated, Any,
|
8
|
+
from typing import Annotated, Any, Literal
|
9
|
+
|
10
|
+
from langchain_core.messages import HumanMessage, ToolMessage
|
9
11
|
from langchain_core.tools import tool
|
10
|
-
from langchain_core.messages import ToolMessage, HumanMessage
|
11
12
|
from langchain_core.tools.base import InjectedToolCallId
|
12
13
|
from langgraph.prebuilt import InjectedState
|
13
14
|
from langgraph.types import Command, interrupt
|
14
15
|
from pydantic import BaseModel, Field
|
15
|
-
|
16
|
+
|
16
17
|
from .utils.review_helper import ReviewData
|
18
|
+
from .utils.zotero_path import fetch_papers_for_save
|
17
19
|
|
18
20
|
# Configure logging
|
19
21
|
logging.basicConfig(level=logging.INFO)
|
@@ -28,7 +30,7 @@ class ZoteroReviewDecision(BaseModel):
|
|
28
30
|
"""
|
29
31
|
|
30
32
|
decision: Literal["approve", "reject", "custom"]
|
31
|
-
custom_path:
|
33
|
+
custom_path: str | None = None
|
32
34
|
|
33
35
|
|
34
36
|
class ZoteroReviewInput(BaseModel):
|
@@ -83,9 +85,7 @@ def zotero_review(
|
|
83
85
|
raise ValueError("LLM model is not available in the state.")
|
84
86
|
structured_llm = llm_model.with_structured_output(ZoteroReviewDecision)
|
85
87
|
# Convert the raw human response to a message for structured parsing
|
86
|
-
decision_response = structured_llm.invoke(
|
87
|
-
[HumanMessage(content=str(human_review))]
|
88
|
-
)
|
88
|
+
decision_response = structured_llm.invoke([HumanMessage(content=str(human_review))])
|
89
89
|
|
90
90
|
# Process the structured response
|
91
91
|
if decision_response.decision == "approve":
|
@@ -105,9 +105,7 @@ def zotero_review(
|
|
105
105
|
}
|
106
106
|
)
|
107
107
|
if decision_response.decision == "custom" and decision_response.custom_path:
|
108
|
-
logger.info(
|
109
|
-
"User approved with custom path: %s", decision_response.custom_path
|
110
|
-
)
|
108
|
+
logger.info("User approved with custom path: %s", decision_response.custom_path)
|
111
109
|
return Command(
|
112
110
|
update={
|
113
111
|
"messages": [
|
@@ -6,14 +6,15 @@ This tool is used to save fetched papers to Zotero library after human approval.
|
|
6
6
|
|
7
7
|
import logging
|
8
8
|
from typing import Annotated, Any
|
9
|
+
|
9
10
|
from langchain_core.messages import ToolMessage
|
10
11
|
from langchain_core.tools import tool
|
11
12
|
from langchain_core.tools.base import InjectedToolCallId
|
12
|
-
from langgraph.types import Command
|
13
13
|
from langgraph.prebuilt import InjectedState
|
14
|
+
from langgraph.types import Command
|
14
15
|
from pydantic import BaseModel, Field
|
15
|
-
from .utils.write_helper import ZoteroWriteData
|
16
16
|
|
17
|
+
from .utils.write_helper import ZoteroWriteData
|
17
18
|
|
18
19
|
# Configure logging
|
19
20
|
logging.basicConfig(level=logging.INFO)
|
@@ -1,71 +1,92 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: aiagents4pharma
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.45.0
|
4
4
|
Summary: AI Agents for drug discovery, drug development, and other pharmaceutical R&D.
|
5
|
-
|
5
|
+
License-File: LICENSE
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
7
7
|
Classifier: Operating System :: OS Independent
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
8
9
|
Requires-Python: >=3.12
|
9
|
-
|
10
|
-
|
11
|
-
Requires-Dist:
|
10
|
+
Requires-Dist: anndata==0.11.3
|
11
|
+
Requires-Dist: beautifulsoup4==4.13.4
|
12
|
+
Requires-Dist: cell2sentence==1.1.0
|
13
|
+
Requires-Dist: cloudscraper==1.2.71
|
14
|
+
Requires-Dist: copasi-basico==0.84
|
12
15
|
Requires-Dist: coverage==7.6.4
|
16
|
+
Requires-Dist: datasets==4.0.0
|
13
17
|
Requires-Dist: einops==0.8.0
|
14
18
|
Requires-Dist: gdown==5.2.0
|
15
19
|
Requires-Dist: gravis==0.1.0
|
16
|
-
Requires-Dist:
|
20
|
+
Requires-Dist: gseapy==1.1.8
|
21
|
+
Requires-Dist: h5py==3.13.0
|
22
|
+
Requires-Dist: huggingface-hub==0.34.4
|
17
23
|
Requires-Dist: hydra-core==1.3.2
|
24
|
+
Requires-Dist: igraph==0.11.8
|
25
|
+
Requires-Dist: ipykernel==6.29.5
|
26
|
+
Requires-Dist: ipython==8.32.0
|
18
27
|
Requires-Dist: joblib==1.4.2
|
19
|
-
Requires-Dist: langchain==0.3.7
|
20
28
|
Requires-Dist: langchain-community==0.3.5
|
21
29
|
Requires-Dist: langchain-core==0.3.40
|
22
30
|
Requires-Dist: langchain-experimental==0.3.3
|
23
31
|
Requires-Dist: langchain-milvus==0.2.0
|
24
32
|
Requires-Dist: langchain-nvidia-ai-endpoints==0.3.9
|
25
|
-
Requires-Dist: langchain-
|
26
|
-
Requires-Dist:
|
27
|
-
Requires-Dist:
|
33
|
+
Requires-Dist: langchain-ollama==0.2.3
|
34
|
+
Requires-Dist: langchain-openai==0.3.0
|
35
|
+
Requires-Dist: langchain==0.3.7
|
36
|
+
Requires-Dist: langgraph-supervisor==0.0.9
|
37
|
+
Requires-Dist: langgraph==0.3.34
|
28
38
|
Requires-Dist: matplotlib==3.9.2
|
29
|
-
Requires-Dist:
|
39
|
+
Requires-Dist: mkdocs-include-markdown-plugin==7.1.2
|
40
|
+
Requires-Dist: mkdocs-jupyter==0.25.1
|
41
|
+
Requires-Dist: mkdocs-material==9.5.47
|
42
|
+
Requires-Dist: mkdocs==1.6.1
|
43
|
+
Requires-Dist: mkdocstrings-python==1.12.2
|
44
|
+
Requires-Dist: mkdocstrings==0.27.0
|
45
|
+
Requires-Dist: nbformat==5.10.4
|
46
|
+
Requires-Dist: numpy==1.26.4
|
30
47
|
Requires-Dist: ollama==0.4.7
|
48
|
+
Requires-Dist: openai==1.59.6
|
49
|
+
Requires-Dist: openpyxl==3.1.5
|
31
50
|
Requires-Dist: pandas==2.2.3
|
32
|
-
Requires-Dist:
|
51
|
+
Requires-Dist: pcst-fast==1.0.10
|
52
|
+
Requires-Dist: plotly-express==0.4.1
|
33
53
|
Requires-Dist: plotly==5.24.1
|
34
54
|
Requires-Dist: pubchempy==1.0.4
|
35
|
-
Requires-Dist:
|
55
|
+
Requires-Dist: pyarrow==21.0.0
|
56
|
+
Requires-Dist: pydantic==2.10.5
|
57
|
+
Requires-Dist: pygeneconverter==0.3
|
36
58
|
Requires-Dist: pylint==3.3.1
|
37
|
-
Requires-Dist:
|
38
|
-
Requires-Dist:
|
59
|
+
Requires-Dist: pymilvus==2.5.11
|
60
|
+
Requires-Dist: pypdf2==3.0.1
|
61
|
+
Requires-Dist: pypdf==6.0.0
|
39
62
|
Requires-Dist: pytest-asyncio==0.25.2
|
63
|
+
Requires-Dist: pytest==8.3.3
|
64
|
+
Requires-Dist: python-magic==0.4.27
|
40
65
|
Requires-Dist: pyzotero==1.6.9
|
41
|
-
Requires-Dist:
|
42
|
-
Requires-Dist:
|
43
|
-
Requires-Dist: sentence_transformers==3.3.1
|
44
|
-
Requires-Dist: tabulate==0.9.0
|
45
|
-
Requires-Dist: torch==2.2.2
|
46
|
-
Requires-Dist: torch_geometric==2.6.1
|
47
|
-
Requires-Dist: transformers==4.48.0
|
48
|
-
Requires-Dist: mkdocs==1.6.1
|
49
|
-
Requires-Dist: mkdocs-jupyter==0.25.1
|
50
|
-
Requires-Dist: mkdocs-material==9.5.47
|
51
|
-
Requires-Dist: mkdocstrings-python==1.12.2
|
52
|
-
Requires-Dist: mkdocs-include-markdown-plugin==7.1.2
|
53
|
-
Requires-Dist: mkdocstrings==0.27.0
|
54
|
-
Requires-Dist: streamlit-feedback
|
55
|
-
Requires-Dist: anndata==0.11.3
|
56
|
-
Requires-Dist: h5py==3.13.0
|
57
|
-
Requires-Dist: igraph==0.11.8
|
58
|
-
Requires-Dist: ipykernel==6.29.5
|
59
|
-
Requires-Dist: ipython==8.32.0
|
60
|
-
Requires-Dist: nbformat==5.10.4
|
66
|
+
Requires-Dist: requests==2.32.4
|
67
|
+
Requires-Dist: scanpy==1.11.0
|
61
68
|
Requires-Dist: scipy==1.15.2
|
69
|
+
Requires-Dist: seaborn==0.13.2
|
70
|
+
Requires-Dist: sentence-transformers==3.3.1
|
71
|
+
Requires-Dist: setuptools==80.9.0
|
72
|
+
Requires-Dist: streamlit-feedback==0.1.4
|
73
|
+
Requires-Dist: streamlit==1.41.1
|
74
|
+
Requires-Dist: tabulate==0.9.0
|
75
|
+
Requires-Dist: torch-geometric==2.6.1
|
76
|
+
Requires-Dist: torch==2.8.0
|
62
77
|
Requires-Dist: tqdm==4.67.1
|
78
|
+
Requires-Dist: transformers==4.55.2
|
63
79
|
Requires-Dist: umap-learn==0.5.7
|
64
|
-
Requires-Dist:
|
65
|
-
|
66
|
-
Requires-Dist:
|
67
|
-
Requires-Dist:
|
68
|
-
|
80
|
+
Requires-Dist: xlsxwriter==3.2.5
|
81
|
+
Provides-Extra: dev
|
82
|
+
Requires-Dist: bandit==1.8.6; extra == 'dev'
|
83
|
+
Requires-Dist: mypy==1.17.1; extra == 'dev'
|
84
|
+
Requires-Dist: pip-audit==2.9.0; extra == 'dev'
|
85
|
+
Requires-Dist: pre-commit==4.3.0; extra == 'dev'
|
86
|
+
Requires-Dist: ruff==0.12.8; extra == 'dev'
|
87
|
+
Requires-Dist: safety==3.2.9; extra == 'dev'
|
88
|
+
Requires-Dist: twine==6.1.0; extra == 'dev'
|
89
|
+
Description-Content-Type: text/markdown
|
69
90
|
|
70
91
|
<img src="docs/assets/VPE.png" alt="Virtual Patient Engine Logo" width="150"/>
|
71
92
|
|
@@ -149,12 +170,16 @@ git clone https://github.com/VirtualPatientEngine/AIAgents4Pharma && cd AIAgents
|
|
149
170
|
|
150
171
|
2. **Install dependencies:**
|
151
172
|
|
152
|
-
We use
|
173
|
+
We use `uv` for fast and reliable dependency management. Install uv first following the [official installation guide](https://docs.astral.sh/uv/getting-started/installation/).
|
153
174
|
|
154
|
-
|
155
|
-
|
175
|
+
> **For developers**: See [docs/developer/README.md](docs/developer/README.md) for detailed setup instructions including system prerequisites.
|
176
|
+
|
177
|
+
```sh
|
178
|
+
uv sync --extra dev --frozen
|
156
179
|
```
|
157
180
|
|
181
|
+
> 💡 **Recommended**: Use `--frozen` flag to ensure exact reproducible builds using the pinned versions from `uv.lock`.
|
182
|
+
|
158
183
|
3. **Initialize API Keys**
|
159
184
|
|
160
185
|
```env
|
@@ -168,7 +193,21 @@ export LANGCHAIN_API_KEY=... # Optional for all agents
|
|
168
193
|
|
169
194
|
4. **Launch the app:**
|
170
195
|
|
196
|
+
**Option A: Using UV (recommended)**
|
197
|
+
|
171
198
|
```sh
|
199
|
+
uv run streamlit run app/frontend/streamlit_app_<agent>.py
|
200
|
+
```
|
201
|
+
|
202
|
+
**Option B: Traditional approach**
|
203
|
+
|
204
|
+
```sh
|
205
|
+
# Activate virtual environment
|
206
|
+
source .venv/bin/activate # Linux/macOS
|
207
|
+
# or
|
208
|
+
.venv\Scripts\activate # Windows
|
209
|
+
|
210
|
+
# Then run the app
|
172
211
|
streamlit run app/frontend/streamlit_app_<agent>.py
|
173
212
|
```
|
174
213
|
|
@@ -187,6 +226,8 @@ If your machine has NVIDIA GPU(s), please install the following this:
|
|
187
226
|
|
188
227
|
To use the **Agents**, you need a free **NVIDIA API key**. Create an account and apply for free credits [here](https://build.nvidia.com/explore/discover).
|
189
228
|
|
229
|
+
**Talk2Biomodels** supports integration with multiple LLMs: gpt-4o-mini (via OpenAI API) and open-source llama (3.1 and 3.3) models (via NVIDIA API). An **OpenAI API** key may be generated [here](https://platform.openai.com/settings/organization/api-keys). OpenAI may provide initial free credits for API calls with the API key, after which additional credits may be purchased [here](https://platform.openai.com/settings/organization/billing). More information on pricing is available [here](https://openai.com/api/pricing/).
|
230
|
+
|
190
231
|
**Talk2Scholars** and **Talk2KnowledgeGraphs** requires Milvus to be set up as the vector database — install Milvus depending on your setup by following the official instructions for [CPU](https://milvus.io/docs/install_standalone-docker-compose.md) or [GPU](https://milvus.io/docs/install_standalone-docker-compose-gpu.md). You will also need a **Zotero API key**, which you can generate [here](https://www.zotero.org/user/login#applications). _(The Zotero key is only required for Talk2Scholars; all other agents do not need it.)_
|
191
232
|
|
192
233
|
> By default, `talk2knowledgegraphs` includes a small subset of the PrimeKG knowledge graph, allowing users to start interacting with it out of the box.
|
@@ -214,9 +255,19 @@ Check out the tutorials on each agent for detailed instructions.
|
|
214
255
|
|
215
256
|
## Contributing
|
216
257
|
|
217
|
-
We welcome your support to make **AIAgents4Pharma** even better.
|
258
|
+
We welcome your support to make **AIAgents4Pharma** even better.
|
218
259
|
All types of contributions are appreciated — whether you're fixing bugs, adding features, improving documentation, or helping with testing, every contribution is valuable.
|
219
260
|
|
261
|
+
#### Development Setup
|
262
|
+
|
263
|
+
For contributors and developers, we have comprehensive documentation:
|
264
|
+
|
265
|
+
- **[Developer Setup Guide](docs/developer/README.md)** - Complete setup instructions with UV, security implementation, and tooling
|
266
|
+
- **[Testing & Linting Guide](docs/developer/TESTING_LINTING.md)** - How to run tests, coverage, and code quality checks
|
267
|
+
- **[SonarCloud Integration](docs/developer/SONARCLOUD_SETUP.md)** - Code quality analysis and CI/CD integration
|
268
|
+
- **[GitHub Workflows](docs/developer/WORKFLOWS.md)** - Understanding our CI/CD pipeline
|
269
|
+
- **[Streamlit Security](docs/developer/STREAMLIT_SECURITY.md)** - File upload security implementation
|
270
|
+
|
220
271
|
#### How to contribute
|
221
272
|
|
222
273
|
1. Star this repository to show your support.
|
@@ -227,19 +278,33 @@ All types of contributions are appreciated — whether you're fixing bugs, addin
|
|
227
278
|
git checkout -b feat/your-feature-name
|
228
279
|
```
|
229
280
|
|
230
|
-
4.
|
281
|
+
4. Set up your development environment:
|
231
282
|
|
232
283
|
```sh
|
233
|
-
|
284
|
+
uv sync --extra dev --frozen # Install development dependencies
|
285
|
+
uv run pre-commit install # Set up code quality hooks
|
286
|
+
```
|
287
|
+
|
288
|
+
5. Make your changes and run quality checks:
|
289
|
+
|
290
|
+
```sh
|
291
|
+
uv run ruff check --fix . # Lint and fix code
|
292
|
+
uv run ruff format . # Format code
|
293
|
+
uv run pre-commit run --all-files # Run all checks (linting, formatting, security)
|
294
|
+
|
295
|
+
# Run submodule-specific checks (pylint configuration in pyproject.toml)
|
296
|
+
uv run pylint aiagents4pharma/talk2scholars/
|
297
|
+
uv run coverage run --include="aiagents4pharma/talk2scholars/*" -m pytest --cache-clear aiagents4pharma/talk2scholars/tests/ && uv run coverage report
|
234
298
|
```
|
235
299
|
|
236
|
-
|
300
|
+
6. Commit and push your changes:
|
237
301
|
|
238
302
|
```sh
|
303
|
+
git commit -m "feat: add a brief description of your change"
|
239
304
|
git push origin feat/your-feature-name
|
240
305
|
```
|
241
306
|
|
242
|
-
|
307
|
+
7. Open a Pull Request.
|
243
308
|
|
244
309
|
#### Areas where you can help
|
245
310
|
|
@@ -253,9 +318,9 @@ git push origin feat/your-feature-name
|
|
253
318
|
- **Talk2KnowledgeGraphs**: [@awmulyadi](https://github.com/awmulyadi)
|
254
319
|
- **Talk2Scholars**: [@ansh-info](https://github.com/ansh-info), [@gurdeep330](https://github.com/gurdeep330)
|
255
320
|
|
256
|
-
Please refer to our [CONTRIBUTING.md](CONTRIBUTING.md) for
|
321
|
+
Please refer to our [CONTRIBUTING.md](CONTRIBUTING.md) and [developer documentation](docs/developer/) for detailed contribution guidelines and setup instructions.
|
257
322
|
|
258
323
|
## Feedback
|
259
324
|
|
260
|
-
If you have questions, bug reports, feature requests, comments, or suggestions, we would love to hear from you.
|
325
|
+
If you have questions, bug reports, feature requests, comments, or suggestions, we would love to hear from you.
|
261
326
|
Please open an `issue` or start a `discussion`
|