bstraehle commited on
Commit
eb6ca55
·
1 Parent(s): 57887e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -42,9 +42,6 @@ config = {
42
 
43
  langchain.verbose = True
44
 
45
- os.environ["LANGCHAIN_WANDB_TRACING"] = "true"
46
- os.environ["WANDB_PROJECT"] = "openai-llm-rag"
47
-
48
  template = """If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say "Thanks for using the 🧠 app - Bernd" at the end of the answer. """
49
 
50
  llm_template = "Answer the question at the end. " + template + "Question: {question} Helpful Answer: "
@@ -186,8 +183,7 @@ def invoke(openai_api_key, rag_option, prompt):
186
  raise gr.Error(e)
187
  finally:
188
  end_time_ms = round(time.time() * 1000)
189
- #wandb_trace(rag_option, prompt, prompt_template, result, completion, chain_name, status_msg, start_time_ms, end_time_ms)
190
- wandb.finish()
191
  return result
192
 
193
  gr.close_all()
 
42
 
43
  langchain.verbose = True
44
 
 
 
 
45
  template = """If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say "Thanks for using the 🧠 app - Bernd" at the end of the answer. """
46
 
47
  llm_template = "Answer the question at the end. " + template + "Question: {question} Helpful Answer: "
 
183
  raise gr.Error(e)
184
  finally:
185
  end_time_ms = round(time.time() * 1000)
186
+ wandb_trace(rag_option, prompt, prompt_template, result, completion, chain_name, status_msg, start_time_ms, end_time_ms)
 
187
  return result
188
 
189
  gr.close_all()