server_url="http://0.0.0.0:9997",
                model_uid = {model_uid} # replace model_uid with the model UID return from launching the model
            )
            llm(
                prompt="Q: where can we visit in the capital of France? A:",
                generate_config={"max_tokens": 1024, "stream": True},
            )
    To view all the supported builtin models, run:
    .. code-block:: bash
        $ xinference list --all
    """  # noqa: E501
    client: Any
    server_url: Optional[str]
    """URL of the xinference server"""
    model_uid: Optional[str]
    """UID of the launched model"""
    def __init__(
        self, server_url: Optional[str] = None, model_uid: Optional[str] = None
    ):
        try:
            from xinference.client import RESTfulClient
        except ImportError as e:
            raise ImportError(
                "Could not import RESTfulClient from xinference. Please install it"
                " with `pip install xinference`."
            ) from e
        super().__init__(
            **{
                "server_url": server_url,
                "model_uid": model_uid,
            }
        )
        if self.server_url is None:
            raise ValueError("Please provide server URL")
        if self.model_uid is None:
            raise ValueError("Please provide the model UID")
        self.client = RESTfulClient(server_url)
    @property
    def _llm_type(self) -> str:
        """Return type of llm."""
        return "xinference"
    @property
    def _identifying_params(self) -> Mapping[str, Any]:
        """Get the identifying parameters."""