Module: Langchain

Defined in:
lib/langchain.rb,
lib/langchain/data.rb,
lib/langchain/chunk.rb,
lib/langchain/loader.rb,
lib/langchain/prompt.rb,
lib/langchain/version.rb,
lib/langchain/assistant.rb,
lib/langchain/chunker/base.rb,
lib/langchain/chunker/text.rb,
lib/langchain/processors/csv.rb,
lib/langchain/processors/eml.rb,
lib/langchain/processors/pdf.rb,
lib/langchain/processors/xls.rb,
lib/langchain/processors/base.rb,
lib/langchain/processors/docx.rb,
lib/langchain/processors/html.rb,
lib/langchain/processors/json.rb,
lib/langchain/processors/pptx.rb,
lib/langchain/processors/text.rb,
lib/langchain/processors/xlsx.rb,
lib/langchain/chunker/markdown.rb,
lib/langchain/chunker/semantic.rb,
lib/langchain/chunker/sentence.rb,
lib/langchain/evals/ragas/main.rb,
lib/langchain/processors/jsonl.rb,
lib/langchain/utils/to_boolean.rb,
lib/langchain/dependency_helper.rb,
lib/langchain/processors/markdown.rb,
lib/langchain/assistant/llm/adapter.rb,
lib/langchain/chunker/recursive_text.rb,
lib/langchain/utils/hash_transformer.rb,
lib/langchain/assistant/messages/base.rb,
lib/langchain/utils/cosine_similarity.rb,
lib/langchain/evals/ragas/faithfulness.rb,
lib/langchain/llm/response/base_response.rb,
lib/langchain/assistant/llm/adapters/base.rb,
lib/langchain/evals/ragas/answer_relevance.rb,
lib/langchain/assistant/llm/adapters/ollama.rb,
lib/langchain/assistant/llm/adapters/openai.rb,
lib/langchain/evals/ragas/context_relevance.rb,
lib/langchain/assistant/llm/adapters/anthropic.rb,
lib/langchain/assistant/llm/adapters/mistral_ai.rb,
lib/langchain/assistant/messages/ollama_message.rb,
lib/langchain/assistant/messages/openai_message.rb,
lib/langchain/assistant/llm/adapters/google_gemini.rb,
lib/langchain/assistant/messages/anthropic_message.rb,
lib/langchain/assistant/messages/mistral_ai_message.rb,
lib/langchain/assistant/messages/google_gemini_message.rb

Overview

freeze_string_literal: true

Defined Under Namespace

Modules: Chunker, Colorizer, DependencyHelper, Errors, Evals, LLM, OutputParsers, Processors, Prompt, Tool, ToolDefinition, Utils, Vectorsearch Classes: Assistant, Chunk, Data, Loader

Constant Summary collapse

LOGGER_OPTIONS =
{
  progname: "Langchain.rb",

  formatter: ->(severity, time, progname, msg) do
    Logger::Formatter.new.call(
      severity,
      time,
      "[#{progname}]",
      Colorizer.colorize_logger_msg(msg, severity)
    )
  end
}.freeze
VERSION =
"0.19.0"

Class Attribute Summary collapse

Class Attribute Details

.loggerLogger

Returns:

  • (Logger)


82
83
84
# File 'lib/langchain.rb', line 82

def logger
  @logger
end

.rootPathname (readonly)

Returns:

  • (Pathname)


84
85
86
# File 'lib/langchain.rb', line 84

def root
  @root
end