UNPKG

llm-commit

Version:

Turns diffs into concise, readable git commit messages

25 lines 1.21 kB
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; import { config } from 'dotenv'; config(); import { anthropic } from '@ai-sdk/anthropic'; import { genCommitMessage } from './genMessage'; import { join } from 'path'; import { DEFAULT_TOKENS } from './constants'; const main = () => __awaiter(void 0, void 0, void 0, function* () { const model = anthropic('claude-3-7-sonnet-latest'); yield genCommitMessage({ model, maxTokens: DEFAULT_TOKENS, outPath: join('outputs', model.modelId + '.json') }); }); main(); //# sourceMappingURL=index.js.map