Spaces:
Paused
Paused
Commit
·
07984b4
1
Parent(s):
939dab1
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ from langchain.llms import OpenAI
|
|
12 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
13 |
import openai
|
14 |
|
|
|
|
|
15 |
def proper_query(query):
|
16 |
prompt = f"The following text is a user's question: {query}\n\nHow should that question be modified so that it uses correct language?\nReturn the question in the same language.\nCorrected Question:"
|
17 |
response = openai.Completion.create(
|
|
|
12 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
13 |
import openai
|
14 |
|
15 |
+
os.environ["OPENAI_API_KEY"] = 'sk-'+ os.environ["OPENAI_API_KEY"]
|
16 |
+
|
17 |
def proper_query(query):
|
18 |
prompt = f"The following text is a user's question: {query}\n\nHow should that question be modified so that it uses correct language?\nReturn the question in the same language.\nCorrected Question:"
|
19 |
response = openai.Completion.create(
|