UNPKG

@openai/agents-openai

Version:

The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.

22 lines • 685 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isOfficialOpenAIEndpoint = isOfficialOpenAIEndpoint; function isOfficialOpenAIEndpoint(baseURL, transport) { if (!baseURL) { return false; } try { const parsedURL = new URL(baseURL); if (parsedURL.hostname !== 'api.openai.com' || parsedURL.port.length > 0) { return false; } if (transport === 'http') { return parsedURL.protocol === 'https:'; } return parsedURL.protocol === 'https:' || parsedURL.protocol === 'wss:'; } catch { return false; } } //# sourceMappingURL=openaiEndpoint.js.map