bstraehle commited on
Commit
76f77bf
·
1 Parent(s): 300737c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -54,15 +54,15 @@ def invoke(openai_api_key, prompt, rag_option):
54
 
55
  if (rag_option == RAG_LANGCHAIN):
56
  rag = LangChainRAG()
57
- completion, chain, callback = rag.rag_chain(config, prompt)
58
 
59
  result = completion["result"]
60
  elif (rag_option == RAG_LLAMAINDEX):
61
  rag = LlamaIndexRAG()
62
- result = rag.retrieval(config, prompt)
63
  else:
64
  rag = LangChainRAG()
65
- completion, chain, callback = rag.llm_chain(config, prompt)
66
 
67
  if (completion.generations[0] != None and
68
  completion.generations[0][0] != None):
 
54
 
55
  if (rag_option == RAG_LANGCHAIN):
56
  rag = LangChainRAG()
57
+ completion, callback = rag.rag_chain(config, prompt)
58
 
59
  result = completion["result"]
60
  elif (rag_option == RAG_LLAMAINDEX):
61
  rag = LlamaIndexRAG()
62
+ result, callback = rag.retrieval(config, prompt)
63
  else:
64
  rag = LangChainRAG()
65
+ completion, callback = rag.llm_chain(config, prompt)
66
 
67
  if (completion.generations[0] != None and
68
  completion.generations[0][0] != None):