feat: rede_korrigieren.py -m/--model zur Modellwahl
Das Modell steckt in den Cache-Schlüsseln; ein anderes Modell rechnet neu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
19b6bbf5a2
commit
7bc5e93613
1 changed files with 48 additions and 3 deletions
|
|
@ -355,7 +355,7 @@ def build_paragraphs(text, parts_dir):
|
|||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Korrigiert eine automatische Abschrift einer deutschen Rede "
|
||||
f"mit {MODEL} über Ollama."
|
||||
"mit einem lokalen Sprachmodell über Ollama."
|
||||
)
|
||||
parser.add_argument(
|
||||
"-i", "--input", required=True, type=Path,
|
||||
|
|
@ -369,6 +369,9 @@ def parse_args():
|
|||
"-g", "--glossar", type=Path,
|
||||
help="Glossar: ein Begriff pro Zeile oder feste Ersetzung „falsch => richtig“",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-m", "--model", default=MODEL, help=f"Ollama-Modell (Standard: {MODEL})"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if not args.input.is_file():
|
||||
|
|
@ -383,7 +386,12 @@ def parse_args():
|
|||
|
||||
|
||||
def main():
|
||||
global MODEL
|
||||
args = parse_args()
|
||||
# All model calls and cache keys read MODEL, so a different model never
|
||||
# reuses cached parts of another
|
||||
MODEL = args.model
|
||||
print(f"Modell: {MODEL}")
|
||||
source = args.input
|
||||
target = args.output
|
||||
parts_dir = target.with_suffix(".parts")
|
||||
|
|
|
|||
Loading…
Reference in a new issue