Centralize constants
This commit is contained in:
parent
72ad571ff2
commit
a4da1ddd73
5 changed files with 24 additions and 19 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue