Skip to main content

Crate lc_shared

Crate lc_shared 

Source
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 both lc-schema (Message uses ToolCall) and lc-core (tool definitions).

  • Document types (Document, VectorDocument, SearchResult, ChunkDocument): needed by both lc-vector-stores and lc-rag.

  • Splitter types (TextSplitter, RecursiveCharacterSplitter): needed by both lc-vector-stores and lc-rag.

Modules§

document
splitter
tools

Structs§

CharacterTextSplitter
Simple character splitter
ChunkDocument
Chunk document (split document fragment).
Document
Document structure.
FunctionCall
Function call inside a ToolCall
RecursiveCharacterSplitter
Recursive character splitter
SearchResult
Search result.
ToolCall
Tool call from LLM response
ToolCallResult
Tool call result to send back to LLM
VectorDocument
Vector document with embedding.

Traits§

TextSplitter
Text splitter trait