[ai-cache] Implement a WASM plugin for LLM result retrieval based on vector similarity (#1290)

This commit is contained in:
Yang Beining
2024-10-27 08:21:04 +00:00
committed by GitHub
parent d309bf2e25
commit acec48ed8b
27 changed files with 2025 additions and 346 deletions

View File

@@ -235,10 +235,11 @@ func (c RedisClusterClient[C]) Set(key string, value interface{}, callback Redis
func (c RedisClusterClient[C]) SetEx(key string, value interface{}, ttl int, callback RedisResponseCallback) error {
args := make([]interface{}, 0)
args = append(args, "setex")
args = append(args, "set")
args = append(args, key)
args = append(args, ttl)
args = append(args, value)
args = append(args, "ex")
args = append(args, ttl)
return RedisCall(c.cluster, respString(args), callback)
}