Custom plots
Tool for plotting a custom y-axis of a simulation plot.
CustomPlotterInput
Bases: BaseModel
Input schema for the custom plotter tool.
Source code in aiagents4pharma/talk2biomodels/tools/custom_plotter.py
72 73 74 75 76 77 78 79 80 |
|
CustomPlotterTool
Bases: BaseTool
Tool for custom plotting the y-axis of a plot.
Source code in aiagents4pharma/talk2biomodels/tools/custom_plotter.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
_run(question, sys_bio_model, simulation_name, state)
Run the tool.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
question
|
str
|
The question about the custom plot. |
required |
sys_bio_model
|
ModelData
|
The model data. |
required |
simulation_name
|
str
|
The name assigned to the simulation. |
required |
state
|
dict
|
The state of the graph. |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
Tuple[str, Union[None, List[str]]]
|
The answer to the question |
Source code in aiagents4pharma/talk2biomodels/tools/custom_plotter.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
extract_relevant_species(question, species_names, state)
Extract the relevant species from the user question.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
question
|
str
|
The user question. |
required |
species_names
|
list
|
The species names available in the simulation results. |
required |
state
|
dict
|
The state of the graph. |
required |
Returns:
Name | Type | Description |
---|---|---|
CustomHeader |
The relevant species |
Source code in aiagents4pharma/talk2biomodels/tools/custom_plotter.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
|