# Embeddings & Vector Search Configuration Fragment
# Used by: kogral-config form

[[elements]]
border_top = true
border_bottom = false
name = "embeddings_section_header"
title = "🔍 Embeddings & Vector Search"
type = "section_header"

[[elements]]
default = true
help = "Enable embedding generation for semantic search"
name = "embeddings_enabled"
nickel_path = ["embeddings", "enabled"]
prompt = "Enable Embeddings"
type = "boolean"

[[elements]]
default = "fastembed"
help = "Embedding provider (local or cloud APIs)"
name = "embeddings_provider"
nickel_path = ["embeddings", "provider"]
options = ["fastembed", "openai", "claude", "ollama"]
prompt = "Embedding Provider"
type = "select"
visible_if = "embeddings_enabled == true"

[[elements]]
default = "BAAI/bge-small-en-v1.5"
help = "Model identifier or name for embeddings"
name = "embeddings_model"
nickel_path = ["embeddings", "model"]
placeholder = "BAAI/bge-small-en-v1.5"
prompt = "Model"
type = "text"
visible_if = "embeddings_enabled == true"

[[elements]]
default = 384
help = "Vector dimension (typical values: 384, 768, 1024, 1536)"
name = "embeddings_dimensions"
nickel_path = ["embeddings", "dimensions"]
options = [384, 768, 1024, 1536]
prompt = "Vector Dimensions"
type = "number"
visible_if = "embeddings_enabled == true"

[[elements]]
default = "OPENAI_API_KEY"
help = "Environment variable containing API credentials"
name = "embeddings_api_key_env"
nickel_path = ["embeddings", "api_key_env"]
placeholder = "OPENAI_API_KEY"
prompt = "API Key Variable"
type = "text"
visible_if = "embeddings_enabled == true && embeddings_provider != 'fastembed' && embeddings_provider != 'ollama'"
