Get compatibility mode setting. 兼容性模式:启用后所有system消息全部转换成user,停用system_instructions。 该选项可能会降低模型理解能力,但是能避免流式空回的情况。 Environment variable: COMPATIBILITY_MODE Database config key: compatibility_mode_enabled Default: False
()
| 302 | |
| 303 | |
| 304 | async 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 | |
| 322 | async def get_return_thoughts_to_frontend() -> bool: |
no test coverage detected