generalbots/botui/build.rs
Rodrigo Rodriguez 1a36f4aed2 fix: Embedding server auto-config and KB indexing fixes
- botserver/src/llm/local.rs:
  * Auto-configure embedding-url when empty (http://localhost:8082/v1/embeddings)
  * Auto-configure llm-url when empty (http://localhost:8081/v1/chat/completions)
  * Persist defaults to bot_configuration table via ConfigManager
  * Fix llama-server command path and add LD_LIBRARY_PATH
  * Fix working_dir for Linux (not just Windows)
  * Fix embedding server args: --embeddings --pooling mean --ctx-size 512

- botserver/src/core/bootstrap/bootstrap_manager.rs:
  * Temp disable alm-ci startup (causes 20s hang in bootstrap)
  * Remove unused alm_ci_health_check import

- Database changes:
  * bot_configuration.embedding-model: 'bge-small-en-v1.5-f32.gguf' (full filename)
  * bot_configuration.embedding-url: 'http://localhost:8082/v1/embeddings' (auto-generated)

- Testing:
  * Embedding server responds on port 8082
  * Generates 384-dimension embeddings
  * KB file exists: minio://default.gbai/default.gbkb/manual/test-kb-manual.txt
  * Next: Verify KB indexing and search functionality

Refs: #498
2026-04-28 14:27:00 -03:00

23 lines
No EOL
631 B
Rust

fn main() {
let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let ui_path = std::path::Path::new(&manifest_dir).join("ui");
println!("cargo:rustc-env=BOTUI_UI_PATH={}", ui_path.display());
let commit = std::env::var("BOTUI_COMMIT")
.ok()
.or_else(|| git_commit_hash());
if let Some(hash) = commit {
println!("cargo:rustc-env=BOTUI_COMMIT={}", hash);
}
}
fn git_commit_hash() -> Option<String> {
let output = std::process::Command::new("git")
.args(["rev-parse", "--short", "HEAD"])
.output()
.ok()?;
if !output.status.success() {
return None;
}
String::from_utf8(output.stdout).ok().map(|s| s.trim().to_string())
}