profoz commited on
Commit
05910f2
·
1 Parent(s): 1fef6a8
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,12 +9,12 @@ import openai
9
 
10
  all_documents = {}
11
 
12
- def qa_gpt3(query, context):
13
  openai.api_key = st.secrets["openai_key"]
14
 
15
  response = openai.Completion.create(
16
  model="text-davinci-002",
17
- prompt=f"Given this context, answer a question. If you cannot find an answer say \"Unknown\".\n\nContext: {context}\n\nQuestion: {query}",
18
  temperature=0.7,
19
  max_tokens=256,
20
  top_p=1,
 
9
 
10
  all_documents = {}
11
 
12
+ def qa_gpt3(question, context):
13
  openai.api_key = st.secrets["openai_key"]
14
 
15
  response = openai.Completion.create(
16
  model="text-davinci-002",
17
+ prompt=f"Given this context, answer a question. If you cannot find an answer say \"Unknown\".\n\nContext: {context}\n\nQuestion: {question}",
18
  temperature=0.7,
19
  max_tokens=256,
20
  top_p=1,