Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -38,12 +38,12 @@ def invoke(openai_api_key, prompt, agent_option):
|
|
38 |
start_time_ms = round(time.time() * 1000)
|
39 |
|
40 |
if (agent_option == AGENT_LANGCHAIN):
|
41 |
-
|
42 |
config,
|
43 |
prompt
|
44 |
)
|
45 |
|
46 |
-
|
47 |
elif (agent_option == AGENT_LLAMAINDEX):
|
48 |
result = agent_llamaindex(
|
49 |
config,
|
|
|
38 |
start_time_ms = round(time.time() * 1000)
|
39 |
|
40 |
if (agent_option == AGENT_LANGCHAIN):
|
41 |
+
completion = agent_langchain(
|
42 |
config,
|
43 |
prompt
|
44 |
)
|
45 |
|
46 |
+
result = completion["output"]
|
47 |
elif (agent_option == AGENT_LLAMAINDEX):
|
48 |
result = agent_llamaindex(
|
49 |
config,
|