bstraehle commited on
Commit
acf522c
1 Parent(s): 370a515

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -151,9 +151,9 @@ def invoke(openai_api_key, rag_option, prompt):
151
  raise gr.Error("Retrieval Augmented Generation is required.")
152
  if (prompt == ""):
153
  raise gr.Error("Prompt is required.")
 
154
  completion = ""
155
  result = ""
156
- chain = None
157
  err_msg = ""
158
  try:
159
  start_time_ms = round(time.time() * 1000)
@@ -175,7 +175,7 @@ def invoke(openai_api_key, rag_option, prompt):
175
  print("###")
176
  print(completion)
177
  print("###")
178
- print(chain.llm_chain)
179
  print("###")
180
  else:
181
  completion, chain = llm_chain(llm, prompt)
@@ -184,7 +184,7 @@ def invoke(openai_api_key, rag_option, prompt):
184
  print("###")
185
  print(completion)
186
  print("###")
187
- print(chain.llm.client)
188
  print("###")
189
 
190
  except Exception as e:
 
151
  raise gr.Error("Retrieval Augmented Generation is required.")
152
  if (prompt == ""):
153
  raise gr.Error("Prompt is required.")
154
+ chain = None
155
  completion = ""
156
  result = ""
 
157
  err_msg = ""
158
  try:
159
  start_time_ms = round(time.time() * 1000)
 
175
  print("###")
176
  print(completion)
177
  print("###")
178
+ print(type(chain.llm_chain))
179
  print("###")
180
  else:
181
  completion, chain = llm_chain(llm, prompt)
 
184
  print("###")
185
  print(completion)
186
  print("###")
187
+ print(chain["llm.client"])
188
  print("###")
189
 
190
  except Exception as e: