in aidial_adapter_openai/utils/text.py [0:0]
def truncate_string(s: str, n: int) -> str: if len(s) <= n: return s return s[:n] + "..."