8000 updated integration test · masmullin2000/llama_cpp-rs@c90b228 · GitHub
[go: up one dir, main page]

Skip to content

Commit c90b228

Browse files
committed
updated integration test
1 parent b86272d commit c90b228

File tree

1 file changed

+15
-0
lines changed
  • crates/llama_cpp_tests/src

1 file changed

+15
-0
lines changed

crates/llama_cpp_tests/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ mod tests {
2121
CompletionHandle, EmbeddingsParams, LlamaModel, LlamaParams, SessionParams, TokensToStrings,
2222
};
2323

24+
fn init_tracing() {
25+
let format = tracing_subscriber::fmt::layer().compact();
26+
let filter = tracing_subscriber::EnvFilter::try_from_default_env().unwrap_or(
27+
tracing_subscriber::EnvFilter::default()
28+
.add_directive(tracing_subscriber::filter::LevelFilter::INFO.into()),
29+
);
30+
31+
tracing_subscriber::registry()
32+
.with(format)
33+
.with(filter)
34+
.init();
35+
}
36+
2437
async fn list_models(dir: impl AsRef<Path>) -> Vec<String> {
2538
let dir = dir.as_ref();
2639

@@ -139,6 +152,8 @@ mod tests {
139152

140153
#[tokio::test]
141154
async fn embed() {
155+
init_tracing();
156+
142157
let dir = std::env::var("LLAMA_EMBED_MODELS_DIR").unwrap_or_else(|_| {
143158
panic!(
144159
"LLAMA_EMBED_MODELS_DIR environment variable not set. \

0 commit comments

Comments
 (0)
0