andreinigo commited on
Commit
829a3e8
·
1 Parent(s): 96fb8a1

Language Agnostic

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -33,7 +33,7 @@ docsearch = FAISS.from_texts(texts, embeddings)
33
 
34
 
35
  def proper_query(query):
36
- prompt = f"El siguiente texto es una pregunta en español: {query}\n\n¿Cómo debería ser la pregunta para que sea correcta en español?\nPregunta corregida:"
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