GroqService class

Implemented types

Constructors

GroqService({required String apiKey, String model = 'mixtral-8x7b-32768', double temperature = 0.7, int maxTokens = 1024, String baseUrl = 'https://api.groq.com/openai/v1/chat/completions'})

Properties

apiKey String
final
baseUrl String
final
hashCode int
The hash code for this object.
no setterinherited
maxTokens int
final
model String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
temperature double
final

Methods

clearContext() Future<void>
Clear conversation context
override
isAvailable() Future<bool>
Check if service is available
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage({required String message, List<ChatMessage> conversationHistory = const [], Map<String, dynamic>? options}) Future<String>
Send a message and get a complete response
override
sendMessageStream({required String message, List<ChatMessage> conversationHistory = const [], Map<String, dynamic>? options}) Stream<String>
Send a message and get a streaming response
override
setOptions(Map<String, dynamic> options) → void
Set custom options
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited