Newer
Older
navi-1 / navi / context_providers / public_url.py
"""Injects the server's public URL so Navi always knows her own address."""

from navi.config import settings

name = "public_url"
description = "Injects the server's public URL into context on every call."
global_provider = True


async def get_context() -> str | None:
    url = settings.public_url.rstrip("/")
    return f"[System] My public URL: {url}"