require("./logger-DuG3amVa.cjs");
require("./fetch-Hdu2Q-w3.cjs");
require("./cache-JYoIjHBA.cjs");
const require_chat = require("./chat-Bl2LfE5B.cjs");
const require_embedding = require("./embedding-B-5e24ct.cjs");
const require_completion = require("./completion-DJvHNUr_.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-Buq5GajD.cjs.map