require('./logger-q_xXORhb.cjs');
require('./esm-D3hKBIJw.cjs');
require('./pythonUtils-CA-U67vF.cjs');
require('./types-DxNbVAX2.cjs');
require('./util-C-nJy5yZ.cjs');
require('./fetch--6dTWCD4.cjs');
require('./cache-BrwLt6g7.cjs');
const require_chat = require('./chat-BbQFtNh7.cjs');
require('./transform-DFn8CyvR.cjs');
require('./openai-DLwm54eV.cjs');
require('./util-DdYfVi1z.cjs');
const require_embedding = require('./embedding-7FmJs2RM.cjs');
const require_completion = require('./completion-D2pmYHY0.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-x6R7YZN0.cjs.map