mirascope.core.xai.stream
The XAIStream
class for convenience around streaming xAI LLM calls.
Usage
Class XAIStream
A simple wrapper around OpenAIStream
.
Everything is the same except updates to the construct_call_response
method and
the cost
property so that cost is properly calculated using xAI's cost
calculation method. This ensures cost calculation works for non-OpenAI models.
Bases:
OpenAIStreamFunction construct_call_response
Parameters
Name | Type | Description |
---|---|---|
self | Any | - |
Returns
Type | Description |
---|---|
XAICallResponse | - |