From 328402acdda73e6f0b27030f882a9f23e14019db Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 5 Jun 2025 17:58:18 +0200 Subject: [PATCH] Ensure clarity in what to pass to improve function --- prophet/app.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/prophet/app.py b/prophet/app.py index 07d0298..9f3fd62 100644 --- a/prophet/app.py +++ b/prophet/app.py @@ -77,15 +77,14 @@ def load_existing_improvements() -> list[Improvement]: print(f"Error loading file {fname}: {e}") return improvements - -def improve_with_groq(original: str) -> str: +def improve_with_groq(original_content: str) -> str: client = Groq(api_key=os.getenv("GROQ_API_KEY", "NO_API_KEY_FOUND")) suggestions = client.chat.completions.create( messages=[ { "role": "user", - "content": f"Improve on the following satirical headline. The headline should be funny, can involve current political events and should have an edge to it. Print only the suggestions, with one suggestion on each line.\nOriginal: '{original}'", + "content": f"Improve on the following satirical headline. The headline should be funny, can involve current political events and should have an edge to it. Print only the suggestions, with one suggestion on each line.\nOriginal: '{original_content}'", } ], model="llama-3.3-70b-versatile",