We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2f4274 commit e8b0fc1Copy full SHA for e8b0fc1
1 file changed
server/api/views/uploadFile/title.py
@@ -58,6 +58,6 @@ def summarize_pdf(pdf: fitz.Document) -> str:
58
prompt = "Please provide a title for this document. The title should be less than 256 characters and will be displayed on a webpage."
59
response = openAIServices.openAI(
60
first_page_content, prompt, model='gpt-4o', temp=0.0)
61
- title = response.choices[0].message.content.strip().strip('"').strip("'")
+ title = response.strip().strip('"').strip("'")
62
# Truncate to fit UploadFile model's max_length=255 title field as a final safeguard
63
return title[:255]
0 commit comments