"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "FireworksEmbedding", {
    enumerable: true,
    get: function() {
        return FireworksEmbedding;
    }
});
const _env = require("@llamaindex/env");
const _OpenAIEmbedding = require("./OpenAIEmbedding.js");
class FireworksEmbedding extends _OpenAIEmbedding.OpenAIEmbedding {
    constructor(init){
        const { apiKey = (0, _env.getEnv)("FIREWORKS_API_KEY"), additionalSessionOptions = {}, model = "nomic-ai/nomic-embed-text-v1.5", ...rest } = init ?? {};
        if (!apiKey) {
            throw new Error("Set Fireworks Key in FIREWORKS_API_KEY env variable");
        }
        additionalSessionOptions.baseURL = additionalSessionOptions.baseURL ?? "https://api.fireworks.ai/inference/v1";
        super({
            apiKey,
            additionalSessionOptions,
            model,
            ...rest
        });
    }
}
