def _process_result(result: Dict[str, str]) -> str:
        """Post-process the result from the server."""
        import google.protobuf.json_format
        import tritonclient.grpc as grpcclient
        from tritonclient.grpc.service_pb2 import ModelInferResponse

        message = ModelInferResponse()
        generated_text: str = ""
        google.protobuf.json_format.Parse(json.dumps(result), message)
        infer_result = grpcclient.InferResult(message)
        np_res = infer_result.as_numpy("text_output")

        generated_text = ""
        if np_res is not None:
            generated_text = "".join([token.decode() for token in np_res])

        return generated_text
Post-process the result from the server.
llama-index-integrations/llms/llama-index-llms-nvidia-triton/llama_index/llms/nvidia_triton/utils.py