Giter Club home page Giter Club logo

qa_research_paper's Introduction

OpenAI Research Paper Q&A Python Notebook

This repository contains a Python notebook for asking questions from OpenAI research papers using the OpenAI API. The notebook uses the OpenAI API to retrieve relevant passages from the research paper for a given question, and then uses a language model to generate an answer based on the retrieved passages.

Getting Started

To use this notebook, you'll need an OpenAI API key. You can sign up for an API key on the OpenAI website. Once you have an API key, you can set it as an environment variable in your notebook like so:

import openai
from dotenv import load_dotenv

# Load the environment variables from the .env file
load_dotenv()

# Get the value of the API key
openai_api = os.getenv('API_KEY')
openai.api_key=openai_api

You'll also need to install the required Python packages, which are listed in the requirements.txt file. You can install them using pip:

pip install -r requirements.txt

Once you have your API key set and the required packages installed, you can open the notebook and start asking questions!

Usage

The notebook contains a sample question and code to retrieve the relevant passages from a research paper for that question. To ask your own questions, simply replace the sample question with your own question and run the code.

The notebook also contains code to generate an answer from the retrieved passages. By default, the notebook uses a pre-trained language model provided by OpenAI, but you can use your own language model by replacing the model variable with your own language model.

Contributing

If you find a bug or would like to suggest a feature, please open an issue on the GitHub repository. Pull requests are also welcome!

qa_research_paper's People

Contributors

chamodperera avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.