Gregor Betz commited on
Commit
e64f722
·
unverified ·
1 Parent(s): 0616d17

async bugfix

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -205,7 +205,9 @@ with gr.Blocks() as demo:
205
  guide = RecursiveBalancingGuide(tourist_llm=client_llm, config=guide_config)
206
 
207
  # health check
208
- health_check = await guide.health_check()
 
 
209
  if health_check.get("status", None) != "ok":
210
  health_msg = " | ".join([f"{k}: {v}" for k, v in health_check.items()])
211
  logging.error(f"Guide health check failed: {health_msg}")
@@ -231,8 +233,6 @@ with gr.Blocks() as demo:
231
  bot,
232
  [
233
  chatbot,
234
- #client_kwargs,
235
- #guide_kwargs,
236
  conversation_id
237
  ],
238
  chatbot,
 
205
  guide = RecursiveBalancingGuide(tourist_llm=client_llm, config=guide_config)
206
 
207
  # health check
208
+ # run async guide.health_check() as coroutine
209
+ health_check = asyncio.run(guide.health_check())
210
+
211
  if health_check.get("status", None) != "ok":
212
  health_msg = " | ".join([f"{k}: {v}" for k, v in health_check.items()])
213
  logging.error(f"Guide health check failed: {health_msg}")
 
233
  bot,
234
  [
235
  chatbot,
 
 
236
  conversation_id
237
  ],
238
  chatbot,