chansung commited on
Commit
2468b32
1 Parent(s): beb5a78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -142,7 +142,7 @@ async def chat_stream(
142
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv,
143
  internet_option, serper_api_key
144
  ):
145
- print(internet_search)
146
 
147
  res = [
148
  chat_state["ppmanager_type"].from_json(json.dumps(ppm))
@@ -156,7 +156,7 @@ async def chat_stream(
156
  prompt = build_prompts(ppm, global_context, ctx_num_lconv)
157
 
158
  #######
159
- if internet_option == "on":
160
  search_prompt = None
161
  for tmp_prompt, uis in internet_search(ppm, serper_api_key, global_context, ctx_num_lconv):
162
  search_prompt = tmp_prompt
 
142
  global_context, res_temp, res_topk, res_rpen, res_mnts, res_sample, ctx_num_lconv,
143
  internet_option, serper_api_key
144
  ):
145
+ internet_option = True if internet_option == "on" else False
146
 
147
  res = [
148
  chat_state["ppmanager_type"].from_json(json.dumps(ppm))
 
156
  prompt = build_prompts(ppm, global_context, ctx_num_lconv)
157
 
158
  #######
159
+ if internet_option:
160
  search_prompt = None
161
  for tmp_prompt, uis in internet_search(ppm, serper_api_key, global_context, ctx_num_lconv):
162
  search_prompt = tmp_prompt