You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CTX_COLLECTION=$(grep -o '"default_collection"[[:space:]]*:[[:space:]]*"[^"]*"'"$CONFIG_FILE"| sed 's/.*"default_collection"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
42
+
REFRAG_RUNTIME=$(grep -o '"refrag_runtime"[[:space:]]*:[[:space:]]*"[^"]*"'"$CONFIG_FILE"| sed 's/.*"refrag_runtime"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/'||echo"glm")
43
+
GLM_API_KEY=$(grep -o '"glm_api_key"[[:space:]]*:[[:space:]]*"[^"]*"'"$CONFIG_FILE"| sed 's/.*"glm_api_key"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
44
+
GLM_API_BASE=$(grep -o '"glm_api_base"[[:space:]]*:[[:space:]]*"[^"]*"'"$CONFIG_FILE"| sed 's/.*"glm_api_base"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
45
+
GLM_MODEL=$(grep -o '"glm_model"[[:space:]]*:[[:space:]]*"[^\"]*"'"$CONFIG_FILE"| sed 's/.*"glm_model"[[:space:]]*:[[:space:]]*"\([^\"]*\)".*/\1/'||echo"glm-4.6")
46
+
CTX_DEFAULT_MODE=$(grep -o '"default_mode"[[:space:]]*:[[:space:]]*"[^\"]*"'"$CONFIG_FILE"| sed 's/.*"default_mode"[[:space:]]*:[[:space:]]*"\([^\"]*\)".*/\1/')
47
+
CTX_REQUIRE_CONTEXT=$(grep -o '"require_context"[[:space:]]*:[[:space:]]*\(true\|false\)'"$CONFIG_FILE"| sed 's/.*"require_context"[[:space:]]*:[[:space:]]*\(true\|false\).*/\1/')
48
+
CTX_RELEVANCE_GATE=$(grep -o '"relevance_gate_enabled"[[:space:]]*:[[:space:]]*\(true\|false\)'"$CONFIG_FILE"| sed 's/.*"relevance_gate_enabled"[[:space:]]*:[[:space:]]*\(true\|false\).*/\1/')
49
+
CTX_MIN_RELEVANCE=$(grep -o '"min_relevance"[[:space:]]*:[[:space:]]*[0-9.][0-9.]*'"$CONFIG_FILE"| sed 's/.*"min_relevance"[[:space:]]*:[[:space:]]*\([0-9.][0-9.]*\).*/\1/')
50
+
fi
51
+
52
+
# Set defaults if not found in config
53
+
CTX_COLLECTION=${CTX_COLLECTION:-"codebase"}
54
+
REFRAG_RUNTIME=${REFRAG_RUNTIME:-"glm"}
55
+
GLM_API_KEY=${GLM_API_KEY:-}
56
+
GLM_API_BASE=${GLM_API_BASE:-}
57
+
GLM_MODEL=${GLM_MODEL:-"glm-4.6"}
58
+
CTX_DEFAULT_MODE=${CTX_DEFAULT_MODE:-"default"}
59
+
CTX_REQUIRE_CONTEXT=${CTX_REQUIRE_CONTEXT:-true}
60
+
CTX_RELEVANCE_GATE=${CTX_RELEVANCE_GATE:-false}
61
+
CTX_MIN_RELEVANCE=${CTX_MIN_RELEVANCE:-0.1}
62
+
63
+
# Export GLM/context environment variables from config
0 commit comments