"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "FireworksLLM", {
    enumerable: true,
    get: function() {
        return FireworksLLM;
    }
});
const _env = require("@llamaindex/env");
const _openai = require("./openai.js");
class FireworksLLM extends _openai.OpenAI {
    constructor(init){
        const { apiKey = (0, _env.getEnv)("FIREWORKS_API_KEY"), additionalSessionOptions = {}, model = "accounts/fireworks/models/mixtral-8x7b-instruct", ...rest } = init ?? {};
        if (!apiKey) {
            throw new Error("Set Fireworks API Key in FIREWORKS_AI_KEY env variable");
        }
        additionalSessionOptions.baseURL = additionalSessionOptions.baseURL ?? "https://api.fireworks.ai/inference/v1";
        super({
            apiKey,
            additionalSessionOptions,
            model,
            ...rest
        });
    }
}
