@@ -805,27 +805,29 @@ int RedisAI_ScriptScan_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **arg
805805 return REDISMODULE_OK ;
806806}
807807
808- void _RedisAI_Info (RedisModuleCtx * ctx ) {
809- RedisModuleString * rai_version = RedisModule_CreateStringPrintf (ctx , "%d.%d.%d" , REDISAI_VERSION_MAJOR , REDISAI_VERSION_MINOR , REDISAI_VERSION_PATCH );
810- RedisModuleString * llapi_version = RedisModule_CreateStringPrintf (ctx , "%d" , REDISAI_LLAPI_VERSION );
811- RedisModuleString * rdb_version = RedisModule_CreateStringPrintf (ctx , "%llu" , REDISAI_ENC_VER );
808+ void _RedisAI_Info (RedisModuleCtx * ctx ) {
809+ RedisModuleString * rai_version = RedisModule_CreateStringPrintf (
810+ ctx , "%d.%d.%d" , REDISAI_VERSION_MAJOR , REDISAI_VERSION_MINOR , REDISAI_VERSION_PATCH );
811+ RedisModuleString * llapi_version =
812+ RedisModule_CreateStringPrintf (ctx , "%d" , REDISAI_LLAPI_VERSION );
813+ RedisModuleString * rdb_version = RedisModule_CreateStringPrintf (ctx , "%llu" , REDISAI_ENC_VER );
812814
813815 int reponse_len = 6 ;
814816
815- if (RAI_backends .tf .get_version ){
816- reponse_len += 2 ;
817+ if (RAI_backends .tf .get_version ) {
818+ reponse_len += 2 ;
817819 }
818820
819- if (RAI_backends .torch .get_version ){
820- reponse_len += 2 ;
821+ if (RAI_backends .torch .get_version ) {
822+ reponse_len += 2 ;
821823 }
822824
823- if (RAI_backends .tflite .get_version ){
824- reponse_len += 2 ;
825+ if (RAI_backends .tflite .get_version ) {
826+ reponse_len += 2 ;
825827 }
826828
827- if (RAI_backends .onnx .get_version ){
828- reponse_len += 2 ;
829+ if (RAI_backends .onnx .get_version ) {
830+ reponse_len += 2 ;
829831 }
830832
831833 RedisModule_ReplyWithArray (ctx , reponse_len );
@@ -838,21 +840,19 @@ void _RedisAI_Info(RedisModuleCtx* ctx) {
838840 RedisModule_ReplyWithSimpleString (ctx , "Low Level API Version" );
839841 RedisModule_ReplyWithString (ctx , llapi_version );
840842
841-
842843 RedisModule_ReplyWithSimpleString (ctx , "RDB Encoding version" );
843844 RedisModule_ReplyWithString (ctx , llapi_version );
844845
845- if (RAI_backends .tf .get_version ){
846- RedisModule_ReplyWithSimpleString (ctx , "TensorFlow version" );
847- RedisModule_ReplyWithSimpleString (ctx , RAI_backends .tf .get_version ());
846+ if (RAI_backends .tf .get_version ) {
847+ RedisModule_ReplyWithSimpleString (ctx , "TensorFlow version" );
848+ RedisModule_ReplyWithSimpleString (ctx , RAI_backends .tf .get_version ());
848849 }
849850
850- if (RAI_backends .onnx .get_version ){
851- RedisModule_ReplyWithSimpleString (ctx , "ONNX version" );
852- RedisModule_ReplyWithSimpleString (ctx , RAI_backends .onnx .get_version ());
851+ if (RAI_backends .onnx .get_version ) {
852+ RedisModule_ReplyWithSimpleString (ctx , "ONNX version" );
853+ RedisModule_ReplyWithSimpleString (ctx , RAI_backends .onnx .get_version ());
853854 }
854855
855-
856856 RedisModule_FreeString (ctx , rai_version );
857857 RedisModule_FreeString (ctx , llapi_version );
858858 RedisModule_FreeString (ctx , rdb_version );
@@ -865,13 +865,11 @@ int RedisAI_Info_RedisCommand(RedisModuleCtx *ctx, RedisModuleString **argv, int
865865 if (argc > 3 )
866866 return RedisModule_WrongArity (ctx );
867867
868-
869- if (argc == 1 ) {
868+ if (argc == 1 ) {
870869 _RedisAI_Info (ctx );
871870 return REDISMODULE_OK ;
872871 }
873872
874-
875873 RedisModuleString * runkey = argv [1 ];
876874 struct RedisAI_RunStats * rstats = NULL ;
877875 if (RAI_GetRunStats (runkey , & rstats ) == REDISMODULE_ERR ) {
0 commit comments