langchainrust 0.2.2

A LangChain-inspired framework for building LLM applications in Rust. Supports OpenAI, Agents, Tools, Memory, Chains, and RAG.
[package]

name = "langchainrust"

version = "0.2.2"

edition = "2021"

license = "MIT OR Apache-2.0"

description = "A LangChain-inspired framework for building LLM applications in Rust. Supports OpenAI, Agents, Tools, Memory, Chains, and RAG."

repository = "https://github.com/atliliw/langchainrust"

homepage = "https://github.com/atliliw/langchainrust"

documentation = "https://docs.rs/langchainrust"

readme = "README.md"

keywords = ["llm", "langchain", "ai", "rust", "openai"]

categories = ["algorithms", "asynchronous", "api-bindings", "science"]

authors = ["atliliw"]

exclude = [

    "/docs",

    "/.github",

    "/langchain",

]



[dependencies]

reqwest = { version = "0.11", features = ["json", "stream"] }

tokio = { version = "1.0", features = ["full"] }

serde = { version = "1.0", features = ["derive"] }

serde_json = "1.0"

async-trait = "0.1"

regex = "1"

uuid = { version = "1.10", features = ["v4", "v7", "serde"] }

futures-util = "0.3"

schemars = "0.8"

chrono = { version = "0.4", features = ["serde"] }

qdrant-client = { version = "1.7", optional = true }

pdf-extract = "0.7"

csv = "1.3"



[dev-dependencies]

tokio-test = "0.4"

tempfile = "3.0"



[features]

default = []

experimental = []

qdrant-integration = ["qdrant-client"]



[package.metadata.docs.rs]

all-features = true

rustdoc-args = ["--cfg", "docsrs"]



# ============================================================================

# 单元测试 - 不需要 API Key

# ============================================================================

[[test]]

name = "unit_schema"

path = "tests/unit/schema.rs"



[[test]]

name = "unit_prompts"

path = "tests/unit/prompts.rs"



[[test]]

name = "unit_tools"

path = "tests/unit/tools.rs"



[[test]]

name = "unit_memory"

path = "tests/unit/memory.rs"



[[test]]

name = "unit_retrieval"

path = "tests/unit/retrieval.rs"



[[test]]

name = "unit_loaders_csv"

path = "tests/unit/loaders_csv.rs"



[[test]]

name = "unit_vectorstores"

path = "tests/unit/vectorstores.rs"



[[test]]

name = "unit_callbacks"

path = "tests/unit/callbacks.rs"



[[test]]

name = "unit_tool_calling"

path = "tests/unit/tool_calling.rs"



[[test]]

name = "qdrant_tutorial"

path = "tests/qdrant_tutorial.rs"

required-features = ["qdrant-integration"]



# ============================================================================

# 整合测试 - 需要 API Key

# ============================================================================

[[test]]

name = "integration_agent_memory"

path = "tests/integration/agent_memory.rs"



[[test]]

name = "integration_rag_pipeline"

path = "tests/integration/rag_pipeline.rs"



[[test]]

name = "integration_chain_workflow"

path = "tests/integration/chain_workflow.rs"



[[test]]

name = "integration_agent"

path = "tests/integration/agent_test.rs"



[[test]]

name = "integration_agent_react"

path = "tests/integration/agent_react.rs"



[[test]]

name = "integration_chains"

path = "tests/integration/chains.rs"



[[test]]

name = "integration_embeddings"

path = "tests/integration/embeddings.rs"



[[test]]

name = "integration_llm_chat"

path = "tests/integration/llm_chat.rs"



[[test]]

name = "integration_rag"

path = "tests/integration/rag.rs"



[[test]]

name = "integration_rag_full"

path = "tests/integration/rag_full.rs"



[[test]]

name = "integration_callbacks"

path = "tests/integration/callbacks_integration.rs"



[[test]]

name = "integration_callbacks_llm"

path = "tests/integration/callbacks_llm_integration.rs"



[[test]]

name = "integration_tool_callbacks"

path = "tests/integration/tool_callbacks_integration.rs"



[[test]]

name = "langsmith_connection"

path = "tests/integration/langsmith_connection.rs"



# ============================================================================

# 端到端测试 - 完整应用流程

# ============================================================================

[[test]]

name = "e2e_full_application"

path = "tests/e2e/full_application.rs"