aiagents4pharma 1.6.0__tar.gz → 1.6.1__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.6.0 → aiagents4pharma-1.6.1}/PKG-INFO +5 -4
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/README.md +3 -3
- aiagents4pharma-1.6.1/aiagents4pharma/talk2cells/__init__.py +6 -0
- aiagents4pharma-1.6.1/aiagents4pharma/talk2cells/agents/__init__.py +5 -0
- aiagents4pharma-1.6.1/aiagents4pharma/talk2cells/agents/scp_agent.py +85 -0
- aiagents4pharma-1.6.1/aiagents4pharma/talk2cells/states/__init__.py +5 -0
- aiagents4pharma-1.6.1/aiagents4pharma/talk2cells/states/state_talk2cells.py +13 -0
- aiagents4pharma-1.6.1/aiagents4pharma/talk2cells/tools/__init__.py +5 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma.egg-info/PKG-INFO +5 -4
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma.egg-info/SOURCES.txt +6 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma.egg-info/requires.txt +1 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/pyproject.toml +5 -0
- aiagents4pharma-1.6.1/release_version.txt +1 -0
- aiagents4pharma-1.6.0/release_version.txt +0 -1
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/LICENSE +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/models/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/models/basico_model.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/models/sys_bio_model.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/ask_question.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/custom_plotter.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/fetch_parameters.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/model_description.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/search_models.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/simulate_model.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/datasets/dataset.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/datasets/primekg.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/datasets/starkqa_primekg.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/utils/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/__init__.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/embeddings.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/huggingface.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/utils/embeddings/sentence_transformer.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/utils/kg_utils.py +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma.egg-info/dependency_links.txt +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma.egg-info/top_level.txt +0 -0
- {aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: aiagents4pharma
|
3
|
-
Version: 1.6.
|
3
|
+
Version: 1.6.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
|
@@ -19,6 +19,7 @@ Requires-Dist: langchain-community==0.3.5
|
|
19
19
|
Requires-Dist: langchain-core==0.3.15
|
20
20
|
Requires-Dist: langchain-experimental==0.3.3
|
21
21
|
Requires-Dist: langchain-openai==0.2.5
|
22
|
+
Requires-Dist: langgraph==0.2.62
|
22
23
|
Requires-Dist: matplotlib==3.9.2
|
23
24
|
Requires-Dist: openai==1.59.4
|
24
25
|
Requires-Dist: pandas==2.2.3
|
@@ -51,8 +52,8 @@ Welcome to **AIAgents4Pharma** – an open-source project by [Team VPE](https://
|
|
51
52
|
Our toolkit currently consists of three intelligent agents, each designed to simplify and enhance access to specialized data in biology:
|
52
53
|
|
53
54
|
- **Talk2BioModels**: Engage directly with mathematical models in systems biology.
|
54
|
-
- **Talk2Cells** *(
|
55
|
-
- **Talk2KnowledgeGraphs** *(
|
55
|
+
- **Talk2Cells** *(Work in progress)*: Query and analyze sequencing data with ease.
|
56
|
+
- **Talk2KnowledgeGraphs** *(Work in progress)*: Access and explore complex biological knowledge graphs for insightful data connections.
|
56
57
|
|
57
58
|
---
|
58
59
|
|
@@ -66,7 +67,7 @@ Our toolkit currently consists of three intelligent agents, each designed to sim
|
|
66
67
|
- Adjust parameters within the model to simulate different conditions.
|
67
68
|
- Query simulation results.
|
68
69
|
|
69
|
-
### 2. Talk2Cells *(
|
70
|
+
### 2. Talk2Cells *(Work in Progress)*
|
70
71
|
|
71
72
|
**Talk2Cells** is being developed to provide direct access to and analysis of sequencing data, such as RNA-Seq or DNA-Seq, using natural language.
|
72
73
|
|
@@ -7,8 +7,8 @@ Welcome to **AIAgents4Pharma** – an open-source project by [Team VPE](https://
|
|
7
7
|
Our toolkit currently consists of three intelligent agents, each designed to simplify and enhance access to specialized data in biology:
|
8
8
|
|
9
9
|
- **Talk2BioModels**: Engage directly with mathematical models in systems biology.
|
10
|
-
- **Talk2Cells** *(
|
11
|
-
- **Talk2KnowledgeGraphs** *(
|
10
|
+
- **Talk2Cells** *(Work in progress)*: Query and analyze sequencing data with ease.
|
11
|
+
- **Talk2KnowledgeGraphs** *(Work in progress)*: Access and explore complex biological knowledge graphs for insightful data connections.
|
12
12
|
|
13
13
|
---
|
14
14
|
|
@@ -22,7 +22,7 @@ Our toolkit currently consists of three intelligent agents, each designed to sim
|
|
22
22
|
- Adjust parameters within the model to simulate different conditions.
|
23
23
|
- Query simulation results.
|
24
24
|
|
25
|
-
### 2. Talk2Cells *(
|
25
|
+
### 2. Talk2Cells *(Work in Progress)*
|
26
26
|
|
27
27
|
**Talk2Cells** is being developed to provide direct access to and analysis of sequencing data, such as RNA-Seq or DNA-Seq, using natural language.
|
28
28
|
|
@@ -0,0 +1,85 @@
|
|
1
|
+
#/usr/bin/env python3
|
2
|
+
|
3
|
+
'''
|
4
|
+
This is the agent file for the Talk2Cells graph.
|
5
|
+
'''
|
6
|
+
|
7
|
+
import logging
|
8
|
+
import os
|
9
|
+
from langchain_openai import ChatOpenAI
|
10
|
+
from langgraph.checkpoint.memory import MemorySaver
|
11
|
+
from langgraph.graph import START, StateGraph
|
12
|
+
from langgraph.prebuilt import create_react_agent, ToolNode
|
13
|
+
from ..tools.scp_agent.search_studies import search_studies
|
14
|
+
from ..tools.scp_agent.display_studies import display_studies
|
15
|
+
from ..states.state_talk2cells import Talk2Cells
|
16
|
+
|
17
|
+
# Initialize logger
|
18
|
+
logging.basicConfig(level=logging.INFO)
|
19
|
+
logger = logging.getLogger(__name__)
|
20
|
+
|
21
|
+
def get_app(uniq_id):
|
22
|
+
'''
|
23
|
+
This function returns the langraph app.
|
24
|
+
'''
|
25
|
+
def agent_scp_node(state: Talk2Cells):
|
26
|
+
'''
|
27
|
+
This function calls the model.
|
28
|
+
'''
|
29
|
+
logger.log(logging.INFO, "Creating SCP_Agent node with thread_id %s", uniq_id)
|
30
|
+
# Get the messages from the state
|
31
|
+
# messages = state['messages']
|
32
|
+
# Call the model
|
33
|
+
# inputs = {'messages': messages}
|
34
|
+
response = model.invoke(state, {"configurable": {"thread_id": uniq_id}})
|
35
|
+
# The response is a list of messages and may contain `tool calls`
|
36
|
+
# We return a list, because this will get added to the existing list
|
37
|
+
# return {"messages": [response]}
|
38
|
+
return response
|
39
|
+
|
40
|
+
# Define the tools
|
41
|
+
# tools = [search_studies, display_studies]
|
42
|
+
tools = ToolNode([search_studies, display_studies])
|
43
|
+
|
44
|
+
# Create the LLM
|
45
|
+
# And bind the tools to it
|
46
|
+
# model = ChatOpenAI(model="gpt-4o-mini", temperature=0).bind_tools(tools)
|
47
|
+
|
48
|
+
# Create an environment variable to store the LLM model
|
49
|
+
# Check if the environment variable AIAGENTS4PHARMA_LLM_MODEL is set
|
50
|
+
# If not, set it to 'gpt-4o-mini'
|
51
|
+
llm_model = os.getenv('AIAGENTS4PHARMA_LLM_MODEL', 'gpt-4o-mini')
|
52
|
+
# print (f'LLM model: {llm_model}')
|
53
|
+
# llm = ChatOpenAI(model="gpt-4o-mini", temperature=0)
|
54
|
+
llm = ChatOpenAI(model=llm_model, temperature=0)
|
55
|
+
model = create_react_agent(
|
56
|
+
llm,
|
57
|
+
tools=tools,
|
58
|
+
state_schema=Talk2Cells,
|
59
|
+
state_modifier=(
|
60
|
+
"You are Talk2Cells agent."
|
61
|
+
),
|
62
|
+
checkpointer=MemorySaver()
|
63
|
+
)
|
64
|
+
|
65
|
+
# Define a new graph
|
66
|
+
workflow = StateGraph(Talk2Cells)
|
67
|
+
|
68
|
+
# Define the two nodes we will cycle between
|
69
|
+
workflow.add_node("agent_scp", agent_scp_node)
|
70
|
+
|
71
|
+
# Set the entrypoint as `agent`
|
72
|
+
# This means that this node is the first one called
|
73
|
+
workflow.add_edge(START, "agent_scp")
|
74
|
+
|
75
|
+
# Initialize memory to persist state between graph runs
|
76
|
+
checkpointer = MemorySaver()
|
77
|
+
|
78
|
+
# Finally, we compile it!
|
79
|
+
# This compiles it into a LangChain Runnable,
|
80
|
+
# meaning you can use it as you would any other runnable.
|
81
|
+
# Note that we're (optionally) passing the memory when compiling the graph
|
82
|
+
app = workflow.compile(checkpointer=checkpointer)
|
83
|
+
logger.log(logging.INFO, "Compiled the graph")
|
84
|
+
|
85
|
+
return app
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env python3
|
2
|
+
|
3
|
+
'''
|
4
|
+
This is the state file for the Talk2Cells agent.
|
5
|
+
'''
|
6
|
+
|
7
|
+
from langgraph.prebuilt.chat_agent_executor import AgentState
|
8
|
+
|
9
|
+
class Talk2Cells(AgentState):
|
10
|
+
"""
|
11
|
+
The state for the Talk2Cells agent.
|
12
|
+
"""
|
13
|
+
search_table: str
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: aiagents4pharma
|
3
|
-
Version: 1.6.
|
3
|
+
Version: 1.6.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
|
@@ -19,6 +19,7 @@ Requires-Dist: langchain-community==0.3.5
|
|
19
19
|
Requires-Dist: langchain-core==0.3.15
|
20
20
|
Requires-Dist: langchain-experimental==0.3.3
|
21
21
|
Requires-Dist: langchain-openai==0.2.5
|
22
|
+
Requires-Dist: langgraph==0.2.62
|
22
23
|
Requires-Dist: matplotlib==3.9.2
|
23
24
|
Requires-Dist: openai==1.59.4
|
24
25
|
Requires-Dist: pandas==2.2.3
|
@@ -51,8 +52,8 @@ Welcome to **AIAgents4Pharma** – an open-source project by [Team VPE](https://
|
|
51
52
|
Our toolkit currently consists of three intelligent agents, each designed to simplify and enhance access to specialized data in biology:
|
52
53
|
|
53
54
|
- **Talk2BioModels**: Engage directly with mathematical models in systems biology.
|
54
|
-
- **Talk2Cells** *(
|
55
|
-
- **Talk2KnowledgeGraphs** *(
|
55
|
+
- **Talk2Cells** *(Work in progress)*: Query and analyze sequencing data with ease.
|
56
|
+
- **Talk2KnowledgeGraphs** *(Work in progress)*: Access and explore complex biological knowledge graphs for insightful data connections.
|
56
57
|
|
57
58
|
---
|
58
59
|
|
@@ -66,7 +67,7 @@ Our toolkit currently consists of three intelligent agents, each designed to sim
|
|
66
67
|
- Adjust parameters within the model to simulate different conditions.
|
67
68
|
- Query simulation results.
|
68
69
|
|
69
|
-
### 2. Talk2Cells *(
|
70
|
+
### 2. Talk2Cells *(Work in Progress)*
|
70
71
|
|
71
72
|
**Talk2Cells** is being developed to provide direct access to and analysis of sequencing data, such as RNA-Seq or DNA-Seq, using natural language.
|
72
73
|
|
@@ -19,6 +19,12 @@ aiagents4pharma/talk2biomodels/tools/fetch_parameters.py
|
|
19
19
|
aiagents4pharma/talk2biomodels/tools/model_description.py
|
20
20
|
aiagents4pharma/talk2biomodels/tools/search_models.py
|
21
21
|
aiagents4pharma/talk2biomodels/tools/simulate_model.py
|
22
|
+
aiagents4pharma/talk2cells/__init__.py
|
23
|
+
aiagents4pharma/talk2cells/agents/__init__.py
|
24
|
+
aiagents4pharma/talk2cells/agents/scp_agent.py
|
25
|
+
aiagents4pharma/talk2cells/states/__init__.py
|
26
|
+
aiagents4pharma/talk2cells/states/state_talk2cells.py
|
27
|
+
aiagents4pharma/talk2cells/tools/__init__.py
|
22
28
|
aiagents4pharma/talk2knowledgegraphs/__init__.py
|
23
29
|
aiagents4pharma/talk2knowledgegraphs/datasets/__init__.py
|
24
30
|
aiagents4pharma/talk2knowledgegraphs/datasets/biobridge_primekg.py
|
@@ -24,6 +24,7 @@ dependencies = [
|
|
24
24
|
"langchain-core==0.3.15",
|
25
25
|
"langchain-experimental==0.3.3",
|
26
26
|
"langchain-openai==0.2.5",
|
27
|
+
"langgraph==0.2.62",
|
27
28
|
"matplotlib==3.9.2",
|
28
29
|
"openai==1.59.4",
|
29
30
|
"pandas==2.2.3",
|
@@ -58,6 +59,10 @@ packages = ["aiagents4pharma",
|
|
58
59
|
"aiagents4pharma.talk2biomodels",
|
59
60
|
"aiagents4pharma.talk2biomodels.models",
|
60
61
|
"aiagents4pharma.talk2biomodels.tools",
|
62
|
+
"aiagents4pharma.talk2cells",
|
63
|
+
"aiagents4pharma.talk2cells.agents",
|
64
|
+
"aiagents4pharma.talk2cells.states",
|
65
|
+
"aiagents4pharma.talk2cells.tools",
|
61
66
|
"aiagents4pharma.talk2knowledgegraphs",
|
62
67
|
"aiagents4pharma.talk2knowledgegraphs.datasets",
|
63
68
|
"aiagents4pharma.talk2knowledgegraphs.utils",
|
@@ -0,0 +1 @@
|
|
1
|
+
v1.6.1
|
@@ -1 +0,0 @@
|
|
1
|
-
v1.6.0
|
File without changes
|
File without changes
|
File without changes
|
{aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/models/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/__init__.py
RENAMED
File without changes
|
{aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2biomodels/tools/ask_question.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma/talk2knowledgegraphs/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{aiagents4pharma-1.6.0 → aiagents4pharma-1.6.1}/aiagents4pharma.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|