Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,6 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
37 |
elif (rag_option == RAG_LLAMAINDEX):
|
38 |
rag_ingestion_llamaindex(config)
|
39 |
|
40 |
-
chain = None
|
41 |
completion = ""
|
42 |
result = ""
|
43 |
callback = ""
|
@@ -64,15 +63,15 @@ def invoke(openai_api_key, prompt, rag_option):
|
|
64 |
finally:
|
65 |
end_time_ms = round(time.time() * 1000)
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
|
77 |
return result
|
78 |
|
|
|
37 |
elif (rag_option == RAG_LLAMAINDEX):
|
38 |
rag_ingestion_llamaindex(config)
|
39 |
|
|
|
40 |
completion = ""
|
41 |
result = ""
|
42 |
callback = ""
|
|
|
63 |
finally:
|
64 |
end_time_ms = round(time.time() * 1000)
|
65 |
|
66 |
+
trace_wandb(config,
|
67 |
+
rag_option,
|
68 |
+
prompt,
|
69 |
+
completion,
|
70 |
+
result,
|
71 |
+
callback,
|
72 |
+
err_msg,
|
73 |
+
start_time_ms,
|
74 |
+
end_time_ms)
|
75 |
|
76 |
return result
|
77 |
|