Centralize constants

This commit is contained in:
Thales Maciel 2026-02-24 13:45:31 -03:00
parent 72ad571ff2
commit a4da1ddd73
No known key found for this signature in database
GPG key ID: 33112E6833C34679
5 changed files with 24 additions and 19 deletions

View file

@ -6,11 +6,12 @@ import os
import sys
import urllib.request
from dataclasses import dataclass
from pathlib import Path
from typing import Any, Callable, cast
from llama_cpp import Llama, llama_cpp as llama_cpp_lib # type: ignore[import-not-found]
from constants import LLM_LANGUAGE, MODEL_DIR, MODEL_NAME, MODEL_PATH, MODEL_URL
SYSTEM_PROMPT = (
"You are an amanuensis. Rewrite the user's dictated text into clean, grammatical prose.\n\n"
@ -26,14 +27,6 @@ SYSTEM_PROMPT = (
" - \"let's ask Bob, I mean Janice, let's ask Janice\" -> \"let's ask Janice\"\n"
)
MODEL_NAME = "Llama-3.2-3B-Instruct-Q4_K_M.gguf"
MODEL_URL = (
"https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/"
"Llama-3.2-3B-Instruct-Q4_K_M.gguf"
)
MODEL_DIR = Path.home() / ".cache" / "lel" / "models"
MODEL_PATH = MODEL_DIR / MODEL_NAME
class LlamaProcessor:
def __init__(self, verbose=False):