fix: Fix prompt
This commit is contained in:
parent
638c38c03b
commit
9c4e320063
|
@ -16,7 +16,8 @@ class AnthropicClient:
|
||||||
"""Get card information from Anthropic API"""
|
"""Get card information from Anthropic API"""
|
||||||
prompt = f"""
|
prompt = f"""
|
||||||
Create an Anki card for the German word "{word}" (source: {source}).
|
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": "",
|
"german_word": "",
|
||||||
"part_of_speech": "",
|
"part_of_speech": "",
|
||||||
|
@ -36,7 +37,7 @@ class AnthropicClient:
|
||||||
model=self.model,
|
model=self.model,
|
||||||
max_tokens=self.max_tokens,
|
max_tokens=self.max_tokens,
|
||||||
temperature=self.temperature,
|
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=[
|
messages=[
|
||||||
{
|
{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
|
Loading…
Reference in New Issue