Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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
|
| 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:
|