tokenizer
This commit is contained in:
14
ai-chat-service/pkg/db/redis/prefix.go
Normal file
14
ai-chat-service/pkg/db/redis/prefix.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package redis
|
||||
|
||||
import "strings"
|
||||
|
||||
const ServicePrefix = "ai_chat_service_"
|
||||
|
||||
func GetKey(key string, parts ...string) string {
|
||||
key = ServicePrefix + key
|
||||
if len(parts) == 0 {
|
||||
return key
|
||||
}
|
||||
key += "_" + strings.Join(parts, "_")
|
||||
return key
|
||||
}
|
||||
Reference in New Issue
Block a user