langchain_rust/lib.rs
1#![allow(dead_code)]
2//! # Observability
3//!
4//! The crate is instrumented with [`tracing`]: every LLM call runs in an `llm.generate`
5//! span (provider, model, token usage, tool call count, error), embeddings in
6//! `embed.documents` / `embed.query`, `LLMChain` in `chain.call`, and agent runs in
7//! `agent.run` with an `agent.plan` span per step and a `tool.call` span per tool.
8//! Install any subscriber (`tracing-subscriber`, OpenTelemetry, Langfuse...) to see them.
9//! Without one, log events are forwarded to the [`log`](https://docs.rs/log) crate, so
10//! `env_logger` keeps working.
11pub mod agent;
12mod blocking;
13pub mod chain;
14pub mod document_loaders;
15pub mod embedding;
16pub mod language_models;
17pub mod llm;
18pub mod memory;
19mod observability;
20pub mod output_parsers;
21pub mod prompt;
22pub mod schemas;
23pub mod semantic_router;
24pub mod text_splitter;
25pub mod tools;
26pub mod vectorstore;
27
28#[cfg(test)]
29pub(crate) mod test_utils;
30
31pub use url;