Originally created by @loong95 on GitHub (Apr 11, 2025).
Check Existing Issues
I have searched the existing issues and discussions.
Problem Description
Hello Open WebUI team,
I'm currently working on implementing time-sensitive tools (like weather queries) and noticed a limitation in the tool calling system. While {{CURRENT_DATETIME}} works well in system prompts, this functionality isn't available in tool-specific prompts.
Current Challenge:
When implementing a tool like:
defget_weather(__user__:dict,date:str)->str:# Returns weather for specified date
I want to handle queries like "What was yesterday's weather?" by referencing the current date in the tool prompt. However, since tool prompts don't support the {{CURRENT_DATETIME}} variable, I'm unable to:
Calculate relative dates (yesterday/tomorrow)
Provide time-aware responses
Maintain consistency with system prompt timestamps
This creates a disconnect between what the LLM understands (via system prompt) and what tools can access.
Desired Solution you'd like
Could we extend {{CURRENT_DATETIME}} support to tool calling prompts? This would enable proper time-awareness throughout the entire processing pipeline.
Alternatives Considered
No response
Additional Context
No response
Originally created by @loong95 on GitHub (Apr 11, 2025).
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
### Problem Description
Hello Open WebUI team,
I'm currently working on implementing time-sensitive tools (like weather queries) and noticed a limitation in the tool calling system. While `{{CURRENT_DATETIME}}` works well in system prompts, this functionality isn't available in tool-specific prompts.
Current Challenge:
When implementing a tool like:
```python
def get_weather(__user__: dict, date: str) -> str:
# Returns weather for specified date
```
I want to handle queries like "What was yesterday's weather?" by referencing the current date in the tool prompt. However, since tool prompts don't support the `{{CURRENT_DATETIME}}` variable, I'm unable to:
* Calculate relative dates (yesterday/tomorrow)
* Provide time-aware responses
* Maintain consistency with system prompt timestamps
This creates a disconnect between what the LLM understands (via system prompt) and what tools can access.
### Desired Solution you'd like
Could we extend `{{CURRENT_DATETIME}}` support to tool calling prompts? This would enable proper time-awareness throughout the entire processing pipeline.
### Alternatives Considered
_No response_
### Additional Context
_No response_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @loong95 on GitHub (Apr 11, 2025).
Check Existing Issues
Problem Description
Hello Open WebUI team,
I'm currently working on implementing time-sensitive tools (like weather queries) and noticed a limitation in the tool calling system. While
{{CURRENT_DATETIME}}works well in system prompts, this functionality isn't available in tool-specific prompts.Current Challenge:
When implementing a tool like:
I want to handle queries like "What was yesterday's weather?" by referencing the current date in the tool prompt. However, since tool prompts don't support the
{{CURRENT_DATETIME}}variable, I'm unable to:Calculate relative dates (yesterday/tomorrow)
Provide time-aware responses
Maintain consistency with system prompt timestamps
This creates a disconnect between what the LLM understands (via system prompt) and what tools can access.
Desired Solution you'd like
Could we extend
{{CURRENT_DATETIME}}support to tool calling prompts? This would enable proper time-awareness throughout the entire processing pipeline.Alternatives Considered
No response
Additional Context
No response
@tjbck commented on GitHub (Apr 11, 2025):
You should use the python built-in functions.