decodingdatascience commited on
Commit
536120d
·
verified ·
1 Parent(s): 9914f7a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from groq import Groq
3
+
4
+ os.environ["GROQ_API_KEY"] = groq_api_key
5
+
6
+ client = Groq(
7
+ api_key=groq_api_key,
8
+ )
9
+
10
+ chat_completion = client.chat.completions.create(
11
+ messages=[
12
+ {
13
+ "role": "user",
14
+ "content": "Explain the importance of fast language models",
15
+ }
16
+ ],
17
+ model="llama-3.3-70b-versatile",
18
+ )
19
+
20
+ print(chat_completion.choices[0].message.content)