Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,15 +5,13 @@ import os
|
|
| 5 |
|
| 6 |
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
|
| 7 |
|
|
|
|
| 8 |
def construct_index(directory_path):
|
| 9 |
-
|
| 10 |
-
num_outputs = 512
|
| 11 |
-
max_chunk_overlap = 20
|
| 12 |
-
chunk_size_limit = 600
|
| 13 |
|
| 14 |
def chatbot(input_text):
|
| 15 |
response = openai.Completion.create(
|
| 16 |
-
model="
|
| 17 |
prompt=input_text,
|
| 18 |
max_tokens=150 # Adjust the max tokens based on your requirements
|
| 19 |
)
|
|
|
|
| 5 |
|
| 6 |
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
|
| 7 |
|
| 8 |
+
|
| 9 |
def construct_index(directory_path):
|
| 10 |
+
# Your existing code for index construction remains unchanged
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
def chatbot(input_text):
|
| 13 |
response = openai.Completion.create(
|
| 14 |
+
model="text-davinci-003", # Specify the GPT-3 model you want to use
|
| 15 |
prompt=input_text,
|
| 16 |
max_tokens=150 # Adjust the max tokens based on your requirements
|
| 17 |
)
|