UNPKG

@n1k1t/unit-generator

Version:

Coverage based unit tests AI generator

37 lines 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LlmAnthropicProvider = void 0; const anthropic_1 = require("@ai-sdk/anthropic"); const model_1 = require("./model"); class LlmAnthropicProvider extends model_1.LlmProvider { constructor() { super(...arguments); this.name = 'anthropic'; this.tag = (0, anthropic_1.createAnthropic)({ apiKey: this.connection.key, baseURL: this.connection.url, })(this.model); } clone() { const clone = new LlmAnthropicProvider(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 LlmAnthropicProvider(model, { ...parameters, options: parameters.options ?? { thinking: { type: 'enabled', budgetTokens: 1024, }, }, }); } } exports.LlmAnthropicProvider = LlmAnthropicProvider; //# sourceMappingURL=anthropic.js.map