Function
filter
v0.1.1
Message Date And Time
Function ID
message_date_and_time
Creator
@benasrau
Downloads
140+
Gives model current date and time context for each message. Don't forget to adjust the timezone in the settings.
README

Message Date and Time Context

Overview

This Open WebUI function automatically adds contextual date and time information to each message, providing the AI model with current temporal context.

Features

  • Adds system context message with current:
    • Day of the week
    • Date
    • Season
    • Time of day
    • Exact time
    • Timezone information

Configuration

You can configure the function using valves:

Timezone Settings

  • DATETIME_TIMEZONE_HOURS: Timezone offset hours (default: 0)
    • Positive for UTC+, Negative for UTC-
  • DATETIME_TIMEZONE_MINUTES: Timezone offset minutes (default: 0)
  • DATETIME_SOUTHERN_HEMISPHERE: Set to "true" if in Southern Hemisphere (default: "false")

Example Configuration

Supported Hemispheres

  • Automatically adjusts seasonal context based on hemisphere
  • Default is Northern Hemisphere
  • Can be changed by setting DATETIME_SOUTHERN_HEMISPHERE to "true"

Example Context Output

Requirements

  • Open WebUI version: 0.6.4+

License

MIT License

Author

Benas Raudys (https://github.com/benasraudys)