Skip to content

Commit

Permalink
chore: update log
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Jul 4, 2024
1 parent b5a8779 commit b9d0c60
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions appflowy-local-ai-chat/tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ impl LocalAITest {
Ok(Self { config, manager })
}
pub async fn init_chat_plugin(&self) -> PluginId {
if !PathBuf::from(&self.config.chat_bin_path).exists() {
panic!("Model path does not exist: {:?}", self.config.chat_bin_path);
}
let info = PluginInfo {
name: "chat".to_string(),
exec_path: self.config.chat_bin_path.clone(),
Expand All @@ -53,10 +56,17 @@ impl LocalAITest {
}

pub async fn init_embedding_plugin(&self) -> PluginId {
if !PathBuf::from(&self.config.embedding_bin_path).exists() {
panic!("Model path does not exist: {:?}", self.config.embedding_bin_path);
}


let info = PluginInfo {
name: "embedding".to_string(),
exec_path: self.config.embedding_bin_path.clone(),
};


let plugin_id = self.manager.create_plugin(info).await.unwrap();
let embedding_model_path = self.config.embedding_model_absolute_path();
if !PathBuf::from(&embedding_model_path).exists() {
Expand Down

0 comments on commit b9d0c60

Please sign in to comment.