mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-16 21:23:44 +08:00
🔖 chore: add chat image request proxy address
This commit is contained in:
@@ -35,7 +35,8 @@ const OperationSetting = () => {
|
||||
RetryCooldownSeconds: 0,
|
||||
MjNotifyEnabled: '',
|
||||
ChatCacheEnabled: '',
|
||||
ChatCacheExpireMinute: 5
|
||||
ChatCacheExpireMinute: 5,
|
||||
ChatImageRequestProxy: ''
|
||||
});
|
||||
const [originInputs, setOriginInputs] = useState({});
|
||||
let [loading, setLoading] = useState(false);
|
||||
@@ -173,6 +174,9 @@ const OperationSetting = () => {
|
||||
if (originInputs['ChatCacheExpireMinute'] !== inputs.ChatCacheExpireMinute) {
|
||||
await updateOption('ChatCacheExpireMinute', inputs.ChatCacheExpireMinute);
|
||||
}
|
||||
if (originInputs['ChatImageRequestProxy'] !== inputs.ChatImageRequestProxy) {
|
||||
await updateOption('ChatImageRequestProxy', inputs.ChatImageRequestProxy);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -334,6 +338,26 @@ const OperationSetting = () => {
|
||||
/>
|
||||
</FormControl>
|
||||
</Stack>
|
||||
|
||||
<Stack spacing={2}>
|
||||
<Alert severity="info">
|
||||
当用户使用vision模型并提供了图片链接时,我们的服务器需要下载这些图片并计算 tokens。为了在下载图片时保护服务器的 IP
|
||||
地址不被泄露,可以在下方配置一个代理。这个代理配置使用的是 HTTP 或 SOCKS5
|
||||
代理。如果你是个人用户,这个配置可以不用理会。代理格式为 http://127.0.0.1:1080 或 socks5://127.0.0.1:1080
|
||||
</Alert>
|
||||
<FormControl>
|
||||
<InputLabel htmlFor="ChatImageRequestProxy">图片检测代理</InputLabel>
|
||||
<OutlinedInput
|
||||
id="ChatImageRequestProxy"
|
||||
name="ChatImageRequestProxy"
|
||||
value={inputs.ChatImageRequestProxy}
|
||||
onChange={handleInputChange}
|
||||
label="图片检测代理"
|
||||
placeholder="聊天图片检测代理设置,如果不设置可能会泄漏服务器ip"
|
||||
disabled={loading}
|
||||
/>
|
||||
</FormControl>
|
||||
</Stack>
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => {
|
||||
|
||||
@@ -376,6 +376,9 @@ const SystemSetting = () => {
|
||||
</SubCard>
|
||||
<SubCard title="配置 SMTP" subTitle="用以支持系统的邮件发送">
|
||||
<Grid container spacing={{ xs: 3, sm: 2, md: 4 }}>
|
||||
<Grid xs={12}>
|
||||
<Alert severity="info">请注意,有些邮箱服务商发送邮件时会携带你的服务器IP地址,非个人使用时建议使用专业的邮件服务商</Alert>
|
||||
</Grid>
|
||||
<Grid xs={12} md={4}>
|
||||
<FormControl fullWidth>
|
||||
<InputLabel htmlFor="SMTPServer">SMTP 服务器地址</InputLabel>
|
||||
|
||||
Reference in New Issue
Block a user