fixed output format
Browse files
app.py
CHANGED
|
@@ -21,8 +21,8 @@ def read_repo_files(repo_dir):
|
|
| 21 |
try:
|
| 22 |
with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
|
| 23 |
content = f.read()
|
| 24 |
-
if len(content) >
|
| 25 |
-
content = content[:
|
| 26 |
repo_content.append(f"{filename}:\n{content}")
|
| 27 |
except:
|
| 28 |
pass
|
|
@@ -47,7 +47,7 @@ def build_structured_prompt(user_prompt, repo_data=None):
|
|
| 47 |
"Use emojis naturally to increase engagement"
|
| 48 |
]
|
| 49 |
},
|
| 50 |
-
"output_format": "Return only the final LinkedIn post text. No explanations
|
| 51 |
}
|
| 52 |
|
| 53 |
structured_prompt = {
|
|
|
|
| 21 |
try:
|
| 22 |
with open(filepath, "r", encoding="utf-8", errors="ignore") as f:
|
| 23 |
content = f.read()
|
| 24 |
+
if len(content) > 3000:
|
| 25 |
+
content = content[:3000]
|
| 26 |
repo_content.append(f"{filename}:\n{content}")
|
| 27 |
except:
|
| 28 |
pass
|
|
|
|
| 47 |
"Use emojis naturally to increase engagement"
|
| 48 |
]
|
| 49 |
},
|
| 50 |
+
"output_format": "Return only the final LinkedIn post text. No explanations and it should be in txt not md or other formats"
|
| 51 |
}
|
| 52 |
|
| 53 |
structured_prompt = {
|