Strip returned title and summary suggestions
This commit is contained in:
parent
85a06963b8
commit
83ca6613fb
1 changed files with 2 additions and 2 deletions
|
|
@ -116,7 +116,7 @@ def rewrite_title_with_groq(original_content: str) -> str:
|
||||||
winner_str = winner.choices[0].message.content
|
winner_str = winner.choices[0].message.content
|
||||||
if not winner_str:
|
if not winner_str:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
return winner_str
|
return winner_str.strip(" \"'")
|
||||||
|
|
||||||
|
|
||||||
def rewrite_summary_with_groq(orig: Original, improved_title: str) -> str:
|
def rewrite_summary_with_groq(orig: Original, improved_title: str) -> str:
|
||||||
|
|
@ -135,7 +135,7 @@ def rewrite_summary_with_groq(orig: Original, improved_title: str) -> str:
|
||||||
if not summary_str:
|
if not summary_str:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
print("Improved summary", summary_str)
|
print("Improved summary", summary_str)
|
||||||
return summary_str
|
return summary_str.strip(" \"'")
|
||||||
|
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue