require('./logger-CMp-NS-e.cjs');
require('./esm-gWVPXn3r.cjs');
require('./pythonUtils-rOCm9w_5.cjs');
require('./types-Cixl-wRO.cjs');
require('./util-CxWghxGa.cjs');
require('./fetch-E3xbPP9w.cjs');
require('./cache-PWdK7nbt.cjs');
require('./genaiTracer-zK0Mtd_D.cjs');
const require_chat = require('./chat-DKNIBnnw.cjs');
require('./transform-Bow1252l.cjs');
require('./openai-eZz8QsxY.cjs');
require('./util-Dqg4mr2c.cjs');
const require_completion = require('./completion-Xj-aJd1b.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-B_JaNK7C.cjs.map