heymenn commited on
Commit
9a5be77
1 Parent(s): 2389cf5

Update excel_chat.py

Browse files
Files changed (1) hide show
  1. excel_chat.py +2 -2
excel_chat.py CHANGED
@@ -58,7 +58,7 @@ def ask_llm(query, user_input, client_index, user, keys):
58
  return response.content[0].text
59
 
60
  elif "GPT 4o" in client_index:
61
- client = OpenAI(api_key=os.environ[user['api_keys']['gpt-4o']])
62
  response = client.messages.create(
63
  model="gpt-4o",
64
  messages=messageC
@@ -66,7 +66,7 @@ def ask_llm(query, user_input, client_index, user, keys):
66
  return response.content[0].text
67
 
68
  elif "Perplexity" in client_index:
69
- client = OpenAI(api_key=os.environ[user['api_keys']['perplexity']], base_url="https://api.perplexity.ai")
70
  model_map = {
71
  "Perplexity Mixtral": "mixtral-8x7b-instruct",
72
  "Perplexity Llama3 70b": "llama-3-70b-instruct",
 
58
  return response.content[0].text
59
 
60
  elif "GPT 4o" in client_index:
61
+ client = OpenAI(api_key=os.environ["OPENAI_YCHK"])
62
  response = client.messages.create(
63
  model="gpt-4o",
64
  messages=messageC
 
66
  return response.content[0].text
67
 
68
  elif "Perplexity" in client_index:
69
+ client = OpenAI(api_key=os.environ["PERPLEXITY_ALMAA"], base_url="https://api.perplexity.ai")
70
  model_map = {
71
  "Perplexity Mixtral": "mixtral-8x7b-instruct",
72
  "Perplexity Llama3 70b": "llama-3-70b-instruct",