Studio: default RAG mode to multimodal everywhere
This commit is contained in:
parent
c22fb88b4f
commit
5351822ff8
5 changed files with 9 additions and 9 deletions
|
|
@ -38,7 +38,7 @@ def resolve_scope_embedder(scope: str) -> str | None:
|
|||
explicit = per_thread.get("embedding_model") or defaults.get("embedding_model")
|
||||
if explicit:
|
||||
return explicit
|
||||
mode = per_thread.get("mode") or defaults.get("mode") or "text"
|
||||
mode = per_thread.get("mode") or defaults.get("mode") or "multimodal"
|
||||
chunking_strategy = (
|
||||
per_thread.get("chunking_strategy")
|
||||
or defaults.get("chunking_strategy")
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class CreateKBRequest(BaseModel):
|
|||
description: str | None = None
|
||||
embedding_model: str | None = None
|
||||
chunking_strategy: ChunkingStrategy = "standard"
|
||||
mode: KBMode = "text"
|
||||
mode: KBMode = "multimodal"
|
||||
|
||||
|
||||
class KBResponse(BaseModel):
|
||||
|
|
@ -401,7 +401,7 @@ def list_knowledge_bases(
|
|||
|
||||
class RagDefaults(BaseModel):
|
||||
chunking_strategy: ChunkingStrategy = "standard"
|
||||
mode: KBMode = "text"
|
||||
mode: KBMode = "multimodal"
|
||||
embedding_model: str | None = None
|
||||
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ def _load_rag_defaults() -> RagDefaults:
|
|||
raw = {}
|
||||
return RagDefaults(
|
||||
chunking_strategy = raw.get("chunking_strategy") or "standard",
|
||||
mode = raw.get("mode") or "text",
|
||||
mode = raw.get("mode") or "multimodal",
|
||||
embedding_model = raw.get("embedding_model"),
|
||||
)
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ def set_rag_defaults(
|
|||
|
||||
class ThreadRagSettings(BaseModel):
|
||||
chunking_strategy: ChunkingStrategy = "standard"
|
||||
mode: KBMode = "text"
|
||||
mode: KBMode = "multimodal"
|
||||
embedding_model: str | None = None
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -484,7 +484,7 @@ export function ChatSettingsPanel({
|
|||
ragDefaults?.chunking_strategy ??
|
||||
"standard";
|
||||
const effectiveThreadMode: KBMode =
|
||||
threadSettings?.mode ?? ragDefaults?.mode ?? "text";
|
||||
threadSettings?.mode ?? ragDefaults?.mode ?? "multimodal";
|
||||
|
||||
const aui = useAui();
|
||||
// Brand-new chat has no backend thread yet — initialize the local
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export function KBCreateDialog({
|
|||
|
||||
const initialStrategy: ChunkingStrategy =
|
||||
defaults?.chunking_strategy ?? "standard";
|
||||
const initialMode: KBMode = defaults?.mode ?? "text";
|
||||
const initialMode: KBMode = defaults?.mode ?? "multimodal";
|
||||
const initialEmbedder = defaults?.embedding_model ?? "";
|
||||
|
||||
const [name, setName] = useState("");
|
||||
|
|
@ -76,7 +76,7 @@ export function KBCreateDialog({
|
|||
setDescription("");
|
||||
setEmbeddingModel(defaults?.embedding_model ?? "");
|
||||
setChunkingStrategy(defaults?.chunking_strategy ?? "standard");
|
||||
setMode(defaults?.mode ?? "text");
|
||||
setMode(defaults?.mode ?? "multimodal");
|
||||
setError(null);
|
||||
setSubmitting(false);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export function RagDefaultsSection() {
|
|||
|
||||
const [chunkingStrategy, setChunkingStrategy] =
|
||||
useState<ChunkingStrategy>("standard");
|
||||
const [mode, setMode] = useState<KBMode>("text");
|
||||
const [mode, setMode] = useState<KBMode>("multimodal");
|
||||
const [embeddingModel, setEmbeddingModel] = useState("");
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue