Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -38,6 +38,7 @@ config = {
|
|
38 |
"k": 3,
|
39 |
"model": "gpt-4",
|
40 |
"temperature": 0,
|
|
|
41 |
}
|
42 |
|
43 |
template = """If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say
|
@@ -130,6 +131,7 @@ def wandb_trace(rag_option, prompt, prompt_template, result, completion, chain_n
|
|
130 |
"k": "" if (rag_option == "Off") else config["k"],
|
131 |
"model": config["model"],
|
132 |
"temperature": config["temperature"],
|
|
|
133 |
},
|
134 |
start_time_ms = start_time_ms,
|
135 |
end_time_ms = end_time_ms,
|
@@ -156,7 +158,8 @@ def invoke(openai_api_key, rag_option, prompt):
|
|
156 |
start_time_ms = round(time.time() * 1000)
|
157 |
llm = ChatOpenAI(model_name = config["model"],
|
158 |
openai_api_key = openai_api_key,
|
159 |
-
temperature = config["temperature"]
|
|
|
160 |
if (rag_option == "Chroma"):
|
161 |
#splits = document_loading_splitting()
|
162 |
#document_storage_chroma(splits)
|
|
|
38 |
"k": 3,
|
39 |
"model": "gpt-4",
|
40 |
"temperature": 0,
|
41 |
+
"verbose": True
|
42 |
}
|
43 |
|
44 |
template = """If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say
|
|
|
131 |
"k": "" if (rag_option == "Off") else config["k"],
|
132 |
"model": config["model"],
|
133 |
"temperature": config["temperature"],
|
134 |
+
"verbose": config["verbose"],
|
135 |
},
|
136 |
start_time_ms = start_time_ms,
|
137 |
end_time_ms = end_time_ms,
|
|
|
158 |
start_time_ms = round(time.time() * 1000)
|
159 |
llm = ChatOpenAI(model_name = config["model"],
|
160 |
openai_api_key = openai_api_key,
|
161 |
+
temperature = config["temperature"],
|
162 |
+
verbose = config["verbose"])
|
163 |
if (rag_option == "Chroma"):
|
164 |
#splits = document_loading_splitting()
|
165 |
#document_storage_chroma(splits)
|