diff options
| author | curricane chen <36157286+Curricane@users.noreply.github.com> | 2025-08-08 06:41:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-08 06:41:58 +0800 |
| commit | 41cc0fc69079047810259796d22b591f7dee3e98 (patch) | |
| tree | b8cfabe219eb096b3dc6f817b6abc52a4f19c078 | |
| parent | cb888ef97e4123a1c27bce21ca99360e55ab1481 (diff) | |
| download | aichat-41cc0fc69079047810259796d22b591f7dee3e98.tar.gz | |
chore: remove redundant text check in use_embeddings method (#1378)
Co-authored-by: chenmch <chenmch@diit.cn>
| -rw-r--r-- | src/config/input.rs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/config/input.rs b/src/config/input.rs index 545e99d..d6d154b 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -196,14 +196,11 @@ impl Input { if self.text.is_empty() { return Ok(()); } - if !self.text.is_empty() { - let rag = self.config.read().rag.clone(); - if let Some(rag) = rag { - let result = - Config::search_rag(&self.config, &rag, &self.text, abort_signal).await?; - self.patched_text = Some(result); - self.rag_name = Some(rag.name().to_string()); - } + let rag = self.config.read().rag.clone(); + if let Some(rag) = rag { + let result = Config::search_rag(&self.config, &rag, &self.text, abort_signal).await?; + self.patched_text = Some(result); + self.rag_name = Some(rag.name().to_string()); } Ok(()) } |
