UNPKG

@n1k1t/unit-generator

Version:

Coverage based unit tests AI generator

32 lines 1.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LlmProxyProvider = void 0; const openai_1 = require("@ai-sdk/openai"); const model_1 = require("./model"); class LlmProxyProvider extends model_1.LlmProvider { constructor() { super(...arguments); this.name = 'proxy'; this.tag = (0, openai_1.createOpenAI)({ apiKey: this.connection.key, baseURL: this.connection.url ?? 'none', })(this.model); } clone() { const clone = new LlmProxyProvider(this.model, { temperature: this.temperature, connection: this.connection, options: Object.assign({}, this.options), tools: Object.assign({}, this.tools), }); return clone; } static build(model, parameters) { return new LlmProxyProvider(model, { connection: parameters.connection, options: {}, }); } } exports.LlmProxyProvider = LlmProxyProvider; //# sourceMappingURL=proxy.js.map