Spaces:
Sleeping
Sleeping
Update excel_chat.py
Browse files- 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[
|
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[
|
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",
|