Spaces:
Runtime error
Runtime error
Commit
·
829a3e8
1
Parent(s):
96fb8a1
Language Agnostic
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ docsearch = FAISS.from_texts(texts, embeddings)
|
|
33 |
|
34 |
|
35 |
def proper_query(query):
|
36 |
-
prompt = f"
|
37 |
response = openai.Completion.create(
|
38 |
engine="text-davinci-003", prompt=prompt, max_tokens=1000, temperature=0.2)
|
39 |
return response.choices[0].text
|
|
|
33 |
|
34 |
|
35 |
def proper_query(query):
|
36 |
+
prompt = f"The following text is a users' question: {query}\n\nHow should that question be modified so that it uses correct language?\nReturn the question in the same language.\nCorrected Question:"
|
37 |
response = openai.Completion.create(
|
38 |
engine="text-davinci-003", prompt=prompt, max_tokens=1000, temperature=0.2)
|
39 |
return response.choices[0].text
|