📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-27 23:34:22
📂
/
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
ai
✏️
Editing: _openai_responses_api.py
from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Union from openai.types.responses import ResponseInputItemParam, ResponseInputParam def _is_system_instruction(message: "ResponseInputItemParam") -> bool: if not isinstance(message, dict) or not message.get("role") == "system": return False return "type" not in message or message["type"] == "message" def _get_system_instructions( messages: "Union[str, ResponseInputParam]", ) -> "list[ResponseInputItemParam]": if not isinstance(messages, list): return [] return [message for message in messages if _is_system_instruction(message)]
💾 Save Changes
❌ Cancel