Sends a request to a standard OpenAI-compatible endpoint (e.g. /v1/chat/completions). Used for both OpenAI's official API and local LLMs (Ollama, LM Studio, vLLM).
openai_chat_request(system_msg, user_msg, endpoint, api_key, model)A character string (the JSON response) or NULL on failure.
String. The instructions for the LLM.
String. The specific case to evaluate.
String. Base URL (e.g., "http://localhost:11434/v1").
String. API Key. Often not required for local LLMs.
String. Model name.