Load language models in the background
This commit is contained in:
parent
92b0184036
commit
22046ef9a7
4 changed files with 83 additions and 69 deletions
|
@ -90,13 +90,12 @@ pub fn init(
|
|||
.detach();
|
||||
|
||||
cx.spawn(move |cx| async move {
|
||||
let embedding_provider =
|
||||
OpenAIEmbeddingProvider::new(http_client, cx.background_executor().clone()).await;
|
||||
let semantic_index = SemanticIndex::new(
|
||||
fs,
|
||||
db_file_path,
|
||||
Arc::new(OpenAIEmbeddingProvider::new(
|
||||
http_client,
|
||||
cx.background_executor().clone(),
|
||||
)),
|
||||
Arc::new(embedding_provider),
|
||||
language_registry,
|
||||
cx.clone(),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue