#AI
zhou zhou
15 小时以前 8a3fa0452075df8290d4542e64ced002ff4b476d
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
import React from "react";
import {
    TextInput,
} from "react-admin";
import { Grid, Typography } from "@mui/material";
import StatusSelectInput from "@/page/components/StatusSelectInput";
 
const AiPromptForm = ({ readOnly = false }) => (
    <Grid container spacing={2} width={{ xs: "100%", xl: "80%" }}>
        <Grid item xs={12}>
            <Typography variant="h6">Prompt 配置</Typography>
        </Grid>
        <Grid item xs={12} md={6}>
            <TextInput source="name" label="名称" fullWidth disabled={readOnly} />
        </Grid>
        <Grid item xs={12} md={6}>
            <TextInput source="code" label="编码" fullWidth disabled={readOnly} />
        </Grid>
        <Grid item xs={12}>
            <TextInput source="scene" label="场景" fullWidth disabled={readOnly} />
        </Grid>
        <Grid item xs={12}>
            <TextInput source="systemPrompt" label="System Prompt" fullWidth multiline minRows={6} disabled={readOnly} />
        </Grid>
        <Grid item xs={12}>
            <TextInput source="userPromptTemplate" label="User Prompt Template" fullWidth multiline minRows={5} disabled={readOnly} />
        </Grid>
        <Grid item xs={12} md={6}>
            <StatusSelectInput disabled={readOnly} />
        </Grid>
        <Grid item xs={12}>
            <TextInput source="memo" label="备注" fullWidth multiline minRows={3} disabled={readOnly} />
        </Grid>
    </Grid>
);
 
export default AiPromptForm;