You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a very descriptive title to this question.
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
Commit to Help
I commit to help with one of those options 👆
Example Code
@tooldefget_opening_hours(DD):
"""Use this to get the opening hours of a day of the company."""#if DD == 'today':# DD = date.today().strftime('%Y-%m-%d')# DD should be in YYYY-MM-DD formaturl=f"https://xxxxxx/json/opening_hours_{DD}.json"
I created "get_opening_hours" tool , and it is workable ;
The "get_opening_hours" tool take the "param" from tool_call passing. and it will use the "param" to do an API call.
If I ask a question "What is the opening hours of today? " langgraph will trigger "get_opening_hours" tool with param= "today".
however, "today", is not in YYYY-MM-DD format, and the API call fails.
I used to build a chatbot with the below prompt to parse the date information:
"description": "The date in 'YYYY-MM-DD' format. Today is "+today_date+". Get The date of the opening hours in yyyy-mm-dd format. e.g. If today is 2024-09-17, Tomorrow means 2024-09-18, Next wednesday means 2024-09-23, no pecific date means Today's date 2024-09-17.",
QUESTION:
I am new in LangGraph , and I would like to get your advice how to parse date information from user message?
Thanks in advance
System Info
System Information
OS: Windows
OS Version: 10.0.26100
Python Version: 3.12.9 (tags/v3.12.9:fdb8142, Feb 4 2025, 15:27:58) [MSC v.1942 64 bit (AMD64)]
aiohttp<4.0.0,>=3.8.3: Installed. No version info available.
async-timeout<5.0.0,>=4.0.0;: Installed. No version info available.
dataclasses-json<0.7,>=0.5.7: Installed. No version info available.
httpx: 0.28.1
httpx-sse<1.0.0,>=0.4.0: Installed. No version info available.
jsonpatch<2.0,>=1.33: Installed. No version info available.
langchain-anthropic;: Installed. No version info available.
langchain-aws;: Installed. No version info available.
langchain-cohere;: Installed. No version info available.
langchain-community;: Installed. No version info available.
langchain-core<1.0.0,>=0.3.34: Installed. No version info available.
langchain-core<1.0.0,>=0.3.35: Installed. No version info available.
langchain-deepseek;: Installed. No version info available.
langchain-fireworks;: Installed. No version info available.
langchain-google-genai;: Installed. No version info available.
langchain-google-vertexai;: Installed. No version info available.
langchain-groq;: Installed. No version info available.
langchain-huggingface;: Installed. No version info available.
langchain-mistralai;: Installed. No version info available.
langchain-ollama;: Installed. No version info available.
langchain-openai;: Installed. No version info available.
langchain-text-splitters<1.0.0,>=0.3.6: Installed. No version info available.
langchain-together;: Installed. No version info available.
langchain-xai;: Installed. No version info available.
langchain<1.0.0,>=0.3.18: Installed. No version info available.
langsmith-pyo3: Installed. No version info available.
langsmith<0.4,>=0.1.125: Installed. No version info available.
langsmith<0.4,>=0.1.17: Installed. No version info available.
numpy<2,>=1.26.4;: Installed. No version info available.
numpy<3,>=1.26.2;: Installed. No version info available.
ollama: 0.4.7
openai<2.0.0,>=1.58.1: Installed. No version info available.
orjson: 3.10.15
packaging<25,>=23.2: Installed. No version info available.
pydantic: 2.10.6
pydantic-settings<3.0.0,>=2.4.0: Installed. No version info available.
pydantic<3.0.0,>=2.5.2;: Installed. No version info available.
pydantic<3.0.0,>=2.7.4: Installed. No version info available.
pydantic<3.0.0,>=2.7.4;: Installed. No version info available.
pytest: Installed. No version info available.
PyYAML>=5.3: Installed. No version info available.
requests: 2.32.3
requests-toolbelt: 1.0.0
requests<3,>=2: Installed. No version info available.
rich: Installed. No version info available.
SQLAlchemy<3,>=1.4: Installed. No version info available.
tenacity!=8.4.0,<10,>=8.1.0: Installed. No version info available.
tenacity!=8.4.0,<10.0.0,>=8.1.0: Installed. No version info available.
tiktoken<1,>=0.7: Installed. No version info available.
typing-extensions>=4.7: Installed. No version info available.
zstandard: 0.23.0
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked other resources
Commit to Help
Example Code
Description
I run a simple langgraph application based on ChainLit Langgraph integration example: https://docs.chainlit.io/integrations/langchain
I created "get_opening_hours" tool , and it is workable ;
The "get_opening_hours" tool take the "param" from tool_call passing. and it will use the "param" to do an API call.
If I ask a question "What is the opening hours of today? " langgraph will trigger "get_opening_hours" tool with param= "today".
however, "today", is not in YYYY-MM-DD format, and the API call fails.
I used to build a chatbot with the below prompt to parse the date information:
QUESTION:
I am new in LangGraph , and I would like to get your advice how to parse date information from user message?
Thanks in advance
System Info
System Information
Package Information
Optional packages not installed
Other Dependencies
Beta Was this translation helpful? Give feedback.
All reactions