Skip to content

Commit

Permalink
Remove markdown code block from llm answer
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrelefevre committed Oct 15, 2024
1 parent b4b64c5 commit 16cc347
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions aggregator/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def _group_headlines(headlines):
],
)
message = completion.choices[0].message.content
message = message.replace("```", "").replace("json", "").strip()

groups = json.loads(message)
return groups
Expand Down

0 comments on commit 16cc347

Please sign in to comment.