INNER CODE UNIT · Python

_mask

SPThole/CoexistAI · app.py:306

    def _mask(s):
        try:
            if not s:
                return ''
            s = str(s)
            if len(s) <= 6:
                return '*' * len(s)
            return s[:3] + '...' + s[-3:]
        except Exception:
            return ''

    cfg = dict(model_config)
    cfg['_meta'] = {
        'openai_compatible': openai_compatible,
        'HOST_APP': globals().get('HOST_APP'),
        'PORT_NUM_APP': globals().get('PORT_NUM_APP'),
        'HOST_SEARXNG': globals().get('HOST_SEARXNG'),
        'PORT_NUM_SEARXNG': globals().get('PORT_NUM_SEARXNG'),

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…