Spaces:
Runtime error
Runtime error
File size: 373 Bytes
d027cf6 2df6c6c d027cf6 2df6c6c d027cf6 2df6c6c d027cf6 2df6c6c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from huggingface_hub import InferenceClient
client = InferenceClient(api_key="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
completion = client.chat.completions.create(
model="meta-llama/Llama-3.2-1B-Instruct",
messages=messages,
max_tokens=500
)
print(completion.choices[0].message) |