X7ROOT File Manager
Current Path:
/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/ai
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
ai
/
??
..
??
__init__.py
(288 B)
??
__pycache__
??
_openai_completions_api.py
(1.78 KB)
??
_openai_responses_api.py
(656 B)
??
consts.py
(275 B)
??
monitoring.py
(5.7 KB)
??
utils.py
(25.42 KB)
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)]
Upload File
Create Folder