- Remove of all warnings.

This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-10-07 10:53:09 -03:00
parent a8c2a5ba25
commit 4251757391
5 changed files with 88 additions and 124 deletions

168
Cargo.lock generated
View file

@ -546,7 +546,7 @@ dependencies = [
"polling", "polling",
"rustix", "rustix",
"slab", "slab",
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -769,7 +769,7 @@ dependencies = [
"miniz_oxide", "miniz_oxide",
"object", "object",
"rustc-demangle", "rustc-demangle",
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -1064,7 +1064,7 @@ dependencies = [
"num-traits", "num-traits",
"serde", "serde",
"wasm-bindgen", "wasm-bindgen",
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -1731,7 +1731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -1783,12 +1783,6 @@ dependencies = [
"pin-project-lite", "pin-project-lite",
] ]
[[package]]
name = "fallible-iterator"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7"
[[package]] [[package]]
name = "fancy-regex" name = "fancy-regex"
version = "0.12.0" version = "0.12.0"
@ -2888,7 +2882,6 @@ dependencies = [
"html-escape", "html-escape",
"log", "log",
"mockito", "mockito",
"pgvector",
"qdrant-client", "qdrant-client",
"readability", "readability",
"regex", "regex",
@ -2898,7 +2891,6 @@ dependencies = [
"secrecy", "secrecy",
"serde", "serde",
"serde_json", "serde_json",
"sqlx",
"strum_macros", "strum_macros",
"text-splitter", "text-splitter",
"thiserror 1.0.69", "thiserror 1.0.69",
@ -2979,7 +2971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -3005,7 +2997,6 @@ version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149"
dependencies = [ dependencies = [
"cc",
"pkg-config", "pkg-config",
"vcpkg", "vcpkg",
] ]
@ -3632,7 +3623,7 @@ dependencies = [
"libc", "libc",
"redox_syscall", "redox_syscall",
"smallvec", "smallvec",
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -3753,17 +3744,6 @@ dependencies = [
"indexmap 2.11.4", "indexmap 2.11.4",
] ]
[[package]]
name = "pgvector"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc58e2d255979a31caa7cabfa7aac654af0354220719ab7a68520ae7a91e8c0b"
dependencies = [
"bytes",
"postgres-types",
"sqlx",
]
[[package]] [[package]]
name = "phf" name = "phf"
version = "0.10.1" version = "0.10.1"
@ -3935,7 +3915,7 @@ dependencies = [
"hermit-abi", "hermit-abi",
"pin-project-lite", "pin-project-lite",
"rustix", "rustix",
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -3965,35 +3945,6 @@ dependencies = [
"portable-atomic", "portable-atomic",
] ]
[[package]]
name = "postgres-protocol"
version = "0.6.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbef655056b916eb868048276cfd5d6a7dea4f81560dfd047f97c8c6fe3fcfd4"
dependencies = [
"base64 0.22.1",
"byteorder",
"bytes",
"fallible-iterator",
"hmac",
"md-5",
"memchr",
"rand 0.9.2",
"sha2",
"stringprep",
]
[[package]]
name = "postgres-types"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77a120daaabfcb0e324d5bf6e411e9222994cb3795c79943a0ef28ed27ea76e4"
dependencies = [
"bytes",
"fallible-iterator",
"postgres-protocol",
]
[[package]] [[package]]
name = "potential_utf" name = "potential_utf"
version = "0.1.3" version = "0.1.3"
@ -4594,7 +4545,7 @@ dependencies = [
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -4724,7 +4675,7 @@ version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"
dependencies = [ dependencies = [
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -5107,7 +5058,6 @@ dependencies = [
"indexmap 2.11.4", "indexmap 2.11.4",
"log", "log",
"memchr", "memchr",
"native-tls",
"once_cell", "once_cell",
"percent-encoding", "percent-encoding",
"rustls 0.23.32", "rustls 0.23.32",
@ -5479,7 +5429,7 @@ dependencies = [
"getrandom 0.3.3", "getrandom 0.3.3",
"once_cell", "once_cell",
"rustix", "rustix",
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -6359,7 +6309,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [ dependencies = [
"windows-sys 0.61.1", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@ -6370,22 +6320,22 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "windows-core" name = "windows-core"
version = "0.62.1" version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [ dependencies = [
"windows-implement", "windows-implement",
"windows-interface", "windows-interface",
"windows-link 0.2.0", "windows-link 0.2.1",
"windows-result 0.4.0", "windows-result 0.4.1",
"windows-strings 0.5.0", "windows-strings 0.5.1",
] ]
[[package]] [[package]]
name = "windows-implement" name = "windows-implement"
version = "0.60.1" version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -6394,9 +6344,9 @@ dependencies = [
[[package]] [[package]]
name = "windows-interface" name = "windows-interface"
version = "0.59.2" version = "0.59.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -6411,9 +6361,9 @@ checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]] [[package]]
name = "windows-link" name = "windows-link"
version = "0.2.0" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]] [[package]]
name = "windows-registry" name = "windows-registry"
@ -6437,11 +6387,11 @@ dependencies = [
[[package]] [[package]]
name = "windows-result" name = "windows-result"
version = "0.4.0" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
dependencies = [ dependencies = [
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -6455,11 +6405,11 @@ dependencies = [
[[package]] [[package]]
name = "windows-strings" name = "windows-strings"
version = "0.5.0" version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
dependencies = [ dependencies = [
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -6504,16 +6454,16 @@ version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [ dependencies = [
"windows-targets 0.53.4", "windows-targets 0.53.5",
] ]
[[package]] [[package]]
name = "windows-sys" name = "windows-sys"
version = "0.61.1" version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [ dependencies = [
"windows-link 0.2.0", "windows-link 0.2.1",
] ]
[[package]] [[package]]
@ -6564,19 +6514,19 @@ dependencies = [
[[package]] [[package]]
name = "windows-targets" name = "windows-targets"
version = "0.53.4" version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [ dependencies = [
"windows-link 0.2.0", "windows-link 0.2.1",
"windows_aarch64_gnullvm 0.53.0", "windows_aarch64_gnullvm 0.53.1",
"windows_aarch64_msvc 0.53.0", "windows_aarch64_msvc 0.53.1",
"windows_i686_gnu 0.53.0", "windows_i686_gnu 0.53.1",
"windows_i686_gnullvm 0.53.0", "windows_i686_gnullvm 0.53.1",
"windows_i686_msvc 0.53.0", "windows_i686_msvc 0.53.1",
"windows_x86_64_gnu 0.53.0", "windows_x86_64_gnu 0.53.1",
"windows_x86_64_gnullvm 0.53.0", "windows_x86_64_gnullvm 0.53.1",
"windows_x86_64_msvc 0.53.0", "windows_x86_64_msvc 0.53.1",
] ]
[[package]] [[package]]
@ -6599,9 +6549,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]] [[package]]
name = "windows_aarch64_gnullvm" name = "windows_aarch64_gnullvm"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
@ -6623,9 +6573,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]] [[package]]
name = "windows_aarch64_msvc" name = "windows_aarch64_msvc"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
@ -6647,9 +6597,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]] [[package]]
name = "windows_i686_gnu" name = "windows_i686_gnu"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
[[package]] [[package]]
name = "windows_i686_gnullvm" name = "windows_i686_gnullvm"
@ -6659,9 +6609,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]] [[package]]
name = "windows_i686_gnullvm" name = "windows_i686_gnullvm"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
@ -6683,9 +6633,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]] [[package]]
name = "windows_i686_msvc" name = "windows_i686_msvc"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
@ -6707,9 +6657,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]] [[package]]
name = "windows_x86_64_gnu" name = "windows_x86_64_gnu"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
[[package]] [[package]]
name = "windows_x86_64_gnullvm" name = "windows_x86_64_gnullvm"
@ -6731,9 +6681,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]] [[package]]
name = "windows_x86_64_gnullvm" name = "windows_x86_64_gnullvm"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
@ -6755,9 +6705,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
[[package]] [[package]]
name = "windows_x86_64_msvc" name = "windows_x86_64_msvc"
version = "0.53.0" version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]] [[package]]
name = "winreg" name = "winreg"

View file

@ -8,10 +8,9 @@ license = "AGPL-3.0"
repository = "https://github.pragmatismo.com.br/generalbots/botserver" repository = "https://github.pragmatismo.com.br/generalbots/botserver"
[features] [features]
default = ["postgres", "qdrant"] default = ["qdrant"]
local_llm = []
postgres = ["sqlx/postgres"]
qdrant = ["langchain-rust/qdrant"] qdrant = ["langchain-rust/qdrant"]
email = ["imap"]
[dependencies] [dependencies]
actix-cors = "0.7" actix-cors = "0.7"
@ -31,8 +30,8 @@ downloader = "0.2"
env_logger = "0.11" env_logger = "0.11"
futures = "0.3" futures = "0.3"
futures-util = "0.3" futures-util = "0.3"
imap = "2.4" imap = {version="2.4.1", optional=true}
langchain-rust = { version = "4.6", features = ["qdrant", "postgres"] } langchain-rust = { version = "4.6", features = ["qdrant",] }
lettre = { version = "0.11", features = ["smtp-transport", "builder", "tokio1", "tokio1-native-tls"] } lettre = { version = "0.11", features = ["smtp-transport", "builder", "tokio1", "tokio1-native-tls"] }
livekit = "0.7" livekit = "0.7"
log = "0.4" log = "0.4"

View file

@ -1,12 +1,13 @@
#[cfg(feature = "email")]
pub mod create_draft; pub mod create_draft;
pub mod create_site; pub mod create_site;
pub mod find; pub mod find;
pub mod first; pub mod first;
pub mod last;
pub mod format;
pub mod for_next; pub mod for_next;
pub mod format;
pub mod get; pub mod get;
pub mod get_website; pub mod get_website;
pub mod last;
pub mod llm_keyword; pub mod llm_keyword;
pub mod on; pub mod on;
pub mod print; pub mod print;

View file

@ -1,6 +1,8 @@
mod keywords; mod keywords;
#[cfg(feature = "email")]
use self::keywords::create_draft::create_draft_keyword; use self::keywords::create_draft::create_draft_keyword;
use self::keywords::create_site::create_site_keyword; use self::keywords::create_site::create_site_keyword;
use self::keywords::find::find_keyword; use self::keywords::find::find_keyword;
use self::keywords::first::first_keyword; use self::keywords::first::first_keyword;
@ -31,7 +33,9 @@ impl ScriptService {
engine.set_allow_anonymous_fn(true); engine.set_allow_anonymous_fn(true);
engine.set_allow_looping(true); engine.set_allow_looping(true);
#[cfg(feature = "email")]
create_draft_keyword(state, &mut engine); create_draft_keyword(state, &mut engine);
create_site_keyword(state, &mut engine); create_site_keyword(state, &mut engine);
find_keyword(state, &mut engine); find_keyword(state, &mut engine);
for_keyword(state, &mut engine); for_keyword(state, &mut engine);

View file

@ -15,6 +15,7 @@ mod channels;
mod chart; mod chart;
mod config; mod config;
mod context; mod context;
#[cfg(feature = "email")]
mod email; mod email;
mod file; mod file;
mod llm; mod llm;
@ -33,6 +34,7 @@ use crate::bot::{
}; };
use crate::channels::{VoiceAdapter, WebChannelAdapter}; use crate::channels::{VoiceAdapter, WebChannelAdapter};
use crate::config::AppConfig; use crate::config::AppConfig;
#[cfg(feature = "email")]
use crate::email::{ use crate::email::{
get_emails, get_latest_email_from, list_emails, save_click, save_draft, send_email, get_emails, get_latest_email_from, list_emails, save_click, save_draft, send_email,
}; };
@ -170,7 +172,8 @@ async fn main() -> std::io::Result<()> {
.allow_any_header() .allow_any_header()
.max_age(3600); .max_age(3600);
App::new() // Begin building the Actix App
let app = App::new()
.wrap(cors) .wrap(cors)
.wrap(Logger::default()) .wrap(Logger::default())
.wrap(Logger::new("HTTP REQUEST: %a %{User-Agent}i")) .wrap(Logger::new("HTTP REQUEST: %a %{User-Agent}i"))
@ -178,15 +181,9 @@ async fn main() -> std::io::Result<()> {
// Legacy services // Legacy services
.service(upload_file) .service(upload_file)
.service(list_file) .service(list_file)
.service(save_click)
.service(get_emails)
.service(list_emails)
.service(send_email)
.service(chat_completions_local) .service(chat_completions_local)
.service(save_draft)
.service(generic_chat_completions) .service(generic_chat_completions)
.service(embeddings_local) .service(embeddings_local)
.service(get_latest_email_from)
// New bot services // New bot services
.service(index) .service(index)
.service(static_files) .service(static_files)
@ -198,7 +195,20 @@ async fn main() -> std::io::Result<()> {
.service(create_session) .service(create_session)
.service(get_sessions) .service(get_sessions)
.service(get_session_history) .service(get_session_history)
.service(set_mode_handler) .service(set_mode_handler);
// Conditional email feature services
#[cfg(feature = "email")]
{
app = app
.service(get_latest_email_from)
.service(get_emails)
.service(list_emails)
.service(send_email)
.service(save_draft);
}
app
}) })
.bind((config.server.host.clone(), config.server.port))? .bind((config.server.host.clone(), config.server.port))?
.run() .run()