Spaces:
Sleeping
Sleeping
Update excel_chat.py
Browse files- excel_chat.py +7 -2
excel_chat.py
CHANGED
@@ -57,12 +57,17 @@ def ask_llm(query, user_input, client_index, user, keys):
|
|
57 |
)
|
58 |
return response.content[0].text
|
59 |
|
60 |
-
elif
|
61 |
try:
|
62 |
client = Groq(api_key= os.getenv(keys[0]))
|
|
|
|
|
|
|
|
|
|
|
63 |
chat_completion = client.chat.completions.create(
|
64 |
messages=messages,
|
65 |
-
model=
|
66 |
)
|
67 |
response = chat_completion.choices[0].message.content
|
68 |
except Exception as e:
|
|
|
57 |
)
|
58 |
return response.content[0].text
|
59 |
|
60 |
+
elif "Groq" in client_index:
|
61 |
try:
|
62 |
client = Groq(api_key= os.getenv(keys[0]))
|
63 |
+
model_map = {
|
64 |
+
"Groq Mixtral" : "llama3-70b-8192"
|
65 |
+
"Groq Llama3 70b" : "llama3-8b-8192"
|
66 |
+
"Groq Llama3 8b" : "mixtral-8x7b-32768"
|
67 |
+
}
|
68 |
chat_completion = client.chat.completions.create(
|
69 |
messages=messages,
|
70 |
+
model=model_map[client_index],
|
71 |
)
|
72 |
response = chat_completion.choices[0].message.content
|
73 |
except Exception as e:
|