Jacksuyu commited on
Commit
614d3ec
·
1 Parent(s): cd2f23f

fix: remove awkward generated problem statement copy

Browse files
lib/llm.ts CHANGED
@@ -3,14 +3,18 @@ import { generatedSpecSchema, type GeneratedSpec } from "@/lib/spec-schema";
3
 
4
  const openai = process.env.OPENAI_API_KEY ? new OpenAI({ apiKey: process.env.OPENAI_API_KEY }) : null;
5
 
6
- function fallbackSpec(rawInputText: string, platform?: string | null, targetUsers?: string | null): GeneratedSpec {
 
 
 
 
7
  const title = rawInputText.slice(0, 80) || "Community Idea";
8
- const audience = targetUsers?.trim() || "general users";
9
- const targetPlatform = platform?.trim() || "web";
10
 
11
  return {
12
  title,
13
- problem_statement: `Build a ${targetPlatform} product for ${audience} based on the submitted idea.`,
14
  tags: ["community", "spec"],
15
  features: [
16
  "Idea submission form with optional context fields",
 
3
 
4
  const openai = process.env.OPENAI_API_KEY ? new OpenAI({ apiKey: process.env.OPENAI_API_KEY }) : null;
5
 
6
+ function fallbackSpec(
7
+ rawInputText: string,
8
+ _platform?: string | null,
9
+ _targetUsers?: string | null,
10
+ ): GeneratedSpec {
11
  const title = rawInputText.slice(0, 80) || "Community Idea";
12
+ const problemStatement =
13
+ rawInputText.trim() || "Turn the submitted idea into a practical, low-friction software product.";
14
 
15
  return {
16
  title,
17
+ problem_statement: problemStatement,
18
  tags: ["community", "spec"],
19
  features: [
20
  "Idea submission form with optional context fields",
scripts/post_requirements_to_demandsolution.py CHANGED
@@ -200,8 +200,8 @@ def main() -> None:
200
 
201
  payload = {
202
  "raw_input_text": build_raw_input_text(item),
203
- "target_users": "People asking for practical productivity and workflow software tools",
204
- "platform": "Any",
205
  "constraints": "Prefer simple setup and low friction.",
206
  "source_tag": "_social_",
207
  "show_name": False,
 
200
 
201
  payload = {
202
  "raw_input_text": build_raw_input_text(item),
203
+ "target_users": "People who need practical productivity and workflow tools",
204
+ "platform": "Web",
205
  "constraints": "Prefer simple setup and low friction.",
206
  "source_tag": "_social_",
207
  "show_name": False,