To use the LangChain Q&A System, follow the steps below:
- Clone the repository using the following command:
git clone https://github.com/tanav2202/langchain-gpt.git
- Navigate to the project directory:
cd langchain-gpt
- Create your python environment
python -m venv [name of env]
- Activate your environment
source [name of env]/bin/activate
(Different for windows)
- Install the required dependencies by running the following command:
pip install -r requirements.txt
To use the LangChain Q&A System, you need to provide an API key from OpenAI. Follow these steps to get started:
-
Sign up or log in to your OpenAI account.
-
Generate an API key if you haven't already. Make sure you have the necessary permissions to access the GPT-3.5 language model.
-
Open the
test.py
file in a text editor. -
Locate the line of code that sets the API key:
os.environ["OPENAI_API_KEY"] = "<INSERT API KEY>"
-
Replace with your actual API key from OpenAI.
-
Save the test.py file.
-
Run the test.py file using the following command:
python test.py
- The program will prompt you to enter a question. Type your question and press Enter.
- To exit press
q
The project is licensed under the MIT License. Feel free to use and modify the code for your own purposes.
The LangChain GPT project is an open-source project and not affiliated with OpenAI. The project uses the OpenAI GPT-3.5 language model, but any issues or questions regarding the language model itself should be directed to OpenAI.