Giter Site home page Giter Site logo

langchain-qa-ipad-product's Introduction

Question-Answering with NotionDB based on LangChain

πŸ€–Ask questions to iPad product in natural language based on NotionDBπŸ€–

πŸ’ͺ Built with LangChain

🌲 Environment Setup (Local)

In order to set your environment up to run the code here, first install all requirements:

pip install -r requirements.txt

Then set your OpenAI API key. OpenAI API should work only if you set your paid payment methods.

export OPENAI_API_KEY=....

πŸ“Š Example Data

This repo uses the iPad Technical Specification Product created on May, 08 2023/

πŸ’¬ Ask a question

In order to ask a question, run a command like:

python qa.py `What is iPad?`

You can switch out What is iPad? for any question of your like, such as What is the lates iPad version?

πŸš€ Code to deploy on StreamLit

The code to run the StreamLit app is in main.py. add this code before load the chain section in the main.py file before deploy it to streamlit.

openai.api_key=st.secrets["api"]

replace chain variable with these one:

chain = VectorDBQAWithSourcesChain.from_llm(llm=OpenAI(temperature=0, openai_api_key=openai.api_key), vectorstore=store)

langchain-qa-ipad-product's People

Contributors

nurindahpratiwi avatar

Watchers

 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.