fix: Fix prompt

This commit is contained in:
Gal 2025-02-10 21:27:13 +01:00
parent 638c38c03b
commit 9c4e320063
Signed by: gal
GPG Key ID: F035BC65003BC00B
1 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,8 @@ class AnthropicClient:
"""Get card information from Anthropic API"""
prompt = f"""
Create an Anki card for the German word "{word}" (source: {source}).
Return the response in the following JSON format:
IMPORTANT: Respond with ONLY the JSON object, no other text.
Format:
{{
"german_word": "",
"part_of_speech": "",
@ -36,7 +37,7 @@ class AnthropicClient:
model=self.model,
max_tokens=self.max_tokens,
temperature=self.temperature,
system="You are a helpful German language teaching assistant. Always respond with valid JSON.",
system="You are a helpful German language teaching assistant. Return ONLY valid JSON without any additional text or explanations.",
messages=[
{
"role": "user",