Skip to content

Instantly share code, notes, and snippets.

@iamavnish
Created July 13, 2025 02:06
Show Gist options
  • Save iamavnish/6aea0e0beb36799bb785f701826d7f3d to your computer and use it in GitHub Desktop.
Save iamavnish/6aea0e0beb36799bb785f701826d7f3d to your computer and use it in GitHub Desktop.
Access LLMs through HuggingFace Inference Providers
from openai import OpenAI
client = OpenAI(
base_url="https://router.huggingface.co/hyperbolic/v1",
api_key="<YOUR HUGGING FACE API KEY>",
)
completion = client.chat.completions.create(
model="deepseek-ai/DeepSeek-R1-0528",
messages=[
{
"role": "user",
"content": "What are main features / functions in Tableau Reports like parameters, filters, actions, etc.? Give the answer in mark down format.",
}
],
temperature=0.5,
top_p=0.7,
)
print(completion.choices[0].message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment