Jofthomas commited on
Commit
16ef626
·
verified ·
1 Parent(s): cbe97db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -103,7 +103,7 @@ def _ai_should_extract_painpoint(client: Mistral, title: str, selftext: str) ->
103
  """Use Mistral structured output to decide if the post is a pain point."""
104
  content = (
105
  "You are a strict classifier deciding if a Reddit post describes a concrete pain point "
106
- "about Mistral AI usage (APIs, models, SDKs, deployment, errors, performance, limitations).\n\n"
107
  "Return JSON with decision YES/NO and a brief reason."
108
  )
109
 
@@ -126,7 +126,7 @@ def _ai_should_extract_painpoint(client: Mistral, title: str, selftext: str) ->
126
 
127
  parsed: PainPointDecision = resp.choices[0].message.parsed # type: ignore[attr-defined]
128
  print(f"AI classify: {parsed.decision}")
129
- return True
130
 
131
 
132
  def _ai_generate_title_summary(client: Mistral, title: str, selftext: str) -> PainPointGenerated:
 
103
  """Use Mistral structured output to decide if the post is a pain point."""
104
  content = (
105
  "You are a strict classifier deciding if a Reddit post describes a concrete pain point "
106
+ "about Mistral AI documentation, mainly to know if they are missing information on how to achieve a specific goal.\n\n"
107
  "Return JSON with decision YES/NO and a brief reason."
108
  )
109
 
 
126
 
127
  parsed: PainPointDecision = resp.choices[0].message.parsed # type: ignore[attr-defined]
128
  print(f"AI classify: {parsed.decision}")
129
+ return parsed.decision == "YES"
130
 
131
 
132
  def _ai_generate_title_summary(client: Mistral, title: str, selftext: str) -> PainPointGenerated: