daddel80 / OpenAI-Text-Search-Tools

Python tools leveraging OpenAI API to search and retrieve answers from text files and directories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenAI Text Search Tools

This repository contains two Python programs that utilize the OpenAI API to search for answers to user-provided questions within text and PDF files.

Programs

  1. OpenAI Text File Searcher: Searches for answers within a single text file.
  2. OpenAI Directory Searcher: Searches for answers within multiple text and PDF files in a specified directory.

Installation

  1. Clone this repository or download the source code.
  2. Install the required dependencies by running pip install -r requirements.txt.

Usage

OpenAI Text File Searcher

  1. Set your OpenAI API key in the openai_text_file_searcher.py file.
  2. Run the script using python openai_text_file_searcher.py.
  3. When prompted, enter your question.
  4. The script will search the specified text file for an answer using the OpenAI API and display the results.

OpenAI Directory Searcher

  1. Set your OpenAI API key in the openai_directory_searcher.py file.
  2. Run the script using python openai_directory_searcher.py.
  3. When prompted, enter your question.
  4. The script will search all text and PDF files within the specified directory for an answer using the OpenAI API and display the results.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Python tools leveraging OpenAI API to search and retrieve answers from text files and directories.


Languages

Language:Python 100.0%