Configured helper
Browse files- langchain_helper.py +11 -0
langchain_helper.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Import the necessary libraries needed for the operation
|
| 2 |
+
import os
|
| 3 |
+
from langchain.llms import OpenAI
|
| 4 |
+
from langchain.prompts import PromptTemplate
|
| 5 |
+
from langchain.chains import LLMChain
|
| 6 |
+
from langchain.chains import SequentialChain
|
| 7 |
+
from secret_key import openapi_key
|
| 8 |
+
|
| 9 |
+
# Reading the OPEN API KEY
|
| 10 |
+
os.environ['OPENAI_API_KEY'] = openapi_key
|
| 11 |
+
|