Spaces:
Running
Running
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(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
const title = rawInputText.slice(0, 80) || "Community Idea";
|
| 8 |
-
const
|
| 9 |
-
|
| 10 |
|
| 11 |
return {
|
| 12 |
title,
|
| 13 |
-
problem_statement:
|
| 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
|
| 204 |
-
"platform": "
|
| 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,
|