8000 GitHub - jindanza/chat_w_gemini_pdf: This project allows you to have interactive conversations with PDF documents using Google's Gemini AI for natural language processing and understanding.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This project allows you to have interactive conversations with PDF documents using Google's Gemini AI for natural language processing and understanding.

Notifications You must be signed in to change notification settings

jindanza/chat_w_gemini_pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat with a PDF

This project allows you to have interactive conversations with PDF documents using Google's Gemini AI for natural language processing and understanding.

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • Google AI Studio account (for Gemini API key)
  • PDF documents you want to interact with

Setup

  1. Set up environment variables: Create a .env file in the root directory with the following content:
GEMINI_API_KEY=your_api_key_here

Getting Your Gemini API Key

  1. Go to Google AI Studio
  2. Sign in with your Google account
  3. Click on "Get API key" or "Create API key"
  4. Copy the generated API key
  5. Paste it into your .env file, replacing your_api_key_here

Running the Project

You can run the project in two ways:

  1. Using npm scripts:
# Start the chat with a PDF file
npm run chat path/to/your/document.pdf

# Or with a custom prompt
npm run chat path/to/your/document.pdf "Your custom prompt here"
  1. Using tsx directly:
# Start the chat with a PDF file
npx tsx src/index.ts path/to/your/document.pdf

# Or with a custom prompt
npx tsx src/index.ts path/to/your/document.pdf "Your custom prompt here"

Once started, you can:

  • Ask questions about the PDF content
  • Type 'exit' to quit the chat
  • The AI will respond based on the content of your PDF

Features

  • PDF document upload and processing
  • Interactive chat interface
  • Context-aware responses using Gemini AI
  • Real-time conversation history
  • Custom prompt support

Project Structure

chat-with-a-pdf/
├── src/              # Source files
│   └── index.ts      # Main application code
├── .env             # Environment variables
├── package.json     # Project dependencies and scripts
└── README.md        # Project documentation

License

This project is licensed under the ISC License - see the LICENSE file for details.

About

This project allows you to have interactive conversations with PDF documents using Google's Gemini AI for natural language processing and understanding.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0