#!/usr/bin/env node
import "./chunk-BS0sO6YE.js";
import "./logger-BHK-IvoX.js";
import "./fetch-DosdWgS6.js";
import "./cloud-C9kfZ2hm.js";
import "./types-DEGWIbpc.js";
import "./cache-yJYq8tpE.js";
import "./util-DBUDMCjO.js";
import "./esm-Dvm9q3-2.js";
import "./pythonUtils-BPIMTFdP.js";
import "./genaiTracer-as_vZY-b.js";
import { t as OpenAiChatCompletionProvider } from "./chat-CCsVmcOt.js";
import "./transform-CqRcQELM.js";
import "./openai-D86NWRzF.js";
import "./util-D9m-bcmg.js";
import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-Cz4k9sia.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-Drr7-oXJ.js.map