Skip to content

Commit 79e1f32

Browse files
authored
Fix ai._modelscan and ai_scriptscan commands declaration so they will work on enterprise, and add a further documentation. (#790)
1 parent 1fdc22b commit 79e1f32

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ OK
378378
```
379379

380380
## AI._MODELSCAN
381-
The **AI._MODELSCAN** command returns all the models in the database.
381+
The **AI._MODELSCAN** command returns all the models in the database. When using Redis open source cluster, the command shall return all the models that are stored in the local shard.
382382

383383
!!! warning "Experimental API"
384384
`AI._MODELSCAN` is an EXPERIMENTAL command that may be removed in future versions.
@@ -703,7 +703,7 @@ redis> AI.TENSORGET result VALUES
703703
The execution of scripts may generate intermediate tensors that are not allocated by the Redis allocator, but by whatever allocator is used in the backends (which may act on main memory or GPU memory, depending on the device), thus not being limited by `maxmemory` configuration settings of Redis.
704704

705705
## AI._SCRIPTSCAN
706-
The **AI._SCRIPTSCAN** command returns all the scripts in the database.
706+
The **AI._SCRIPTSCAN** command returns all the scripts in the database. When using Redis open source cluster, the command shall return all the scripts that are stored in the local shard.
707707

708708
!!! warning "Experimental API"
709709
`AI._SCRIPTSCAN` is an EXPERIMENTAL command that may be removed in future versions.

src/redisai.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
13751375
return REDISMODULE_ERR;
13761376

13771377
if (RedisModule_CreateCommand(ctx, "ai._modelscan", RedisAI_ModelScan_RedisCommand, "readonly",
1378-
1, 1, 1) == REDISMODULE_ERR)
1378+
0, 0, 0) == REDISMODULE_ERR)
13791379
return REDISMODULE_ERR;
13801380

13811381
if (RedisModule_CreateCommand(ctx, "ai.scriptset", RedisAI_ScriptSet_RedisCommand,
@@ -1387,7 +1387,7 @@ int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc)
13871387
return REDISMODULE_ERR;
13881388

13891389
if (RedisModule_CreateCommand(ctx, "ai.scriptget", RedisAI_ScriptGet_RedisCommand, "readonly",
1390-
1, 1, 1) == REDISMODULE_ERR)
1390+
0, 0, 0) == REDISMODULE_ERR)
13911391
return REDISMODULE_ERR;
13921392

13931393
if (RedisModule_CreateCommand(ctx, "ai.scriptdel", RedisAI_ScriptDel_RedisCommand, "write", 1,

0 commit comments

Comments
 (0)