Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,8 +16,9 @@ def construct_index(directory_path):
|
|
| 16 |
prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
|
| 17 |
|
| 18 |
# Initialize the LLM predictor with an updated model name if available
|
| 19 |
-
|
| 20 |
-
|
|
|
|
| 21 |
# Load documents from the directory
|
| 22 |
documents = SimpleDirectoryReader(directory_path).load_data()
|
| 23 |
|
|
|
|
| 16 |
prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
|
| 17 |
|
| 18 |
# Initialize the LLM predictor with an updated model name if available
|
| 19 |
+
#llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0.7, model_name="gpt-4", max_tokens=num_outputs)) # Updated to GPT-4 or latest available model
|
| 20 |
+
llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0.7, model_name="gpt-3.5-turbo", max_tokens=num_outputs))
|
| 21 |
+
|
| 22 |
# Load documents from the directory
|
| 23 |
documents = SimpleDirectoryReader(directory_path).load_data()
|
| 24 |
|