Skip to content
pubscout

groq_sdk

1.0.2, released 2 years ago by oriventi.dev

A Dart client library for seamless Groq Cloud API integration and LLM chat sessions.

WASM-ready
$ flutter pub add groq_sdk
Source repository

What it does

Allows Dart and Flutter applications to interact with the Groq Cloud API. It provides chat management, streaming responses, tool use support, audio transcription, and content moderation using Groq's models.

AI-written summary of version 1.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to integrate Groq language models into your Dart or Flutter application.
  • You need chat sessions with support for streaming, tool execution, and resource tracking.

Skip it when

  • You require an official package maintained directly by Groq.
  • You need multiple choices returned in Groq responses, which are not currently supported.

Strengths

  • Intuitive chat session interface with streaming and tool usage support.
  • Includes audio transcription/translation and content moderation capabilities.

Weaknesses

  • Independent project, not officially maintained by Groq.
  • Multiple choices in responses are not supported yet.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Requires obtaining a Groq API key from the Groq Cloud console.

final groq = Groq('YOUR_GROQ_API_KEY');
final chat = groq.startNewChat(GroqModels.llama3_8b);
final (response, usage) = await chat.sendMessage('Explain LLMs to me please');
print(response.choices.first.message);

Alternatives

Packages that do the same job and could replace groq_sdk.