fix: remove LLM streaming lock that caused deadlocks
All checks were successful
BotServer CI/CD / build (push) Successful in 3m40s
All checks were successful
BotServer CI/CD / build (push) Successful in 3m40s
This commit is contained in:
parent
7d911194f3
commit
6468588f58
2 changed files with 14 additions and 13 deletions
|
|
@ -10,7 +10,7 @@ use tool_executor::ToolExecutor;
|
|||
use crate::core::config::ConfigManager;
|
||||
|
||||
#[cfg(feature = "drive")]
|
||||
use crate::drive::drive_monitor::{DriveMonitor, set_llm_streaming};
|
||||
use crate::drive::drive_monitor::{DriveMonitor};
|
||||
#[cfg(feature = "llm")]
|
||||
use crate::llm::llm_models;
|
||||
#[cfg(feature = "llm")]
|
||||
|
|
@ -811,9 +811,9 @@ impl BotOrchestrator {
|
|||
// Clone messages for the async task
|
||||
let messages_clone = messages.clone();
|
||||
|
||||
// Set flag to prevent DriveMonitor PDF downloads during LLM streaming
|
||||
#[cfg(feature = "drive")]
|
||||
set_llm_streaming(true);
|
||||
// REMOVED: LLM streaming lock was causing deadlocks
|
||||
// #[cfg(feature = "drive")]
|
||||
// set_llm_streaming(true);
|
||||
|
||||
let stream_tx_clone = stream_tx.clone();
|
||||
tokio::spawn(async move {
|
||||
|
|
@ -823,8 +823,9 @@ impl BotOrchestrator {
|
|||
{
|
||||
error!("LLM streaming error: {}", e);
|
||||
}
|
||||
#[cfg(feature = "drive")]
|
||||
set_llm_streaming(false);
|
||||
// REMOVED: LLM streaming lock was causing deadlocks
|
||||
// #[cfg(feature = "drive")]
|
||||
// set_llm_streaming(false);
|
||||
});
|
||||
|
||||
let mut full_response = String::new();
|
||||
|
|
|
|||
|
|
@ -1685,13 +1685,13 @@ let file_state = FileState {
|
|||
files_processed += 1;
|
||||
debug!("[GBKB] Queue size: {}/10", files_to_process.len());
|
||||
|
||||
// Skip downloads if LLM is actively streaming to prevent deadlock
|
||||
#[cfg(any(feature = "research", feature = "llm"))]
|
||||
if is_llm_streaming() {
|
||||
debug!("[GBKB] Skipping download - LLM is streaming, will retry later");
|
||||
files_to_process.clear();
|
||||
break;
|
||||
}
|
||||
// REMOVED: Skip downloads if LLM is actively streaming - was causing deadlocks
|
||||
// #[cfg(any(feature = "research", feature = "llm"))]
|
||||
// if is_llm_streaming() {
|
||||
// debug!("[GBKB] Skipping download - LLM is streaming, will retry later");
|
||||
// files_to_process.clear();
|
||||
// break;
|
||||
// }
|
||||
|
||||
if files_to_process.len() >= 10 {
|
||||
debug!("[GBKB] Downloading batch of {} files", files_to_process.len());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue