Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/samples/demos/chatkit-integration/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ async def _update_thread_title(
context: The context dictionary.
"""
logger.info(f"Attempting to update thread title for thread: {thread.id}")

if not thread_items:
logger.debug("No thread items available for title generation")
return
Expand Down Expand Up @@ -589,7 +589,7 @@ async def upload_file(attachment_id: str, file: UploadFile = File(...)):

except Exception as e:
logger.error(f"Error uploading file for attachment {attachment_id}: {e}", exc_info=True)
return JSONResponse(status_code=500, content={"error": f"Failed to upload file: {str(e)}"})
return JSONResponse(status_code=500, content={"error": "Failed to upload file."})


@app.get("/preview/{attachment_id}")
Expand Down Expand Up @@ -620,7 +620,7 @@ async def preview_image(attachment_id: str):

except Exception as e:
logger.error(f"Error serving preview for attachment {attachment_id}: {e}", exc_info=True)
return JSONResponse(status_code=500, content={"error": str(e)})
return JSONResponse(status_code=500, content={"error": "Error serving preview for attachment."})


if __name__ == "__main__":
Expand Down
Loading