import "./chunk-BYW8Mqxw.js";
import "./logger-CG0EzzgN.js";
import "./esm-CmTf3hBM.js";
import "./pythonUtils-WlAZZh61.js";
import "./fetch-76MmeOrp.js";
import "./util-fDBYF1BX.js";
import "./types-WiOVd3WR.js";
import "./cache-CLcYNgLM.js";
import { t as OpenAiChatCompletionProvider } from "./chat-CL3pb0mO.js";
import "./openai-DXNkiUHk.js";
import { t as OpenAiEmbeddingProvider } from "./embedding-CG4CnfHr.js";
import { t as OpenAiCompletionProvider } from "./completion-BbADXf5y.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-BTNZXHjf.js.map