mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-16 03:48:28 +00:00
Kept the runtime API responsive during blocking work (#1043)
This commit is contained in:
1 parent
4616d1a4b2
commit
fb756dd767
11 files changed
+389
-77
No files matched your search
@@ -524,7 +524,7 @@ pub async fn extract_data(
|
||||
// whole file, and a failure here means we cannot answer the request at all.
|
||||
//
|
||||
let tokenizer = if query.include_token_count {
|
||||
match crate::tokenizer::get_tokenizer(&query.tokenizer_path) {
|
||||
match crate::tokenizer::get_tokenizer_off_worker(query.tokenizer_path.clone()).await {
|
||||
Ok(tokenizer) => Some(tokenizer),
|
||||
Err(e) => {
|
||||
let error = ExtractionError::new(ExtractionErrorCode::InvalidRequest, format!("The tokenizer could not be loaded: {e}"));
|
||||
|
||||
Reference in new issue
Block a user