Package com.tnsai.llm.providers
Class GroqClient
java.lang.Object
com.tnsai.llm.providers.AbstractLLMClient
com.tnsai.llm.providers.AbstractOpenAICompatibleClient
com.tnsai.llm.providers.GroqClient
- All Implemented Interfaces:
com.tnsai.llm.LLMClient
Groq LLM client implementation.
Provides access to Groq's fast inference API with OpenAI-compatible interface.
Supported models:
- llama-3.3-70b-versatile - Llama 3.3 70B (recommended)
- llama-3.1-8b-instant - Llama 3.1 8B (fast)
- llama-3.2-1b-preview - Llama 3.2 1B (ultrafast)
- llama-3.2-3b-preview - Llama 3.2 3B
- mixtral-8x7b-32768 - Mixtral 8x7B
- gemma2-9b-it - Gemma 2 9B
Configuration via environment variables:
- GROQ_API_KEY - Required API key for authentication
- GROQ_BASE_URL - Optional, defaults to https://api.groq.com/openai/v1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGroqClient(String model) GroqClient(String model, float temperature) GroqClient(String model, float temperature, Float topP, Integer maxTokens) GroqClient(String model, float temperature, Integer maxTokens) GroqClient(String baseUrl, String model, float temperature, Float topP, Integer maxTokens, String apiKey) GroqClient(String baseUrl, String model, float temperature, Integer maxTokens, String apiKey) -
Method Summary
Methods inherited from class com.tnsai.llm.providers.AbstractOpenAICompatibleClient
chat, streamChatMethods inherited from class com.tnsai.llm.providers.AbstractLLMClient
getBaseUrl, getCallTimeoutMs, getMaxTokens, getModel, getTemperature, getTopPMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tnsai.llm.LLMClient
chat, chat, chat, chat, chat, getCapabilities, getProviderName, listModels, streamChat, streamChat, streamChatWithHandler, streamChatWithHandler, streamChatWithSpec, streamChatWithSpec
-
Constructor Details
-
GroqClient
-
GroqClient
-
GroqClient
-
GroqClient
-
GroqClient
-
GroqClient
-