Expand description
Shared types for the langchainrust workspace.
This crate contains types that are needed by multiple sub-crates, breaking circular dependencies:
-
Tool types (
ToolCall,FunctionCall,ToolCallResult): needed by bothlc-schema(Message uses ToolCall) andlc-core(tool definitions). -
Document types (
Document,VectorDocument,SearchResult,ChunkDocument): needed by bothlc-vector-storesandlc-rag. -
Splitter types (
TextSplitter,RecursiveCharacterSplitter): needed by bothlc-vector-storesandlc-rag.
Re-exports§
pub use json_repair::parse_tolerant_json;pub use json_repair::repair_json;pub use json_repair::JsonRepairError;
Modules§
- document
- json_
repair - Tolerant JSON parsing for LLM outputs.
- splitter
- tools
Structs§
- Chunk
Document - Chunk document (split document fragment).
- Document
- Document structure.
- Function
Call - Function call inside a ToolCall
- Recursive
Character Splitter - Recursive character splitter
- Search
Result - Search result.
- Tool
Call - Tool call from LLM response
- Tool
Call Result - Tool call result to send back to LLM
- Vector
Document - Vector document with embedding.
Traits§
- Text
Splitter - Text splitter trait