import OpenAI from "./OpenAI.js";
class Together extends OpenAI {
    static providerName = "together";
    static defaultOptions = {
        apiBase: "https://api.together.xyz/v1/",
    };
    static MODEL_IDS = {
        "codellama-7b": "togethercomputer/CodeLlama-7b-Instruct",
        "codellama-13b": "togethercomputer/CodeLlama-13b-Instruct",
        "codellama-34b": "togethercomputer/CodeLlama-34b-Instruct",
        "codellama-70b": "codellama/CodeLlama-70b-Instruct-hf",
        "llama3-8b": "meta-llama/Llama-3-8b-chat-hf",
        "llama3-70b": "meta-llama/Llama-3-70b-chat-hf",
        "llama2-7b": "togethercomputer/llama-2-7b-chat",
        "llama2-13b": "togethercomputer/llama-2-13b-chat",
        "llama2-70b": "togethercomputer/llama-2-70b-chat",
        "mistral-7b": "mistralai/Mistral-7B-Instruct-v0.1",
        "mistral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1",
        "phind-codellama-34b": "Phind/Phind-CodeLlama-34B-v2",
        "wizardcoder-34b": "WizardLM/WizardCoder-Python-34B-V1.0",
    };
    _getModelName(model) {
        return Together.MODEL_IDS[model] || this.model;
    }
    _convertArgs(options, messages) {
        const finalOptions = super._convertArgs(options, messages);
        finalOptions.model = this._getModelName(options.model);
        return finalOptions;
    }
    async *_streamComplete(prompt, options) {
        for await (const chunk of this._legacystreamComplete(prompt, options)) {
            yield chunk;
        }
    }
}
export default Together;
