Docs.rs
offline-intelligence-0.1.5
offline-intelligence 0.1.5
Docs.rs crate page
Apache-2.0
Links
Homepage
Repository
crates.io
Source
Owners
OfflineIntelligence
Dependencies
anyhow ^1.0
normal
arc-swap ^1.7
normal
argon2 ^0.5
normal
async-stream ^0.3
normal
async-trait ^0.1
normal
axum ^0.7
normal
base64 ^0.22
normal
bincode ^1.3
normal
blake3 ^1.5
normal
bytes ^1.5
normal
calamine ^0.26
normal
chrono ^0.4
normal
clap ^4.4
normal
crossbeam-queue ^0.3
normal
dashmap ^5.5
normal
dirs ^5.0
normal
dotenvy ^0.15
normal
flate2 ^1.0
normal
fs2 ^0.4
normal
futures ^0.3
normal
futures-util ^0.3
normal
gguf ^0.1
normal
hex ^0.4
normal
hora ^0.1
normal
jsonwebtoken ^9
normal
lazy_static ^1.4
normal
lettre ^0.11
normal
lopdf ^0.32
normal
mime_guess ^2.0
normal
moka ^0.12
normal
num_cpus ^1.16
normal
nvml-wrapper ^0.10
normal
optional
pin-project-lite ^0.2
normal
png ^0.17
normal
prometheus ^0.13
normal
r2d2 ^0.8
normal
r2d2_sqlite ^0.25
normal
rand ^0.8
normal
rayon ^1.8
normal
regex ^1.10
normal
reqwest ^0.12
normal
rusqlite ^0.32
normal
serde ^1.0
normal
serde_json ^1.0
normal
sysinfo ^0.30
normal
tar ^0.4
normal
tempfile ^3.8
normal
tokio ^1
normal
tokio-stream ^0.1
normal
tower ^0.4
normal
tower-http ^0.5
normal
tracing ^0.1
normal
tracing-subscriber ^0.3
normal
uuid ^1.7
normal
validator ^0.16
normal
walkdir ^2.4
normal
which ^1.0
normal
whoami ^1.5
normal
zip ^1.1
normal
mockito ^1.2
dev
proptest ^1.4
dev
tokio-test ^0.4
dev
core-graphics ^0.23
normal
objc2 ^0.5
normal
objc2-foundation ^0.2
normal
objc2-vision ^0.3
normal
windows ^0.52
normal
Versions
42.45%
of the crate is documented
Platform
x86_64-unknown-linux-gnu
Feature flags
docs.rs
About docs.rs
Badges
Builds
Metadata
Shorthand URLs
Download
Rustdoc JSON
Build queue
Privacy policy
Rust
Rust website
The Book
Standard Library API Reference
Rust by Example
The Cargo Guide
Clippy Documentation
Skip to main content
Module file_processor
offline_
intelligence
0.1.5
Module file_
processor
Module Items
Functions
In offline_
intelligence::
utils
offline_intelligence
::
utils
Module
file_
processor
Copy item path
Source
Functions
§
estimate_
tokens
Rough token estimate: 1 token ≈ 4 characters (common approximation).
extract_
content_
from_
bytes
Extract text from bytes with file extension
extract_
file_
content
Extract text content from various file formats
is_
extraction_
sentinel
Returns
true
when
file_processor
returned a sentinel error string instead of real content. Sentinels always start with
[
and describe a failure. Used by both
stream_api
(cache-hit guard) and
attachment_api
(preprocess guard).
truncate_
to_
budget
Truncate
text
so it fits within
max_tokens
, breaking at the last newline before the limit to avoid cutting mid-sentence.