import "./chunk-FhC4c-0y.js";
import "./logger-q5I8CByj.js";
import "./esm-D40XsWlR.js";
import "./pythonUtils-eNq6Wsfr.js";
import "./types-l7snZgzv.js";
import "./util-07lmo96G.js";
import "./fetch-Cn7G4hKv.js";
import "./cache-CkRahBA6.js";
import "./genaiTracer-CNawybn-.js";
import { t as OpenAiChatCompletionProvider } from "./chat-Cz8uiybK.js";
import "./transform-yRqaT_HG.js";
import "./openai-CQozD_Ef.js";
import "./util-CD-FiF5u.js";
import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-D25ktKRj.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-DzmOPVaB.js.map