Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
-
#
|
2 |
|
3 |
# This version added saving chat history to a log file (need persist data from a space to a dataset)
|
4 |
# Updated the GPT model to gpt-4
|
5 |
# Add timestamp and ip address
|
|
|
6 |
|
7 |
# 2/23/2024
|
8 |
# This version uses different method in llama index to define llm model
|
@@ -41,7 +42,7 @@ session_id = uuid4()
|
|
41 |
# deprecated
|
42 |
storage_context = StorageContext.from_defaults(persist_dir='./')
|
43 |
# gpt-3.5_turbo is the current default model
|
44 |
-
Settings.llm = OpenAI(temperature=0.5, model="gpt-
|
45 |
#service_context = ServiceContext.from_defaults(llm=llm_predictor)
|
46 |
#index = load_index_from_storage(storage_context, service_context=service_context)
|
47 |
index = load_index_from_storage(storage_context)
|
|
|
1 |
+
# 5/1/2024
|
2 |
|
3 |
# This version added saving chat history to a log file (need persist data from a space to a dataset)
|
4 |
# Updated the GPT model to gpt-4
|
5 |
# Add timestamp and ip address
|
6 |
+
# upgrade llama-index to version 0.10: migrate from ServiceContext to Settings
|
7 |
|
8 |
# 2/23/2024
|
9 |
# This version uses different method in llama index to define llm model
|
|
|
42 |
# deprecated
|
43 |
storage_context = StorageContext.from_defaults(persist_dir='./')
|
44 |
# gpt-3.5_turbo is the current default model
|
45 |
+
Settings.llm = OpenAI(temperature=0.5, model="gpt-3.5_turbo")
|
46 |
#service_context = ServiceContext.from_defaults(llm=llm_predictor)
|
47 |
#index = load_index_from_storage(storage_context, service_context=service_context)
|
48 |
index = load_index_from_storage(storage_context)
|