Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -104,7 +104,7 @@ def _ai_should_extract_painpoint(client: Mistral, title: str, selftext: str) ->
|
|
| 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 |
|
| 110 |
user_text = (
|
|
@@ -154,8 +154,7 @@ def _ai_generate_title_summary(client: Mistral, title: str, selftext: str) -> Pa
|
|
| 154 |
|
| 155 |
return resp.choices[0].message.parsed # type: ignore[return-value, attr-defined]
|
| 156 |
|
| 157 |
-
|
| 158 |
-
@mcp.tool()
|
| 159 |
def scan_mistralai_pain_points(limit: int = 50, min_score: int = 0) -> List[PainPoint]:
|
| 160 |
"""
|
| 161 |
Fetch recent posts from r/MistralAI and extract a list of pain points using a two-step AI flow:
|
|
|
|
| 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. But always return YES if it's someone wishing to switch from CHATGPT to Le Chat"
|
| 108 |
)
|
| 109 |
|
| 110 |
user_text = (
|
|
|
|
| 154 |
|
| 155 |
return resp.choices[0].message.parsed # type: ignore[return-value, attr-defined]
|
| 156 |
|
| 157 |
+
@mcp.tool(description="Scan r/MistralAI for problem-like posts using AI and return extracted pain points.")
|
|
|
|
| 158 |
def scan_mistralai_pain_points(limit: int = 50, min_score: int = 0) -> List[PainPoint]:
|
| 159 |
"""
|
| 160 |
Fetch recent posts from r/MistralAI and extract a list of pain points using a two-step AI flow:
|