Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
43 |
start_time_ms = round(time.time() * 1000)
|
44 |
|
45 |
if (rag_option == RAG_LANGCHAIN):
|
46 |
-
completion, chain, cb = rag_chain(config,
|
47 |
|
48 |
result = completion["result"]
|
49 |
elif (rag_option == RAG_LLAMAINDEX):
|
@@ -60,16 +60,16 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
60 |
finally:
|
61 |
end_time_ms = round(time.time() * 1000)
|
62 |
|
63 |
-
trace_wandb(config,
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
|
74 |
return result
|
75 |
|
|
|
43 |
start_time_ms = round(time.time() * 1000)
|
44 |
|
45 |
if (rag_option == RAG_LANGCHAIN):
|
46 |
+
completion, chain, cb = rag_chain(config, prompt)
|
47 |
|
48 |
result = completion["result"]
|
49 |
elif (rag_option == RAG_LLAMAINDEX):
|
|
|
60 |
finally:
|
61 |
end_time_ms = round(time.time() * 1000)
|
62 |
|
63 |
+
#trace_wandb(config,
|
64 |
+
# rag_option == RAG_OFF,
|
65 |
+
# prompt,
|
66 |
+
# completion,
|
67 |
+
# result,
|
68 |
+
# chain,
|
69 |
+
# cb,
|
70 |
+
# err_msg,
|
71 |
+
# start_time_ms,
|
72 |
+
# end_time_ms)
|
73 |
|
74 |
return result
|
75 |
|