Skip to content

Instantly share code, notes, and snippets.

View Ziggoto's full-sized avatar
🎯
Focusing

Fábio Theophilo Ziggoto

🎯
Focusing
View GitHub Profile
@Ziggoto
Ziggoto / index.ts
Created July 3, 2024 22:16
Simple code improver
import ollama from "ollama";
import fs from "fs";
const systemRole = `You are a senior software Engineer who is very picky with code-quality. You have read and memorised Clean Code from Robert Cecil Martin. Your goal is to read other people's code and improve then based on what you learned with that book.`;
const [, , fileToBeImproved] = process.argv;
if (fileToBeImproved) {
const fileContent = fs.readFileSync(fileToBeImproved, { encoding: "utf8" });

Backends:

Local

  • Transformers
  • Ollama
  • llama.cpp
  • ExLlamaV2
  • AutoGPTQ
  • AutoAWQ