XAIClient class
Core xAI HTTP client shared across all capability modules
This class provides the foundational HTTP functionality that all xAI capability implementations can use. It handles:
- Authentication and headers (OpenAI-compatible)
- Request/response processing
- Error handling
- SSE stream parsing
- Provider-specific configurations
Constructors
- XAIClient.new(XAIConfig config)
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postJson(
String endpoint, Map< String, dynamic> data) → Future<Map< String, dynamic> > - Make a POST request and return JSON response
-
postStreamRaw(
String endpoint, Map< String, dynamic> data) → Stream<String> - Make a POST request and return raw stream for SSE
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited