debug: log full transcript content for debugging
Browse filesAdded logging of full transcript text to inspect why AI fails
to extract answer. Logs will show first 200 chars for API,
full transcript for Whisper fallback.
Co-Authored-By: Claude <noreply@anthropic.com>
- src/tools/youtube.py +4 -0
src/tools/youtube.py
CHANGED
|
@@ -356,6 +356,8 @@ def youtube_transcript(url: str) -> Dict[str, Any]:
|
|
| 356 |
|
| 357 |
if result["success"]:
|
| 358 |
logger.info(f"Transcript retrieved via API: {len(result['text'])} characters")
|
|
|
|
|
|
|
| 359 |
return result
|
| 360 |
|
| 361 |
# Fallback to audio transcription (slow but works)
|
|
@@ -364,6 +366,8 @@ def youtube_transcript(url: str) -> Dict[str, Any]:
|
|
| 364 |
|
| 365 |
if result["success"]:
|
| 366 |
logger.info(f"Transcript retrieved via Whisper: {len(result['text'])} characters")
|
|
|
|
|
|
|
| 367 |
else:
|
| 368 |
logger.error(f"All transcript methods failed for video: {video_id}")
|
| 369 |
|
|
|
|
| 356 |
|
| 357 |
if result["success"]:
|
| 358 |
logger.info(f"Transcript retrieved via API: {len(result['text'])} characters")
|
| 359 |
+
# Log transcript to file for debugging
|
| 360 |
+
logger.info(f"Transcript content: {result['text'][:200]}...")
|
| 361 |
return result
|
| 362 |
|
| 363 |
# Fallback to audio transcription (slow but works)
|
|
|
|
| 366 |
|
| 367 |
if result["success"]:
|
| 368 |
logger.info(f"Transcript retrieved via Whisper: {len(result['text'])} characters")
|
| 369 |
+
# Log full transcript for debugging
|
| 370 |
+
logger.info(f"Full transcript: {result['text']}")
|
| 371 |
else:
|
| 372 |
logger.error(f"All transcript methods failed for video: {video_id}")
|
| 373 |
|