"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Ollama = exports.LANGUAGE_MODEL_NAME = void 0;
const ollama_1 = require("@langchain/ollama");
const tools_1 = require("../../tools");
const AbstractLanguageModel_1 = require("../AbstractLanguageModel");
const LANGUAGE_MODEL_NAME = "llm.ollama";
exports.LANGUAGE_MODEL_NAME = LANGUAGE_MODEL_NAME;
class Ollama extends AbstractLanguageModel_1.AbstractLanguageModel {
    constructor(params, voice, telephonyContext) {
        const model = new ollama_1.ChatOllama({
            ...params
        }).bind({
            tools: params.tools.map(tools_1.convertToolToOpenAITool)
        });
        super({
            ...params,
            model
        }, voice, telephonyContext);
    }
}
exports.Ollama = Ollama;
