heymenn commited on
Commit
9711498
1 Parent(s): 2591ca4

Update excel_chat.py

Browse files
Files changed (1) hide show
  1. excel_chat.py +2 -2
excel_chat.py CHANGED
@@ -64,7 +64,7 @@ def ask_llm(query, user_input, client_index, user, keys):
64
  model="gpt-4o",
65
  messages=messageC
66
  )
67
- return response.content[0].text
68
 
69
  elif "Perplexity" in client_index:
70
  client = OpenAI(api_key=os.environ["PERPLEXITY_ALMAA"], base_url="https://api.perplexity.ai")
@@ -77,7 +77,7 @@ def ask_llm(query, user_input, client_index, user, keys):
77
  model=model_map[client_index],
78
  messages=messageC
79
  )
80
- return response.content[0].text
81
 
82
  elif "Groq" in client_index:
83
  try:
 
64
  model="gpt-4o",
65
  messages=messageC
66
  )
67
+ return response.choices[0][message][content].text
68
 
69
  elif "Perplexity" in client_index:
70
  client = OpenAI(api_key=os.environ["PERPLEXITY_ALMAA"], base_url="https://api.perplexity.ai")
 
77
  model=model_map[client_index],
78
  messages=messageC
79
  )
80
+ return response.choices[0][message][content].text
81
 
82
  elif "Groq" in client_index:
83
  try: