#!/usr/bin/env node
import "./chunk-DHDDz29n.js";
import "./logger-Bzi5o47S.js";
import "./fetch-CruohpfF.js";
import "./cloud-CZHXB86j.js";
import "./types-BjfZC_QB.js";
import "./cache-_erPRF2X.js";
import "./util-DhvhJDlT.js";
import "./esm-Bwuh5HXW.js";
import "./pythonUtils-mprm8p4h.js";
import "./genaiTracer-CqNnnXrE.js";
import { t as OpenAiChatCompletionProvider } from "./chat-Bvvgb30H.js";
import "./transform-DFkyOjQ7.js";
import "./openai-D_5h8sBa.js";
import "./util-ImmJ_Dxe.js";
import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-2IaHHyEe.js";

//#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 OpenAiChatCompletionProvider(modelName, openaiOptions);
	else if (type === "completion") return new OpenAiCompletionProvider(modelName, openaiOptions);
	else if (type === "embedding" || type === "embeddings") return new OpenAiEmbeddingProvider(modelName, openaiOptions);
	return new OpenAiChatCompletionProvider(splits.slice(1).join(":"), openaiOptions);
}

//#endregion
export { createAimlApiProvider };
//# sourceMappingURL=aimlapi-BDfWTIuB.js.map