File size: 398 Bytes
e537470
c0ad404
a326298
f6cb9d5
 
c0ad404
f6cb9d5
39a1920
c0ad404
 
 
 
 
 
 
39a1920
 
 
c0ad404
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="groq",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="meta-llama/Llama-3.3-70B-Instruct",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of France?"
        }
    ],
)

print(completion.choices[0].message)