Skip to content

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jun 11, 2025

PR equivalent to huggingface/huggingface.js#1352.

I did not add the GroqTextGenerationTask yet (less a priority + no way to test it).

Example:

image: https://vagabundler.com/wp-content/uploads/2019/06/P3160166-Copy.jpg

from huggingface_hub import InferenceClient


client = InferenceClient(provider="groq")

completion = client.chat.completions.create(
    model="meta-llama/Llama-4-Scout-17B-16E-Instruct",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "Describe this image in one sentence."},
                {
                    "type": "image_url",
                    "image_url": {"url": "https://vagabundler.com/wp-content/uploads/2019/06/P3160166-Copy.jpg"},
                },
            ],
        }
    ],
)

print(completion.choices[0].message)
Model meta-llama/Llama-4-Scout-17B-16E-Instruct is in staging mode for provider groq. Meant for test purposes only.
ChatCompletionOutputMessage(role='assistant', content='The Eiffel Tower stands tall in a large grassy area, surrounded by trees and a fence in the foreground, with a clear blue sky above.', tool_call_id=None, tool_calls=None)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@SBrandeis SBrandeis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@Wauplin Wauplin merged commit a0429e7 into main Jun 11, 2025
26 checks passed
@Wauplin Wauplin deleted the add-groq-provider branch June 11, 2025 13:47
mintyleaf pushed a commit to Swarmind/huggingface_hub that referenced this pull request Jul 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants