1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| import { z } from "zod";
| import type { ProviderConfig } from "@humansignal/app-common/blocks/StorageProviderForm/types/provider";
| import { IconCloudProviderRedis } from "@humansignal/icons";
|
| export const redisProvider: ProviderConfig = {
| name: "redis",
| title: "Redis 存储",
| description: "配置您的 Redis 存储连接以及所有必需的 Label Studio 设置",
| icon: IconCloudProviderRedis,
| fields: [
| {
| name: "db",
| type: "text",
| label: "数据库编号 (db)",
| placeholder: "1",
| schema: z.string().default("1"),
| },
| {
| name: "password",
| type: "password",
| label: "密码",
| autoComplete: "new-password",
| placeholder: "您的 Redis 密码",
| schema: z.string().optional().default(""),
| },
| {
| name: "host",
| type: "text",
| label: "主机 (Host)",
| required: true,
| placeholder: "redis://example.com",
| schema: z.string().min(1, "Host is required"),
| },
| {
| name: "port",
| type: "text",
| label: "端口 (Port)",
| placeholder: "6379",
| schema: z.string().default("6379"),
| },
| {
| name: "prefix",
| type: "text",
| label: "存储桶前缀 (Bucket prefix)",
| placeholder: "path/to/files",
| schema: z.string().optional().default(""),
| target: "export",
| },
| ],
| layout: [{ fields: ["host", "port", "db", "password"] }, { fields: ["prefix"] }],
| };
|
| export default redisProvider;
|
|