import "./chunk-BT06e5E1.js";
import "./logger-BudIH0qK.js";
import "./esm-C5zIToiC.js";
import "./pythonUtils-BiVLWZ6g.js";
import "./types-Cg21S-St.js";
import "./util-BaEBV99n.js";
import "./fetch-D70iPJNm.js";
import "./cache-BNI_7DxT.js";
import "./genaiTracer-C6LxD3Ij.js";
import { t as OpenAiChatCompletionProvider } from "./chat-F6Hy65LQ.js";
import "./transform-kOrXspJM.js";
import "./openai-0a7Nnw31.js";
import "./util-CnHd9JAv.js";
import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-DAe6fo0x.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-C533C5Pc.js.map