Spaces:
Build error
Build error
up[dates
Browse files
app.py
CHANGED
|
@@ -10,11 +10,12 @@ import openai
|
|
| 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"
|
| 18 |
temperature=0.7,
|
| 19 |
max_tokens=256,
|
| 20 |
top_p=1,
|
|
|
|
| 10 |
all_documents = {}
|
| 11 |
|
| 12 |
def qa_gpt3(question, context):
|
| 13 |
+
print(question, context)
|
| 14 |
openai.api_key = st.secrets["openai_key"]
|
| 15 |
|
| 16 |
response = openai.Completion.create(
|
| 17 |
model="text-davinci-002",
|
| 18 |
+
prompt=f"Answer given the following context: {context}\n\nQuestion: {question}",
|
| 19 |
temperature=0.7,
|
| 20 |
max_tokens=256,
|
| 21 |
top_p=1,
|