Soumik555 commited on
Commit
e62d265
·
1 Parent(s): 380a76a

modifies orchestrator,add code_exec tool, openai_chat (later we add chat)

Browse files
Files changed (1) hide show
  1. orchestrator_functions.py +2 -1
orchestrator_functions.py CHANGED
@@ -603,11 +603,12 @@ async def csv_chart(csv_url: str, query: str):
603
  try:
604
  # --- 1. First Attempt: OpenAI ---
605
  openai_result = await asyncio.to_thread(openai_chart, csv_url, query)
606
- logger.info(f"OpenAI chart result:", openai_result)
607
 
608
  if openai_result and openai_result != 'Chart not generated':
609
  return await upload_and_return(openai_result)
610
 
 
611
  raise Exception("OpenAI failed to generate chart")
612
 
613
  except Exception as openai_error:
 
603
  try:
604
  # --- 1. First Attempt: OpenAI ---
605
  openai_result = await asyncio.to_thread(openai_chart, csv_url, query)
606
+ logger.info("OpenAI chart result:", openai_result)
607
 
608
  if openai_result and openai_result != 'Chart not generated':
609
  return await upload_and_return(openai_result)
610
 
611
+ print("OpenAI failed, Failed for: ", openai_result)
612
  raise Exception("OpenAI failed to generate chart")
613
 
614
  except Exception as openai_error: