aiagents4pharma 1.25.1__py3-none-any.whl → 1.26.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.
@@ -22,10 +22,11 @@ def get_app(uniq_id, llm_model: BaseChatModel):
22
22
  '''
23
23
  This function returns the langraph app.
24
24
  '''
25
- if llm_model.model_name == 'gpt-4o-mini':
26
- llm_model = ChatOpenAI(model='gpt-4o-mini',
27
- temperature=0,
28
- model_kwargs={"parallel_tool_calls": False})
25
+ if hasattr(llm_model, 'model_name'):
26
+ if llm_model.model_name == 'gpt-4o-mini':
27
+ llm_model = ChatOpenAI(model='gpt-4o-mini',
28
+ temperature=0,
29
+ model_kwargs={"parallel_tool_calls": False})
29
30
  # Load hydra configuration
30
31
  logger.log(logging.INFO, "Launching AIAgents4Pharma_Agent with thread_id %s", uniq_id)
31
32
  with hydra.initialize(version_base=None, config_path="../configs"):
@@ -57,7 +58,7 @@ def get_app(uniq_id, llm_model: BaseChatModel):
57
58
  # Full history is needed to extract
58
59
  # the tool artifacts
59
60
  output_mode="full_history",
60
- add_handoff_back_messages=False,
61
+ add_handoff_back_messages=True,
61
62
  prompt=system_prompt
62
63
  )
63
64
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: aiagents4pharma
3
- Version: 1.25.1
3
+ Version: 1.26.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
@@ -67,6 +67,7 @@ Requires-Dist: scanpy==1.11.0
67
67
  [![Talk2Cells](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2cells.yml/badge.svg)](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2cells.yml)
68
68
  [![Talk2KnowledgeGraphs](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2knowledgegraphs.yml/badge.svg)](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2knowledgegraphs.yml)
69
69
  [![TESTS Talk2Scholars](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2scholars.yml/badge.svg)](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2scholars.yml)
70
+ [![TESTS Talk2AIAgents4Pharma](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2aiagents4pharma.yml/badge.svg)](https://github.com/VirtualPatientEngine/AIAgents4Pharma/actions/workflows/tests_talk2aiagents4pharma.yml)
70
71
  ![GitHub Release](https://img.shields.io/github/v/release/VirtualPatientEngine/AIAgents4Pharma)
71
72
  ![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FVirtualPatientEngine%2FAIAgents4Pharma%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)
72
73
  ![Docker Pulls](https://img.shields.io/docker/pulls/virtualpatientengine/talk2biomodels?link=https%3A%2F%2Fhub.docker.com%2Frepository%2Fdocker%2Fvirtualpatientengine%2Ftalk2biomodels%2Fgeneral)
@@ -97,23 +98,77 @@ Our toolkit currently consists of the following agents:
97
98
  pip install aiagents4pharma
98
99
  ```
99
100
 
100
- Check out the tutorials on each agent for detailed instrcutions.
101
+ Check out the tutorials on each agent for detailed instructions.
101
102
 
102
103
  #### Option 2: Docker Hub
103
104
 
104
- _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
105
+ _We now have `Talk2AIAgents4Pharma`, `Talk2Biomodels`, and `Talk2Scholars` available on Docker Hub._
105
106
 
106
- 1. **Pull the Docker images**
107
+ ##### **Run Talk2AIAgents4Pharma and Talk2KnowledgeGraphs**
107
108
 
108
- ```bash
109
- docker pull virtualpatientengine/talk2biomodels
110
- ```
109
+ Talk2AIAgents4Pharma and Talk2KnowledgeGraphs require Ollama for embedding models, so Docker Compose is used to run both containers in the same network.
111
110
 
112
- ```bash
113
- docker pull virtualpatientengine/talk2scholars
111
+ ###### **Setup Environment Variables**
112
+
113
+ 1. Choose the app you want to use:
114
+
115
+ ```sh
116
+ # Navigate to the correct directory before setting up environment variables.
117
+ # Use one of the following commands based on the agent you want to use:
118
+ cd AIAgents4Pharma/aiagents4pharma/talk2aiagents4pharma
119
+ cd AIAgents4Pharma/aiagents4pharma/talk2knowledgegraphs
120
+ ```
121
+
122
+ 2. Copy the `.env.example` file and rename it to `.env`:
123
+ ```sh
124
+ cp .env.example .env
114
125
  ```
126
+ 3. Open the `.env` file and add your API keys:
127
+
128
+ ```plaintext
129
+ OPENAI_API_KEY=your_openai_api_key
130
+ NVIDIA_API_KEY=your_nvidia_api_key
131
+ OLLAMA_HOST=http://ollama:11434
132
+ LANGCHAIN_TRACING_V2=true
133
+ LANGCHAIN_API_KEY=your_langchain_api_key_here
134
+ # Notes:
135
+ # - The API endpoint for Ollama is already set in env.example.
136
+ # - Both API keys (OPENAI_API_KEY and NVIDIA_API_KEY) are required for Talk2AIAgents4Pharma.
137
+ # - If using Talk2KnowledgeGraphs separately, only the OPENAI_API_KEY is needed.
138
+ # - Langsmith API for tracing is optional for both, set it in env.example if required.
139
+ ```
140
+
141
+ 4. Save the file.
142
+
143
+ To start the containers, run the following command:
144
+
145
+ ```sh
146
+ docker compose --profile cpu up # for CPU mode
147
+ docker compose --profile nvidia up # for GPU mode
148
+ docker compose --profile amd up # for AMD mode
149
+ ```
150
+
151
+ This will:
152
+
153
+ - Pull the latest images if they are not already available.
154
+ - Start both Talk2AIAgents4Pharma or Talk2KnowledgeGraphs and Ollama containers in the same network.
155
+ - Ensure Ollama is running first before launching Talk2AIAgents4Pharma or Talk2KnowledgeGraphs.
115
156
 
116
- 2. **Run the containers**
157
+ To Access the web app, open your browser and go to:
158
+
159
+ ```
160
+ http://localhost:8501
161
+ ```
162
+
163
+ To stop the containers, run:
164
+
165
+ ```sh
166
+ docker compose down
167
+ ```
168
+
169
+ ##### **Run Talk2Biomodels and Talk2Scholars**
170
+
171
+ 1. **Run the containers**
117
172
 
118
173
  ```bash
119
174
  docker run -d \
@@ -134,8 +189,8 @@ _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
134
189
  virtualpatientengine/talk2scholars
135
190
  ```
136
191
 
137
- 3. **Access the Web App**
138
- Open your browser and go to:
192
+ 2. **Access the Web App**
193
+ Open your browser and go to:
139
194
 
140
195
  ```
141
196
  http://localhost:8501
@@ -161,36 +216,43 @@ _Both `Talk2Biomodels` and `Talk2Scholars` are now available on Docker Hub._
161
216
  cd AIAgents4Pharma
162
217
  ```
163
218
  2. **Install dependencies:**
219
+
164
220
  ```bash
165
221
  pip install -r requirements.txt
166
222
  ```
167
- The current version of T2KG requires additional Ollama library to be installed.
223
+
224
+ ⚠️ The current version of T2KG requires additional Ollama library to be installed.
168
225
 
169
226
  Ollama can be easily downloaded and installed from the following link: [https://ollama.com/download](https://ollama.com/download)
170
227
 
171
228
  As an alternative, use the following commands to install the library using terminal and to pull necessary model:
172
229
 
173
230
  - Ubuntu:
174
- ```
175
- curl -fsSL https://ollama.com/install.sh | sh
176
- ollama pull nomic-embed-text
177
- ```
231
+ ```
232
+ curl -fsSL https://ollama.com/install.sh | sh
233
+ ollama pull nomic-embed-text
234
+ ```
178
235
  - Windows:
179
- ```
180
- curl -L https://ollama.com/download/ollama-windows-amd64.zip -o ollama-windows-amd64.zip
181
- tar -xzf .\ollama-windows-amd64.zip
182
- start ollama serve
183
- ollama pull nomic-embed-text
184
- ```
236
+ ```
237
+ curl -L https://ollama.com/download/ollama-windows-amd64.zip -o ollama-windows-amd64.zip
238
+ tar -xzf .\ollama-windows-amd64.zip
239
+ start ollama serve
240
+ ollama pull nomic-embed-text
241
+ ```
185
242
  - macOS:
186
- ```
187
- brew install ollama
188
- ollama pull nomic-embed-text
189
- ```
190
- A list of pulled Ollama models can be checked using the following command:
243
+ ```
244
+ brew install ollama
245
+ ollama pull nomic-embed-text
246
+ ```
247
+ A list of pulled Ollama models can be checked using the following command:
248
+
191
249
  ```
192
250
  ollama list
193
251
  ```
252
+
253
+ ⚠️ `pcst_fast 1.0.10` library requires `Microsoft Visual C++ 14.0` or greater to be installed.
254
+ You can download `Microsoft C++ Build Tools` from [here](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
255
+
194
256
  3. **Initialize OPENAI_API_KEY and NVIDIA_API_KEY**
195
257
 
196
258
  ```bash
@@ -260,4 +322,4 @@ Check out our [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
260
322
 
261
323
  ## Feedback
262
324
 
263
- Questions/Bug reports/Feature requests/Comments/Suggestions? We welcome all. Please use `Isssues` or `Discussions` 😀
325
+ Questions/Bug reports/Feature requests/Comments/Suggestions? We welcome all. Please use `Issues` or `Discussions` 😀
@@ -1,7 +1,7 @@
1
1
  aiagents4pharma/__init__.py,sha256=7xnvthMuxYurECWvyb0_yaPJ18SsqvmkKPTCxgbQlNQ,186
2
2
  aiagents4pharma/talk2aiagents4pharma/__init__.py,sha256=KOPe8cZ-ROQ6EGn8FeejRFUPokayKRMTgiXFyOpZGoA,122
3
3
  aiagents4pharma/talk2aiagents4pharma/agents/__init__.py,sha256=Cc1RitlLGzJ5d_dCSUdguZH417nlJux1qVCVS2M9t30,129
4
- aiagents4pharma/talk2aiagents4pharma/agents/main_agent.py,sha256=s0mrOk4DuAg7IkzB1YGyl_8wjxF2T_ReZENZirvjr94,2810
4
+ aiagents4pharma/talk2aiagents4pharma/agents/main_agent.py,sha256=gnXBvvi3t8DjUtXImqgVJ9Rz7RqnDeHNTCMFiPo6bvc,2860
5
5
  aiagents4pharma/talk2aiagents4pharma/configs/__init__.py,sha256=5ah__-8XyRblwT0U1ByRigNjt_GyCheu7zce4aM-eZE,68
6
6
  aiagents4pharma/talk2aiagents4pharma/configs/config.yaml,sha256=VnbMbVSYfCh68cHZ0JLu00UjOUmapejN3EsN3lnBXtU,51
7
7
  aiagents4pharma/talk2aiagents4pharma/configs/agents/__init__.py,sha256=zrJcq-4m0YUKfSlRGC8KzBmEooaASKuL_Y75yDp-ZoA,72
@@ -186,8 +186,8 @@ aiagents4pharma/talk2scholars/tools/s2/search.py,sha256=i5KMFJWK31CjYtVT1McJpLzg
186
186
  aiagents4pharma/talk2scholars/tools/s2/single_paper_rec.py,sha256=7PoZfcstxDThWX6NYOgxN_9M_nwgMPAALch8OmjraVY,5568
187
187
  aiagents4pharma/talk2scholars/tools/zotero/__init__.py,sha256=1UW4r5ECvAwYpo1Fjf7lQPO--M8I85baYCHocFOAq4M,53
188
188
  aiagents4pharma/talk2scholars/tools/zotero/zotero_read.py,sha256=NJ65fAJ4u2Zq15uvEajVOhI4QnNvyqA6FHPaEDqvMw0,4321
189
- aiagents4pharma-1.25.1.dist-info/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
190
- aiagents4pharma-1.25.1.dist-info/METADATA,sha256=b6pqbn3KJ-oCdO-rupWLZegRk594gIE-tfA9BnFnBCg,10297
191
- aiagents4pharma-1.25.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
192
- aiagents4pharma-1.25.1.dist-info/top_level.txt,sha256=-AH8rMmrSnJtq7HaAObS78UU-cTCwvX660dSxeM7a0A,16
193
- aiagents4pharma-1.25.1.dist-info/RECORD,,
189
+ aiagents4pharma-1.26.1.dist-info/LICENSE,sha256=IcIbyB1Hyk5ZDah03VNQvJkbNk2hkBCDqQ8qtnCvB4Q,1077
190
+ aiagents4pharma-1.26.1.dist-info/METADATA,sha256=q4jfiTPl4koFlScZw3k22S_iIIr9w7SV-tk0aEftH-Q,12585
191
+ aiagents4pharma-1.26.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
192
+ aiagents4pharma-1.26.1.dist-info/top_level.txt,sha256=-AH8rMmrSnJtq7HaAObS78UU-cTCwvX660dSxeM7a0A,16
193
+ aiagents4pharma-1.26.1.dist-info/RECORD,,