[3af7d7]: / aiagents4pharma / talk2cells / tools / scp_agent / display_studies.py

Download this file

26 lines (20 with data), 600 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python3
'''
This tool is used to display the table of studies.
'''
import logging
from typing import Annotated
from langchain_core.tools import tool
from langgraph.prebuilt import InjectedState
# Initialize logger
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
@tool('display_studies')
def display_studies(state: Annotated[dict, InjectedState]):
"""
Display the table of studies.
Args:
state (dict): The state of the agent.
"""
logger.log(logging.INFO, "Calling the tool display_studies")
return state["search_table"]