Packages
langchain
0.4.1
0.9.2
0.9.1
0.9.0
0.8.14
0.8.13
0.8.12
0.8.11
0.8.10
0.8.9
0.8.8
0.8.7
0.8.6
0.8.5
0.8.4
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.3
0.6.2
0.6.1
0.6.0
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.4.0-rc.3
0.4.0-rc.2
0.4.0-rc.1
0.4.0-rc.0
0.3.3
0.3.2
0.3.1
0.3.0
0.3.0-rc.2
0.3.0-rc.1
0.3.0-rc.0
0.2.0
0.1.10
0.1.9
0.1.8
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
Elixir implementation of a LangChain style framework that lets Elixir projects integrate with and leverage LLMs.
Current section
Files
Jump to
Current section
Files
mix.exs
defmodule LangChain.MixProject do
use Mix.Project
@source_url "https://github.com/brainlid/langchain"
@version "0.4.1"
def project do
[
app: :langchain,
version: @version,
elixir: "~> 1.16",
elixirc_paths: elixirc_paths(Mix.env()),
test_options: [docs: true],
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
package: package(),
docs: &docs/0,
name: "LangChain",
homepage_url: @source_url,
description: """
Elixir implementation of a LangChain style framework that lets Elixir projects integrate with and leverage LLMs.
"""
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
def cli do
[
preferred_envs: [precommit: :test]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ecto, "~> 3.10 or ~> 3.11"},
{:gettext, "~> 0.26.2 or ~> 1.0.0"},
{:req, ">= 0.5.2"},
{:nimble_parsec, "~> 1.4", optional: true},
{:abacus, "~> 2.1.0", optional: true},
{:nx, ">= 0.7.0", optional: true},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:mimic, "~> 1.8", only: :test}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, before performing a commit, run the following checks:
#
# $ mix precommit
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
precommit: ["compile --warning-as-errors", "deps.unlock --unused", "format", "test"]
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url,
assets: %{"notebooks/files" => "files"},
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
logo: "images/elixir-langchain-link-logo_32px.png",
extra_section: "Guides",
extras: extras(),
groups_for_extras: [
Notebooks: Path.wildcard("notebooks/*.livemd")
],
groups_for_modules: [
"Chat Models": [
LangChain.ChatModels.ChatOpenAI,
LangChain.ChatModels.ChatOpenAIResponses,
LangChain.ChatModels.ChatAnthropic,
LangChain.ChatModels.ChatBumblebee,
LangChain.ChatModels.ChatGoogleAI,
LangChain.ChatModels.ChatVertexAI,
LangChain.ChatModels.ChatMistralAI,
LangChain.ChatModels.ChatOllamaAI,
LangChain.ChatModels.ChatPerplexity,
LangChain.ChatModels.ChatGrok,
LangChain.ChatModels.ChatDeepSeek,
LangChain.ChatModels.ChatModel
],
Chains: [
LangChain.Chains.LLMChain,
LangChain.Chains.TextToTitleChain,
LangChain.Chains.SummarizeConversationChain,
LangChain.Chains.DataExtractionChain
],
Messages: [
LangChain.Message,
LangChain.MessageDelta,
LangChain.Message.ContentPart,
LangChain.Message.ToolCall,
LangChain.Message.ToolResult,
LangChain.PromptTemplate,
LangChain.MessageProcessors,
LangChain.MessageProcessors.JsonProcessor,
LangChain.TokenUsage
],
Functions: [
LangChain.Function,
LangChain.FunctionParam
],
Callbacks: [
LangChain.Callbacks,
LangChain.Chains.ChainCallbacks
],
Routing: [
LangChain.Chains.RoutingChain,
LangChain.Routing.PromptRoute
],
Images: [
LangChain.Images,
LangChain.Images.OpenAIImage,
LangChain.Images.GeneratedImage
],
"Text Splitter": [
LangChain.TextSplitter.CharacterTextSplitter,
LangChain.TextSplitter.RecursiveCharacterTextSplitter,
LangChain.TextSplitter.LanguageSeparators
],
Tools: [
LangChain.Tools.Calculator,
LangChain.Tools.DeepResearch,
LangChain.Tools.DeepResearchClient,
LangChain.Tools.DeepResearch.ResearchRequest,
LangChain.Tools.DeepResearch.ResearchStatus,
LangChain.Tools.DeepResearch.ResearchResult
],
Utils: [
LangChain.Utils,
LangChain.Utils.BedrockConfig,
LangChain.Utils.ChatTemplates,
LangChain.Utils.ChainResult,
LangChain.Config,
LangChain.Gettext
]
]
]
end
defp extras do
[
"README.md",
"CHANGELOG.md",
"notebooks/getting_started.livemd",
"notebooks/custom_functions.livemd",
"notebooks/context-specific-image-descriptions.livemd"
]
end
defp package do
# Note: the Livebook notebooks and related files are not included in the
# package.
[
files: ["lib", "mix.exs", "README*", "LICENSE*"],
maintainers: ["Mark Ericksen"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url}
]
end
end