"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.visionTool = visionTool;
const services_1 = require("../../services");
const types_1 = require("../../types");
async function visionTool(imageUrl, question, provider = "openai", model = types_1.Models.openai.GPT_4o) {
    const toolService = this instanceof services_1.ToolsService ? this : (0, services_1.services)().Tools;
    const { Clients } = toolService.getContext();
    const response = await Clients.createCompletion(provider, {
        model,
        max_tokens: 2500,
        messages: [
            {
                role: "user",
                content: [
                    { type: "text", text: question },
                    {
                        type: "image_url",
                        image_url: {
                            url: imageUrl,
                        },
                    },
                ],
            },
        ],
    });
    return response.choices[0].message.content;
}
//# sourceMappingURL=visionTool.js.map