MCPcopy Create free account
hub / github.com/su-kaka/gcli2api / get_compatibility_mode_enabled

Function get_compatibility_mode_enabled

config.py:304–319  ·  view source on GitHub ↗

Get compatibility mode setting. 兼容性模式:启用后所有system消息全部转换成user,停用system_instructions。 该选项可能会降低模型理解能力,但是能避免流式空回的情况。 Environment variable: COMPATIBILITY_MODE Database config key: compatibility_mode_enabled Default: False

()

Source from the content-addressed store, hash-verified

302
303
304async def get_compatibility_mode_enabled() -> bool:
305 """
306 Get compatibility mode setting.
307
308 兼容性模式:启用后所有system消息全部转换成user,停用system_instructions。
309 该选项可能会降低模型理解能力,但是能避免流式空回的情况。
310
311 Environment variable: COMPATIBILITY_MODE
312 Database config key: compatibility_mode_enabled
313 Default: False
314 """
315 env_value = os.getenv("COMPATIBILITY_MODE")
316 if env_value:
317 return env_value.lower() in ("true", "1", "yes", "on")
318
319 return bool(await get_config_value("compatibility_mode_enabled", False))
320
321
322async def get_return_thoughts_to_frontend() -> bool:

Callers 1

merge_system_messagesFunction · 0.90

Calls 1

get_config_valueFunction · 0.85

Tested by

no test coverage detected