Skip to content

Fix: Address issue #114 Add a new notebook to have extended conversat… #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbeeredd04
Copy link

@sbeeredd04 sbeeredd04 commented Jun 8, 2025

Add Multi-Turn PDF Understanding Notebook

Overview

Added a new Jupyter notebook that demonstrates how to have extended conversations with Claude about PDF documents, maintaining context across multiple exchanges. This implementation allows for follow-up questions and deeper exploration of PDF content through a conversational interface. Fixes #114

Key Features

  • Interactive Chat Interface: Built-in conversation loop with commands like 'quit', 'history', and 'clear'
  • PDF Memory: PDF is uploaded once and referenced throughout the conversation
  • Context Preservation: Maintains conversation history for coherent multi-turn interactions
  • Programmatic Mode: Includes a demonstration of automated PDF analysis with predefined question sequences

Technical Details

  • Uses Claude 3.5 Sonnet with PDF beta support
  • Implements proper error handling for PDF loading and API interactions
  • Includes environment variable support for API key management
  • Maintains conversation context while optimizing for API payload size

Usage Example

# Load and start conversation
pdf_base64 = load_pdf_as_base64("path/to/pdf")
start_pdf_conversation(pdf_base64)

# Or run automated analysis
programmatic_history = demonstrate_programmatic_conversation(pdf_base64)

Documentation

Includes comprehensive documentation with:

  • Setup instructions
  • Best practices for PDF conversations
  • Use case examples
  • Advanced features and tips

… conversations with Claude about PDF documents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How can I create a multi-turn chatbot on a PDF?
2 participants