heymenn commited on
Commit
1b13e5d
1 Parent(s): c838309

Update excel_chat.py

Browse files
Files changed (1) hide show
  1. excel_chat.py +7 -1
excel_chat.py CHANGED
@@ -73,7 +73,13 @@ def ask_llm(query, user_input, client_index, user, keys):
73
  keys[0] = keys[1][2]
74
  else:
75
  keys[0] = keys[1][0]
76
-
 
 
 
 
 
 
77
  else:
78
  raise ValueError("Unsupported client index provided")
79
 
 
73
  keys[0] = keys[1][2]
74
  else:
75
  keys[0] = keys[1][0]
76
+
77
+ client = Groq(api_key=os.environ[user['api_keys'][keys[0]]])
78
+ chat_completion = client.chat.completions.create(
79
+ messages=messages,
80
+ model='mixtral-8x7b-32768',
81
+ )
82
+ response = chat_completion.choices[0].message.content
83
  else:
84
  raise ValueError("Unsupported client index provided")
85