require('./logger-DXu5t4bD.cjs');
require('./esm-C8GQ-4k9.cjs');
require('./pythonUtils-CJADVBl_.cjs');
require('./types-ykSCHP0x.cjs');
require('./util-BdlVY3dk.cjs');
require('./fetch-D5ITc9pG.cjs');
require('./cache-Cv2r51Z1.cjs');
require('./genaiTracer-C0huM5g6.cjs');
const require_chat = require('./chat-CwcRgAF_.cjs');
require('./transform-DTD-82AS.cjs');
require('./openai-BQhdK6dW.cjs');
require('./util-C-X2Ldab.cjs');
const require_completion = require('./completion-CrY96x28.cjs');

//#region src/providers/aimlapi.ts
/**
* Factory for creating AI/ML API providers using OpenAI-compatible endpoints.
*/
function createAimlApiProvider(providerPath, options = {}) {
	const splits = providerPath.split(":");
	const type = splits[1];
	const modelName = splits.slice(2).join(":");
	const openaiOptions = {
		...options,
		config: {
			...options.config || {},
			apiBaseUrl: "https://api.aimlapi.com/v1",
			apiKeyEnvar: "AIML_API_KEY"
		}
	};
	if (type === "chat") return new require_chat.OpenAiChatCompletionProvider(modelName, openaiOptions);
	else if (type === "completion") return new require_completion.OpenAiCompletionProvider(modelName, openaiOptions);
	else if (type === "embedding" || type === "embeddings") return new require_completion.OpenAiEmbeddingProvider(modelName, openaiOptions);
	return new require_chat.OpenAiChatCompletionProvider(splits.slice(1).join(":"), openaiOptions);
}

//#endregion
exports.createAimlApiProvider = createAimlApiProvider;
//# sourceMappingURL=aimlapi-dEMms6MH.cjs.map