aiagents4pharma 1.7.0__py3-none-any.whl → 1.8.1__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.
@@ -3,3 +3,5 @@ This file is used to import the models and tools.
3
3
  '''
4
4
  from . import models
5
5
  from . import tools
6
+ from . import agents
7
+ from . import states
@@ -6,3 +6,4 @@ from . import simulate_model
6
6
  from . import ask_question
7
7
  from . import custom_plotter
8
8
  from . import get_modelinfo
9
+ from . import load_biomodel
@@ -6,11 +6,14 @@ Tool for plotting a custom figure.
6
6
 
7
7
  import logging
8
8
  from typing import Type, List, TypedDict, Annotated, Tuple, Union, Literal
9
+ from typing import Type, List, TypedDict, Annotated, Tuple, Union, Literal
9
10
  from pydantic import BaseModel, Field
10
11
  import pandas as pd
12
+ import pandas as pd
11
13
  from langchain_openai import ChatOpenAI
12
14
  from langchain_core.tools import BaseTool
13
15
  from langgraph.prebuilt import InjectedState
16
+ from langgraph.prebuilt import InjectedState
14
17
 
15
18
  # Initialize logger
16
19
  logging.basicConfig(level=logging.INFO)
@@ -22,18 +25,23 @@ class CustomPlotterInput(BaseModel):
22
25
  """
23
26
  question: str = Field(description="Description of the plot")
24
27
  state: Annotated[dict, InjectedState]
28
+ state: Annotated[dict, InjectedState]
25
29
 
30
+ # Note: It's important that every field has type hints.
31
+ # BaseTool is a Pydantic class and not having type hints
32
+ # can lead to unexpected behavior.
26
33
  # Note: It's important that every field has type hints.
27
34
  # BaseTool is a Pydantic class and not having type hints
28
35
  # can lead to unexpected behavior.
29
36
  class CustomPlotterTool(BaseTool):
30
37
  """
31
- Tool for plotting a custom plot.
38
+ Tool for making custom plots
32
39
  """
33
40
  name: str = "custom_plotter"
34
- description: str = "A tool to plot a custom figure."
41
+ description: str = "A tool to make custom plots of the simulation results"
35
42
  args_schema: Type[BaseModel] = CustomPlotterInput
36
43
  response_format: str = "content_and_artifact"
44
+ response_format: str = "content_and_artifact"
37
45
 
38
46
  def _run(self,
39
47
  question: str,
@@ -45,6 +53,8 @@ class CustomPlotterTool(BaseTool):
45
53
  Args:
46
54
  question (str): The question about the custom plot.
47
55
  state (dict): The state of the graph.
56
+ question (str): The question about the custom plot.
57
+ state (dict): The state of the graph.
48
58
 
49
59
  Returns:
50
60
  str: The answer to the question
@@ -66,7 +76,7 @@ class CustomPlotterTool(BaseTool):
66
76
  A list of species based on user question.
67
77
  """
68
78
  relevant_species: Union[None, List[Literal[*species_names]]] = Field(
69
- description="List of species based on user question.")
79
+ description="List of species based on user question. If no relevant species are found, it will be None.")
70
80
  # Create an instance of the LLM model
71
81
  llm = ChatOpenAI(model=state['llm_model'], temperature=0)
72
82
  llm_with_structured_output = llm.with_structured_output(CustomHeader)
@@ -26,4 +26,3 @@ def load_biomodel(sys_bio_model, sbml_file_path=None):
26
26
  elif sbml_file_path:
27
27
  model_object = BasicoModel(sbml_file_path=sbml_file_path)
28
28
  return model_object
29
- # return None
@@ -27,7 +27,7 @@ class SearchModelsTool(BaseTool):
27
27
  Tool for returning the search results based on the search query.
28
28
  """
29
29
  name: str = "search_models"
30
- description: str = "Search models based on search query."
30
+ description: str = "Search models in the BioMmodels database based on keywords."
31
31
  args_schema: Type[BaseModel] = SearchModelsInput
32
32
  return_direct: bool = True
33
33
 
@@ -99,7 +99,7 @@ class SimulateModelTool(BaseTool):
99
99
  Tool for simulating a model.
100
100
  """
101
101
  name: str = "simulate_model"
102
- description: str = "A tool to simulate a model."
102
+ description: str = "A tool to simulate a biomodel"
103
103
  args_schema: Type[BaseModel] = SimulateModelInput
104
104
 
105
105
  def _run(self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: aiagents4pharma
3
- Version: 1.7.0
3
+ Version: 1.8.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
@@ -1,15 +1,15 @@
1
1
  aiagents4pharma/__init__.py,sha256=ds5Ft1k2ww2m7N-yv5ZyymBw0LBuHVjwC9TuekQBL_c,151
2
- aiagents4pharma/talk2biomodels/__init__.py,sha256=MueXwbnuiQyiju7mW6NepFUiZJdodMzmUK3TkQT7iPk,99
2
+ aiagents4pharma/talk2biomodels/__init__.py,sha256=9MuyHb5KTf5ufeyq7fu5xoLEwVT688DFOWuKuzdWG9o,140
3
3
  aiagents4pharma/talk2biomodels/models/__init__.py,sha256=5fTHHm3PVloYPNKXbgNlcPgv3-u28ZquxGydFYDfhJA,122
4
4
  aiagents4pharma/talk2biomodels/models/basico_model.py,sha256=js7ORLwbJPaIsko5oRToMMCh4l8LsN292OIvFzTfvRg,4946
5
5
  aiagents4pharma/talk2biomodels/models/sys_bio_model.py,sha256=ylpPba2SA8kl68q3k1kJbiUdRYplPHykyslTQLDZ19I,1995
6
- aiagents4pharma/talk2biomodels/tools/__init__.py,sha256=tkNUpUtZOe3hwbKQgp97e4gJ3p2d38G8WFHNO9A83uM,209
6
+ aiagents4pharma/talk2biomodels/tools/__init__.py,sha256=8hAT6z1OO8N9HRylh6fwoqyjYlGdpkngkElBNqH40Zo,237
7
7
  aiagents4pharma/talk2biomodels/tools/ask_question.py,sha256=UEdT46DIFZHlAOF4cNX4_s7VjHvbbiGpNmEY2-XW2iA,2655
8
- aiagents4pharma/talk2biomodels/tools/custom_plotter.py,sha256=ESsdV_sz3wdynK9EbqZYhoY9r5zLto3NTZmUYvqS_TU,3282
8
+ aiagents4pharma/talk2biomodels/tools/custom_plotter.py,sha256=BfLSivWqtRVZDeqD7RP5sgZP6B9rET47IWdNrA3gmIE,3825
9
9
  aiagents4pharma/talk2biomodels/tools/get_modelinfo.py,sha256=czxjRa9jvjTow-POGU5wSV8_lwfknAezBnzCFA0gQ8E,5189
10
- aiagents4pharma/talk2biomodels/tools/load_biomodel.py,sha256=QQOBCrDoEEWdSVCIYyBXL2WLSgEs3yB_fDpwALnsl-U,707
11
- aiagents4pharma/talk2biomodels/tools/search_models.py,sha256=GzF313UgawtrA0fvYEh_AX2HKO9eMV77YH-R__Gw3iY,2630
12
- aiagents4pharma/talk2biomodels/tools/simulate_model.py,sha256=Ax9nuHyINMIlqETujfYxqnzUsgLE-TUFV0EY5Qr7rPk,6249
10
+ aiagents4pharma/talk2biomodels/tools/load_biomodel.py,sha256=pyVzLQoMnuJYEwsjeOlqcUrbU1F1Z-pNlgkhFaoKpy0,689
11
+ aiagents4pharma/talk2biomodels/tools/search_models.py,sha256=Iq2ddofOOfZYtAurCISq3bAq5rbwB3l_rL1lgEFyFCI,2653
12
+ aiagents4pharma/talk2biomodels/tools/simulate_model.py,sha256=hBRrSLVGcaT157FCe8ajVKJZ2fi9CJhGeniGLaZJ-KE,6251
13
13
  aiagents4pharma/talk2cells/__init__.py,sha256=zmOP5RAhabgKIQP-W4P4qKME2tG3fhAXM3MeO5_H8kE,120
14
14
  aiagents4pharma/talk2cells/agents/__init__.py,sha256=38nK2a_lEFRjO3qD6Fo9a3983ZCYat6hmJKWY61y2Mo,128
15
15
  aiagents4pharma/talk2cells/agents/scp_agent.py,sha256=gDMfhUNWHa_XWOqm1Ql6yLAdI_7bnIk5sRYn43H2sYk,3090
@@ -28,8 +28,8 @@ aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py,sha256=xRb0x7S
28
28
  aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py,sha256=1nGznrAj-xT0xuSMBGz2dOujJ7M_IwSR84njxtxsy9A,2523
29
29
  aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py,sha256=2vi_elf6EgzfagFAO5QnL3a_aXZyN7B1EBziu44MTfM,3806
30
30
  aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py,sha256=36iKlisOpMtGR5xfTAlSHXWvPqVC_Jbezod8kbBBMVg,2136
31
- aiagents4pharma-1.7.0.dist-info/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
32
- aiagents4pharma-1.7.0.dist-info/METADATA,sha256=Ppwb-9bU-tkQ18AjrX6xmySzOrmcXIIszAL6j-ZpfCw,7988
33
- aiagents4pharma-1.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
34
- aiagents4pharma-1.7.0.dist-info/top_level.txt,sha256=-AH8rMmrSnJtq7HaAObS78UU-cTCwvX660dSxeM7a0A,16
35
- aiagents4pharma-1.7.0.dist-info/RECORD,,
31
+ aiagents4pharma-1.8.1.dist-info/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
32
+ aiagents4pharma-1.8.1.dist-info/METADATA,sha256=IT0veyP78F4miSANCtd1knzOq5kjmmFn5g2KLhO3Su8,7988
33
+ aiagents4pharma-1.8.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
34
+ aiagents4pharma-1.8.1.dist-info/top_level.txt,sha256=-AH8rMmrSnJtq7HaAObS78UU-cTCwvX660dSxeM7a0A,16
35
+ aiagents4pharma-1.8.1.dist-info/RECORD,,