require('./logger-B3t6CmTC.cjs');
require('./esm-DRsi2FRh.cjs');
require('./pythonUtils-BU2j0p3m.cjs');
require('./fetch-COTDhwC8.cjs');
require('./util-CtKyTm4Y.cjs');
require('./types-B2TvjqC8.cjs');
require('./cache-CGY-3N8E.cjs');
const require_chat = require('./chat-tUnoe1Cp.cjs');
require('./openai-DFnuahhK.cjs');
const require_embedding = require('./embedding-B37PWnZO.cjs');
const require_completion = require('./completion-CH5DJDLM.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_embedding.OpenAiEmbeddingProvider(modelName, openaiOptions);
	return new require_chat.OpenAiChatCompletionProvider(splits.slice(1).join(":"), openaiOptions);
}

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