def __init__(
self,
*,
api_key: str | None = None,
api_host: str = "api.x.ai",
timeout: float | None = None,
metadata: tuple[tuple[str, str], ...] | None = None,
channel_options: list[tuple[str, Any]] | None = None,
streaming: bool = False,
create_options: CreateOptions | None = None,
) -> None:
self._client = AsyncClient(
api_key=api_key,
api_host=api_host,
timeout=timeout,
metadata=metadata,
channel_options=channel_options,
)
self._create_options: dict[str, Any] = {k: v for k, v in (create_options or {}).items() if v is not None}
self._streaming = streaming