mirror of
https://github.com/luckyyzh/pi-agent-integrated.git
synced 2026-10-03 02:59:35 +00:00
feat: vision 后端不再预设默认值,初始置空需用户自选
- vision.ts:移除默认 ollama/qwen3-vl:8b,未配置后端或模型时明确报错并给配置入口 - VisionConfig.tsx + i18n:面板无默认选中,新增未配置提示 - README/vision.md:同步移除默认表述,标注 OLLAMA_VISION_MODEL 必填
This commit is contained in:
@@ -136,7 +136,7 @@ export function VisionConfigContent() {
|
||||
}
|
||||
}, [config]);
|
||||
|
||||
const backend = config.backend ?? "ollama";
|
||||
const backend = config.backend;
|
||||
const ollama = config.ollama ?? {};
|
||||
const openai = config.openai ?? {};
|
||||
|
||||
@@ -205,6 +205,23 @@ export function VisionConfigContent() {
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* No backend selected yet */}
|
||||
{!backend && (
|
||||
<div
|
||||
style={{
|
||||
fontSize: 11,
|
||||
color: "var(--text-muted)",
|
||||
lineHeight: 1.5,
|
||||
background: "var(--bg-panel)",
|
||||
border: "1px dashed var(--border)",
|
||||
borderRadius: 6,
|
||||
padding: "8px 10px",
|
||||
}}
|
||||
>
|
||||
{t("vision.notConfigured")}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Ollama settings */}
|
||||
{backend === "ollama" && (
|
||||
<div style={{ display: "flex", flexDirection: "column", gap: 10 }}>
|
||||
|
||||
@@ -277,6 +277,7 @@ export const enLocale: LocalePlugin = {
|
||||
"vision.openai.model": "Model",
|
||||
"vision.openai.modelPlaceholder": "e.g. gpt-4o-mini / glm-4.5v",
|
||||
"vision.effective": "Saved config takes effect on the next image request — no restart needed. Uploaded images are auto-transcribed into text for text-only main models (e.g. DeepSeek).",
|
||||
"vision.notConfigured": "No backend selected yet — image requests fail until you pick one and fill in its details.",
|
||||
"vision.loadFailed": "Failed to load / save config",
|
||||
"vision.save": "Save",
|
||||
"vision.saved": "Saved — takes effect on the next image request",
|
||||
|
||||
@@ -277,6 +277,7 @@ export const zhCNLocale: LocalePlugin = {
|
||||
"vision.openai.model": "模型",
|
||||
"vision.openai.modelPlaceholder": "如 gpt-4o-mini / glm-4.5v",
|
||||
"vision.effective": "保存后下次识图请求立即生效,无需重启。上传图片会自动转录为文本,供纯文本主模型(如 DeepSeek)使用。",
|
||||
"vision.notConfigured": "尚未选择后端——未配置时识图请求会报错,请先选择后端并填写对应参数。",
|
||||
"vision.loadFailed": "配置加载/保存失败",
|
||||
"vision.save": "保存",
|
||||
"vision.saved": "已保存——下次识图请求生效",
|
||||
|
||||
Reference in New Issue
Block a user