text: "stop": {"type": "array", "items": {"type": "string"}}},  "required": ["prompt"]}outputs: {"type": "string"}If the server schema is incompatible or you want to insert extra configs, you can use transform_input_fn and transform_output_fn accordingly.The following is a minimal example for running a driver proxy app to serve an LLM:from flask import Flask, request, jsonifyimport torchfrom transformers import pipeline, AutoTokenizer, StoppingCriteriamodel = "databricks/dolly-v2-3b"tokenizer = AutoTokenizer.from_pretrained(model, padding_side="left")dolly = pipeline(model=model, tokenizer=tokenizer, trust_remote_code=True, device_map="auto")device = dolly.deviceclass CheckStop(StoppingCriteria):    def __init__(self, stop=None):        super().__init__()        self.stop = stop or []        self.matched = ""        self.stop_ids = [tokenizer.encode(s, return_tensors='pt').to(device) for s in self.stop]    def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs):        for i, s in enumerate(self.stop_ids):            if torch.all((s == input_ids[0][-s.shape[1]:])).item():                self.matched = self.stop[i]                return True        return Falsedef llm(prompt, stop=None, **kwargs):  check_stop = CheckStop(stop)  result = dolly(prompt, stopping_criteria=[check_stop], **kwargs)