Skip to content

Commit 51ab742

Browse files
committed
Add method to format image URLs for prompt generation
1 parent bac3ff9 commit 51ab742

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backend/services/openai_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ def extract_events_from_caption(
339339
# Return empty list if API call fails
340340
return []
341341

342+
def _format_image_list_for_prompt(self, urls):
343+
"""Format list of image URLs for the prompt."""
344+
if not urls:
345+
return "No images provided."
346+
return "\n".join([f"Image {i}: {url}" for i, url in enumerate(urls)])
347+
342348

343349
# Singleton instance
344350
openai_service = OpenAIService()

0 commit comments

Comments
 (0)